Skip to content

Commit

Permalink
added support for one flavour solver
Browse files Browse the repository at this point in the history
  • Loading branch information
aniketsen committed Jun 27, 2023
1 parent 6954db9 commit 8bbabe6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions phmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down
14 changes: 10 additions & 4 deletions quda_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__, "");

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion quda_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_ */

0 comments on commit 8bbabe6

Please sign in to comment.