1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Hadrons: maximum iteration specified for tests and error if 0

This commit is contained in:
Antonin Portelli 2018-03-09 19:53:55 +00:00
parent 2f849ee252
commit 70ec2faa98
7 changed files with 25 additions and 13 deletions

View File

@ -111,9 +111,15 @@ std::vector<std::string> TRBPrecCG<FImpl>::getOutput(void)
template <typename FImpl>
void TRBPrecCG<FImpl>::setup(void)
{
if (par().maxIteration == 0)
{
HADRON_ERROR(Argument, "zero maximum iteration");
}
LOG(Message) << "setting up Schur red-black preconditioned CG for"
<< " action '" << par().action << "' with residual "
<< par().residual << std::endl;
<< par().residual << ", maximum iteration "
<< par().maxIteration << std::endl;
auto Ls = env().getObjectLs(par().action);
auto &mat = envGet(FMat, par().action);

View File

@ -93,8 +93,9 @@ int main(int argc, char *argv[])
// solvers
MSolver::RBPrecCG::Par solverPar;
solverPar.action = "DWF_" + flavour[i];
solverPar.residual = 1.0e-8;
solverPar.action = "DWF_" + flavour[i];
solverPar.residual = 1.0e-8;
solverPar.maxIteration = 10000;
application.createModule<MSolver::RBPrecCG>("CG_" + flavour[i],
solverPar);

View File

@ -176,8 +176,9 @@ inline void makeRBPrecCGSolver(Application &application, std::string &solverName
if (!(VirtualMachine::getInstance().hasModule(solverName)))
{
MSolver::RBPrecCG::Par solverPar;
solverPar.action = actionName;
solverPar.residual = residual;
solverPar.action = actionName;
solverPar.residual = residual;
solverPar.maxIteration = 10000;
application.createModule<MSolver::RBPrecCG>(solverName,
solverPar);
}

View File

@ -106,8 +106,9 @@ int main(int argc, char *argv[])
// solvers
MSolver::RBPrecCG2AS::Par solverPar;
solverPar.action = "WilsonClover2AS_" + flavour[i];
solverPar.residual = 1.0e-8;
solverPar.action = "WilsonClover2AS_" + flavour[i];
solverPar.residual = 1.0e-8;
solverPar.maxIteration = 10000;
application.createModule<MSolver::RBPrecCG2AS>("CG_" + flavour[i],
solverPar);

View File

@ -82,8 +82,9 @@ int main(int argc, char *argv[])
// solvers
MSolver::RBPrecCG::Par solverPar;
solverPar.action = "DWF_" + flavour[i];
solverPar.residual = 1.0e-8;
solverPar.action = "DWF_" + flavour[i];
solverPar.residual = 1.0e-8;
solverPar.maxIteration = 10000;
application.createModule<MSolver::RBPrecCG>("CG_" + flavour[i],
solverPar);
}

View File

@ -84,8 +84,9 @@ int main(int argc, char *argv[])
// solvers
MSolver::RBPrecCG::Par solverPar;
solverPar.action = "DWF_" + flavour[i];
solverPar.residual = 1.0e-8;
solverPar.action = "DWF_" + flavour[i];
solverPar.residual = 1.0e-8;
solverPar.maxIteration = 10000;
application.createModule<MSolver::RBPrecCG>("CG_" + flavour[i],
solverPar);

View File

@ -96,8 +96,9 @@ int main(int argc, char *argv[])
// solvers
MSolver::RBPrecCG::Par solverPar;
solverPar.action = "WilsonClover_" + flavour[i];
solverPar.residual = 1.0e-8;
solverPar.action = "WilsonClover_" + flavour[i];
solverPar.residual = 1.0e-8;
solverPar.maxIteration = 10000;
application.createModule<MSolver::RBPrecCG>("CG_" + flavour[i],
solverPar);