From af9ecb8b41fe48628b713be8dee191a13bf20b34 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Tue, 27 Sep 2022 10:56:55 -0400 Subject: [PATCH] Current tests compiling --- HMC/Mobius2p1f.cc | 6 ++-- HMC/Mobius2p1fEOFA.cc | 8 +++--- HMC/Mobius2p1fEOFA_F1.cc | 8 +++--- HMC/Mobius2p1fRHMC.cc | 6 ++-- HMC/Mobius2p1f_DD_RHMC.cc | 2 +- HMC/Mobius2p1f_DD_RHMC_96I.cc | 8 +++--- HMC/Mobius2p1f_DD_RHMC_96I_mixed.cc | 10 +++---- HMC/Mobius2p1f_DD_RHMC_96I_mixedmshift.cc | 34 +++++++++++++++++------ 8 files changed, 50 insertions(+), 32 deletions(-) diff --git a/HMC/Mobius2p1f.cc b/HMC/Mobius2p1f.cc index 5f82e0e7..4ab1f20f 100644 --- a/HMC/Mobius2p1f.cc +++ b/HMC/Mobius2p1f.cc @@ -39,7 +39,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef WilsonImplR FermionImplPolicy; - typedef MobiusFermionR FermionAction; + typedef MobiusFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; typedef Grid::XmlReader Serialiser; @@ -133,8 +133,8 @@ int main(int argc, char **argv) { //////////////////////////////////// // FermionAction StrangeOp(U,*FGrid,*FrbGrid,*GridPtr,*GridRBPtr,light_mass,M5,b,c, Params); - // DomainWallEOFAFermionR Strange_Op_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5); - // DomainWallEOFAFermionR Strange_Op_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5); + // DomainWallEOFAFermionD Strange_Op_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5); + // DomainWallEOFAFermionD Strange_Op_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5); // ExactOneFlavourRatioPseudoFermionAction EOFA(Strange_Op_L,Strange_Op_R,CG,ofp, false); FermionAction StrangeOp (U,*FGrid,*FrbGrid,*GridPtr,*GridRBPtr,strange_mass,M5,b,c, Params); diff --git a/HMC/Mobius2p1fEOFA.cc b/HMC/Mobius2p1fEOFA.cc index b1294da5..c961cbc9 100644 --- a/HMC/Mobius2p1fEOFA.cc +++ b/HMC/Mobius2p1fEOFA.cc @@ -175,9 +175,9 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef WilsonImplR FermionImplPolicy; - typedef MobiusFermionR FermionAction; + typedef MobiusFermionD FermionAction; typedef MobiusFermionF FermionActionF; - typedef MobiusEOFAFermionR FermionEOFAAction; + typedef MobiusEOFAFermionD FermionEOFAAction; typedef MobiusEOFAFermionF FermionEOFAActionF; typedef typename FermionAction::FermionField FermionField; typedef typename FermionActionF::FermionField FermionFieldF; @@ -293,9 +293,9 @@ int main(int argc, char **argv) { OFRp.precision= 50; - MobiusEOFAFermionR Strange_Op_L (U , *FGrid , *FrbGrid , *GridPtr , *GridRBPtr , strange_mass, strange_mass, pv_mass, 0.0, -1, M5, b, c); + MobiusEOFAFermionD Strange_Op_L (U , *FGrid , *FrbGrid , *GridPtr , *GridRBPtr , strange_mass, strange_mass, pv_mass, 0.0, -1, M5, b, c); MobiusEOFAFermionF Strange_Op_LF(UF, *FGridF, *FrbGridF, *GridPtrF, *GridRBPtrF, strange_mass, strange_mass, pv_mass, 0.0, -1, M5, b, c); - MobiusEOFAFermionR Strange_Op_R (U , *FGrid , *FrbGrid , *GridPtr , *GridRBPtr , pv_mass, strange_mass, pv_mass, -1.0, 1, M5, b, c); + MobiusEOFAFermionD Strange_Op_R (U , *FGrid , *FrbGrid , *GridPtr , *GridRBPtr , pv_mass, strange_mass, pv_mass, -1.0, 1, M5, b, c); MobiusEOFAFermionF Strange_Op_RF(UF, *FGridF, *FrbGridF, *GridPtrF, *GridRBPtrF, pv_mass, strange_mass, pv_mass, -1.0, 1, M5, b, c); ConjugateGradient ActionCG(ActionStoppingCondition,MaxCGIterations); diff --git a/HMC/Mobius2p1fEOFA_F1.cc b/HMC/Mobius2p1fEOFA_F1.cc index 3f0a7bf6..f910d69e 100644 --- a/HMC/Mobius2p1fEOFA_F1.cc +++ b/HMC/Mobius2p1fEOFA_F1.cc @@ -159,9 +159,9 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef WilsonImplR FermionImplPolicy; - typedef MobiusFermionR FermionAction; + typedef MobiusFermionD FermionAction; typedef MobiusFermionF FermionActionF; - typedef MobiusEOFAFermionR FermionEOFAAction; + typedef MobiusEOFAFermionD FermionEOFAAction; typedef MobiusEOFAFermionF FermionEOFAActionF; typedef typename FermionAction::FermionField FermionField; typedef typename FermionActionF::FermionField FermionFieldF; @@ -281,9 +281,9 @@ int main(int argc, char **argv) { OFRp.precision= 50; - MobiusEOFAFermionR Strange_Op_L (U , *FGrid , *FrbGrid , *GridPtr , *GridRBPtr , strange_mass, strange_mass, pv_mass, 0.0, -1, M5, b, c); + MobiusEOFAFermionD Strange_Op_L (U , *FGrid , *FrbGrid , *GridPtr , *GridRBPtr , strange_mass, strange_mass, pv_mass, 0.0, -1, M5, b, c); MobiusEOFAFermionF Strange_Op_LF(UF, *FGridF, *FrbGridF, *GridPtrF, *GridRBPtrF, strange_mass, strange_mass, pv_mass, 0.0, -1, M5, b, c); - MobiusEOFAFermionR Strange_Op_R (U , *FGrid , *FrbGrid , *GridPtr , *GridRBPtr , pv_mass, strange_mass, pv_mass, -1.0, 1, M5, b, c); + MobiusEOFAFermionD Strange_Op_R (U , *FGrid , *FrbGrid , *GridPtr , *GridRBPtr , pv_mass, strange_mass, pv_mass, -1.0, 1, M5, b, c); MobiusEOFAFermionF Strange_Op_RF(UF, *FGridF, *FrbGridF, *GridPtrF, *GridRBPtrF, pv_mass, strange_mass, pv_mass, -1.0, 1, M5, b, c); ConjugateGradient ActionCG(ActionStoppingCondition,MaxCGIterations); diff --git a/HMC/Mobius2p1fRHMC.cc b/HMC/Mobius2p1fRHMC.cc index b958d548..288a6c54 100644 --- a/HMC/Mobius2p1fRHMC.cc +++ b/HMC/Mobius2p1fRHMC.cc @@ -39,7 +39,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef WilsonImplR FermionImplPolicy; - typedef MobiusFermionR FermionAction; + typedef MobiusFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; typedef Grid::XmlReader Serialiser; @@ -137,8 +137,8 @@ int main(int argc, char **argv) { //////////////////////////////////// // FermionAction StrangeOp(U,*FGrid,*FrbGrid,*GridPtr,*GridRBPtr,light_mass,M5,b,c, Params); - // DomainWallEOFAFermionR Strange_Op_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5); - // DomainWallEOFAFermionR Strange_Op_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5); + // DomainWallEOFAFermionD Strange_Op_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5); + // DomainWallEOFAFermionD Strange_Op_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5); // ExactOneFlavourRatioPseudoFermionAction EOFA(Strange_Op_L,Strange_Op_R,CG,ofp, false); FermionAction StrangeOp (U,*FGrid,*FrbGrid,*GridPtr,*GridRBPtr,strange_mass,M5,b,c, Params); diff --git a/HMC/Mobius2p1f_DD_RHMC.cc b/HMC/Mobius2p1f_DD_RHMC.cc index aca408e7..39b4c1dd 100644 --- a/HMC/Mobius2p1f_DD_RHMC.cc +++ b/HMC/Mobius2p1f_DD_RHMC.cc @@ -37,7 +37,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef WilsonImplR FermionImplPolicy; - typedef MobiusFermionR FermionAction; + typedef MobiusFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; typedef Grid::XmlReader Serialiser; diff --git a/HMC/Mobius2p1f_DD_RHMC_96I.cc b/HMC/Mobius2p1f_DD_RHMC_96I.cc index a6a2f26c..5158aed9 100644 --- a/HMC/Mobius2p1f_DD_RHMC_96I.cc +++ b/HMC/Mobius2p1f_DD_RHMC_96I.cc @@ -37,7 +37,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef WilsonImplR FermionImplPolicy; - typedef MobiusFermionR FermionAction; + typedef MobiusFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; typedef Grid::XmlReader Serialiser; @@ -286,8 +286,8 @@ int main(int argc, char **argv) { // ii) Break low bound, how rapidly? // iii) Run lanczos // iv) Have CG return spectral range estimate - FermionField vec(StrangeOp.FermionRedBlackGrid()); - FermionField res(StrangeOp.FermionRedBlackGrid()); + FermionField vec(StrangeOp.FermionDedBlackGrid()); + FermionField res(StrangeOp.FermionDedBlackGrid()); vec = 1; // Fill with any old junk std::cout << "Bounds check on strange operator mass "<< StrangeOp.Mass()<(Block4,Width)); ////////////////////////// @@ -311,7 +311,7 @@ int main(int argc, char **argv) { // double StoppingCondition = 1e-14; // double MDStoppingCondition = 1e-9; double StoppingCondition = 1e-10; - double MDStoppingCondition = 1e-7; + double MDStoppingCondition = 1e-6; double MDStoppingConditionLoose = 1e-6; double MaxCGIterations = 300000; ConjugateGradient CG(StoppingCondition,MaxCGIterations); diff --git a/HMC/Mobius2p1f_DD_RHMC_96I_mixedmshift.cc b/HMC/Mobius2p1f_DD_RHMC_96I_mixedmshift.cc index 732c4666..63315ec3 100644 --- a/HMC/Mobius2p1f_DD_RHMC_96I_mixedmshift.cc +++ b/HMC/Mobius2p1f_DD_RHMC_96I_mixedmshift.cc @@ -128,14 +128,9 @@ template MPCG(Tolerance,MaxInnerIterations*MaxOuterIterations,delta,SinglePrecGrid5,LinOpF,LinOpD); -#else - std::cout << GridLogMessage << "Calling mixed precision Conjugate Gradient" < MPCG(Tolerance,MaxInnerIterations,MaxOuterIterations,SinglePrecGrid5,LinOpF,LinOpD); -#endif MPCG(src,psi); } }; @@ -153,7 +148,7 @@ int main(int argc, char **argv) { typedef WilsonImplR FermionImplPolicy; typedef WilsonImplF FermionImplPolicyF; - typedef MobiusFermionR FermionAction; + typedef MobiusFermionD FermionAction; typedef MobiusFermionF FermionActionF; typedef typename FermionAction::FermionField FermionField; typedef typename FermionActionF::FermionField FermionFieldF; @@ -300,9 +295,13 @@ int main(int argc, char **argv) { // These lines are unecessary if BC are all periodic std::vector boundary = {1,1,1,-1}; FermionAction::ImplParams Params(boundary); - Params.dirichlet=NonDirichlet; FermionAction::ImplParams ParamsDir(boundary); + FermionActionF::ImplParams ParamsF(boundary); + FermionActionF::ImplParams ParamsDirF(boundary); + Params.dirichlet=NonDirichlet; + ParamsF.dirichlet=NonDirichlet; ParamsDir.dirichlet=Dirichlet; + ParamsDirF.dirichlet=Dirichlet; // double StoppingCondition = 1e-14; // double MDStoppingCondition = 1e-9; @@ -323,15 +322,34 @@ int main(int argc, char **argv) { //////////////////////////////////// // Strange action //////////////////////////////////// + FermionAction StrangeOp (U,*FGrid,*FrbGrid,*GridPtr,*GridRBPtr,strange_mass,M5,b,c, Params); FermionAction StrangePauliVillarsOp(U,*FGrid,*FrbGrid,*GridPtr,*GridRBPtr,pv_mass, M5,b,c, Params); FermionAction StrangeOpDir (U,*FGrid,*FrbGrid,*GridPtr,*GridRBPtr,strange_mass,M5,b,c, ParamsDir); FermionAction StrangePauliVillarsOpDir(U,*FGrid,*FrbGrid,*GridPtr,*GridRBPtr,pv_mass, M5,b,c, ParamsDir); - + + FermionActionF StrangeOpF (UF,*FGridF,*FrbGridF,*GridPtrF,*GridRBPtrF,strange_mass,M5,b,c, ParamsF); + FermionActionF StrangePauliVillarsOpF(UF,*FGridF,*FrbGridF,*GridPtrF,*GridRBPtrF,pv_mass, M5,b,c, ParamsF); + + FermionActionF StrangeOpDirF (UF,*FGridF,*FrbGridF,*GridPtrF,*GridRBPtrF,strange_mass,M5,b,c, ParamsDirF); + FermionActionF StrangePauliVillarsOpDirF(UF,*FGridF,*FrbGridF,*GridPtrF,*GridRBPtrF,pv_mass, M5,b,c, ParamsDirF); + +#if 1 + OneFlavourEvenOddRatioRationalMixedPrecPseudoFermionAction StrangePseudoFermionBdy(StrangeOpDir,StrangeOp, + StrangeOpDirF,StrangeOpF, + SFRp,500); + OneFlavourEvenOddRatioRationalMixedPrecPseudoFermionAction StrangePseudoFermionLocal(StrangePauliVillarsOpDir,StrangeOpDir, + StrangePauliVillarsOpDirF,StrangeOpDirF, + SFRp,500); + OneFlavourEvenOddRatioRationalMixedPrecPseudoFermionAction StrangePseudoFermionPVBdy(StrangePauliVillarsOp,StrangePauliVillarsOpDir, + StrangePauliVillarsOpF,StrangePauliVillarsOpDirF, + SFRp,500); +#else OneFlavourEvenOddRatioRationalPseudoFermionAction StrangePseudoFermionBdy(StrangeOpDir,StrangeOp,SFRp); OneFlavourEvenOddRatioRationalPseudoFermionAction StrangePseudoFermionLocal(StrangePauliVillarsOpDir,StrangeOpDir,SFRp); OneFlavourEvenOddRatioRationalPseudoFermionAction StrangePseudoFermionPVBdy(StrangePauliVillarsOp,StrangePauliVillarsOpDir,SFRp); +#endif Level1.push_back(&StrangePseudoFermionBdy); // ok Level2.push_back(&StrangePseudoFermionLocal); Level1.push_back(&StrangePseudoFermionPVBdy); //ok