try double prec CG for M0 charm

This commit is contained in:
Antonin Portelli 2023-06-10 15:44:18 +01:00
parent 3936ed389e
commit 3c30d73912

View File

@ -409,13 +409,6 @@ void RbcUkqcd::addM0CharmSolver(Application &app, const std::string solverName,
smearPar.orthogDim = "";
app.createModule<MGauge::StoutSmearing>(prefix + "_gauge_3stout", smearPar);
// Gauge field FP32 cast
MUtilities::GaugeSinglePrecisionCast::Par gaugeCastPar;
gaugeCastPar.field = prefix + "_gauge_3stout";
app.createModule<MUtilities::GaugeSinglePrecisionCast>(prefix + "_gauge_3stout_fp32",
gaugeCastPar);
// Scaled DWF action + FP32 version
MAction::ScaledDWF::Par actionPar;
@ -427,20 +420,15 @@ void RbcUkqcd::addM0CharmSolver(Application &app, const std::string solverName,
actionPar.boundary = boundary;
actionPar.twist = "0. 0. 0. 0.";
app.createModule<MAction::ScaledDWF>(prefix + "_dwf", actionPar);
actionPar.gauge = prefix + "_gauge_3stout_fp32";
app.createModule<MAction::ScaledDWFF>(prefix + "_dwf_fp32", actionPar);
// Mixed-precision red-black preconditionned CG
MSolver::MixedPrecisionRBPrecCG::Par solverPar;
// Red-black preconditionned CG
MSolver::RBPrecCG::Par solverPar;
solverPar.innerAction = prefix + "_dwf_fp32";
solverPar.outerAction = prefix + "_dwf";
solverPar.maxInnerIteration = 30000;
solverPar.maxOuterIteration = 100;
solverPar.action = prefix + "_dwf";
solverPar.maxIteration = 30000;
solverPar.residual = residual;
solverPar.innerGuesser = "";
solverPar.outerGuesser = "";
app.createModule<MSolver::MixedPrecisionRBPrecCG>(solverName, solverPar);
solverPar.guesser = "";
app.createModule<MSolver::RBPrecCG>(solverName, solverPar);
}
} // namespace hadpresets