From 8bbabe6af8271e3a53727c71b2611d456cb63aec Mon Sep 17 00:00:00 2001 From: Aniket Sen Date: Tue, 27 Jun 2023 17:33:26 +0200 Subject: [PATCH] added support for one flavour solver --- phmc.c | 4 ++-- quda_interface.c | 14 ++++++++++---- quda_interface.h | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/phmc.c b/phmc.c index cf4e73b14..d4c168eac 100644 --- a/phmc.c +++ b/phmc.c @@ -236,7 +236,7 @@ void phmc_compute_ev(const int trajectory_counter, 1, // we only support even-odd here mnl->solver_params.refinement_precision, mnl->solver_params.sloppy_precision, - mnl->solver_params.compression_type); + mnl->solver_params.compression_type, 0); if( fabs(mnl->EVMax - 1) < 2*DBL_EPSILON ) { temp = temp / mnl->StildeMax; } @@ -263,7 +263,7 @@ void phmc_compute_ev(const int trajectory_counter, 1, // we only support even-odd here mnl->solver_params.refinement_precision, mnl->solver_params.sloppy_precision, - mnl->solver_params.compression_type); + mnl->solver_params.compression_type, 0); if( fabs(mnl->EVMax - 1.) < 2*DBL_EPSILON ) { temp2 = temp2 / mnl->StildeMax; } diff --git a/quda_interface.c b/quda_interface.c index c17b2015f..9a6e5ef9b 100644 --- a/quda_interface.c +++ b/quda_interface.c @@ -2601,7 +2601,7 @@ double eigsolveQuda(int n, double tol, int blksize, int blkwise, int max_iterati const double precision, const int max_iter, const int polydeg, const double amin, const double amax, const int n_kr, const int solver_flag, const int rel_prec, const int even_odd_flag, const SloppyPrecision refinement_precision, - SloppyPrecision sloppy_precision, CompressionType compression) { + SloppyPrecision sloppy_precision, CompressionType compression, const int oneFlavourFlag) { tm_stopwatch_push(&g_timers, __func__, ""); @@ -2624,9 +2624,15 @@ double eigsolveQuda(int n, double tol, int blksize, int blkwise, int max_iterati // load gauge after setting precision _loadGaugeQuda(compression); - _setTwoFlavourSolverParam(g_kappa, g_c_sw, g_mubar, g_epsbar, solver_flag, even_odd_flag, precision, max_iter, - 1 /*single_parity_solve */, - 1 /*always QpQm*/); + if ( oneFlavourFlag ) { + _setOneFlavourSolverParam(g_kappa, g_c_sw, g_mu, solver_flag, even_odd_flag, precision, max_iter, + 1 /*single_parity_solve */, + 1 /*always QpQm*/); + }else { + _setTwoFlavourSolverParam(g_kappa, g_c_sw, g_mubar, g_epsbar, solver_flag, even_odd_flag, precision, max_iter, + 1 /*single_parity_solve */, + 1 /*always QpQm*/); + } // QUDA applies the MMdag operator, we need QpQm^{-1) in the end // so we want QUDA to use the MdagM operator diff --git a/quda_interface.h b/quda_interface.h index 13fb578c9..eb0ee4447 100644 --- a/quda_interface.h +++ b/quda_interface.h @@ -179,6 +179,6 @@ double eigsolveQuda(int n, double tol, int blksize, int blkwise, int max_iterati const double precision, const int max_iter, const int polydeg, const double amin, const double amax, const int n_kr, const int solver_flag, const int rel_prec, const int even_odd_flag, const SloppyPrecision refinement_precision, - SloppyPrecision sloppy_precision, CompressionType compression); + SloppyPrecision sloppy_precision, CompressionType compression, const int oneFlavourFlag); #endif /* QUDA_INTERFACE_H_ */