RBC/UKQCD M0 strange

This commit is contained in:
Antonin Portelli 2023-05-12 13:47:59 +01:00
parent 540711e1ce
commit 81c887b27f

View File

@ -48,6 +48,10 @@ struct RbcUkqcd
const std::string gaugeTransform, const std::string gaugeTransform,
const std::string eigenpackPath, const std::string eigenpackPath,
const double residual = 1.0e-8); const double residual = 1.0e-8);
static inline void addM0StrangeSolver(Application &app, const std::string solverName,
const std::string gaugeName,
const std::string gaugeTransform,
const double residual = 1.0e-8);
}; };
// Implementations ///////////////////////////////////////////////////////////////////////////////// // Implementations /////////////////////////////////////////////////////////////////////////////////
@ -113,4 +117,43 @@ void RbcUkqcd::addM0LightLCDSolver(Application &app, const std::string solverNam
app.createModule<MSolver::MixedPrecisionRBPrecCGBatched>(solverName, solverPar); app.createModule<MSolver::MixedPrecisionRBPrecCGBatched>(solverName, solverPar);
} }
void RbcUkqcd::addM0StrangeSolver(Application &app, const std::string solverName,
const std::string gaugeName, const std::string gaugeTransform,
const double residual)
{
const std::string prefix = solverName;
// Gauge field FP32 cast
MUtilities::GaugeSinglePrecisionCast::Par gaugeCastPar;
gaugeCastPar.field = gaugeName;
app.createModule<MUtilities::GaugeSinglePrecisionCast>(prefix + "_gauge_fp32", gaugeCastPar);
// Scaled DWF action + FP32 version
MAction::ScaledDWF::Par actionPar;
actionPar.gauge = gaugeName;
actionPar.Ls = RbcUkqcd::m0LCDPar.Ls;
actionPar.M5 = RbcUkqcd::m0LCDPar.M5;
actionPar.mass = RbcUkqcd::m0LCDPar.ms;
actionPar.scale = RbcUkqcd::m0LCDPar.scale;
actionPar.boundary = "1 1 1 1";
actionPar.twist = "0. 0. 0. 0.";
app.createModule<MAction::ScaledDWF>(prefix + "_dwf", actionPar);
actionPar.gauge = prefix + "_gauge_fp32";
app.createModule<MAction::ScaledDWFF>(prefix + "_dwf_fp32", actionPar);
// Batched mixed-precision red-black preconditionned CG
MSolver::MixedPrecisionRBPrecCG::Par solverPar;
solverPar.innerAction = prefix + "_dwf_fp32";
solverPar.outerAction = prefix + "_dwf";
solverPar.maxInnerIteration = 30000;
solverPar.maxOuterIteration = 100;
solverPar.residual = residual;
solverPar.innerGuesser = "";
solverPar.outerGuesser = "";
app.createModule<MSolver::MixedPrecisionRBPrecCG>(solverName, solverPar);
}
} // namespace hadpresets } // namespace hadpresets