From 8b5b55b68228f1433108bde7d6dbef68dedc05fa Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Tue, 12 May 2020 17:57:24 -0400 Subject: [PATCH] Make tests all compile ccurrent Grid, mostly MdagM removal of norms fixes but a few minor issues fiixed too --- tests/IO/Test_openqcd_io.cc | 6 +++--- tests/core/Test_contfrac_even_odd.cc | 8 ++++---- tests/core/Test_dwf_eofa_even_odd.cc | 8 ++++---- tests/core/Test_dwf_even_odd.cc | 8 ++++---- tests/core/Test_gpwilson_even_odd.cc | 8 ++++---- tests/core/Test_mobius_eofa_even_odd.cc | 8 ++++---- tests/core/Test_mobius_even_odd.cc | 8 ++++---- tests/core/Test_staggered.cc | 8 ++++---- tests/core/Test_staggered5D.cc | 8 ++++---- tests/core/Test_wilson_even_odd.cc | 8 ++++---- tests/core/Test_wilson_twisted_mass_even_odd.cc | 8 ++++---- tests/core/Test_zmobius_even_odd.cc | 8 ++++---- tests/hmc/Test_multishift_sqrt.cc | 1 + tests/solver/Test_dwf_fpgcr.cc | 11 ++++++----- tests/solver/Test_staggered_block_cg_prec.cc | 11 ----------- tests/solver/Test_zMADWF_prec.cc | 2 +- 16 files changed, 55 insertions(+), 64 deletions(-) diff --git a/tests/IO/Test_openqcd_io.cc b/tests/IO/Test_openqcd_io.cc index 83b498c2..765509a9 100644 --- a/tests/IO/Test_openqcd_io.cc +++ b/tests/IO/Test_openqcd_io.cc @@ -28,13 +28,12 @@ See the full license in the file "LICENSE" in the top level distribution directo #include -#if defined(GRID_COMMS_NONE) -#error This test requires Grid compiled with MPI -#endif + using namespace Grid; int main(int argc, char** argv) { +#if !defined(GRID_COMMS_NONE) Grid_init(&argc, &argv); auto simd_layout = GridDefaultSimd(Nd, vComplex::Nsimd()); @@ -81,4 +80,5 @@ int main(int argc, char** argv) { // clang-format on Grid_finalize(); +#endif } diff --git a/tests/core/Test_contfrac_even_odd.cc b/tests/core/Test_contfrac_even_odd.cc index 25affd00..5311f869 100644 --- a/tests/core/Test_contfrac_even_odd.cc +++ b/tests/core/Test_contfrac_even_odd.cc @@ -238,11 +238,11 @@ void TestWhat(What & Ddwf, RealD t1,t2; SchurDiagMooeeOperator HermOpEO(Ddwf); - HermOpEO.MpcDagMpc(chi_e,dchi_e,t1,t2); - HermOpEO.MpcDagMpc(chi_o,dchi_o,t1,t2); + HermOpEO.MpcDagMpc(chi_e,dchi_e); + HermOpEO.MpcDagMpc(chi_o,dchi_o); - HermOpEO.MpcDagMpc(phi_e,dphi_e,t1,t2); - HermOpEO.MpcDagMpc(phi_o,dphi_o,t1,t2); + HermOpEO.MpcDagMpc(phi_e,dphi_e); + HermOpEO.MpcDagMpc(phi_o,dphi_o); pDce = innerProduct(phi_e,dchi_e); pDco = innerProduct(phi_o,dchi_o); diff --git a/tests/core/Test_dwf_eofa_even_odd.cc b/tests/core/Test_dwf_eofa_even_odd.cc index 1d2f2909..01fff9ea 100644 --- a/tests/core/Test_dwf_eofa_even_odd.cc +++ b/tests/core/Test_dwf_eofa_even_odd.cc @@ -218,11 +218,11 @@ int main (int argc, char ** argv) RealD t1,t2; SchurDiagMooeeOperator HermOpEO(Ddwf); - HermOpEO.MpcDagMpc(chi_e, dchi_e, t1, t2); - HermOpEO.MpcDagMpc(chi_o, dchi_o, t1, t2); + HermOpEO.MpcDagMpc(chi_e, dchi_e); + HermOpEO.MpcDagMpc(chi_o, dchi_o); - HermOpEO.MpcDagMpc(phi_e, dphi_e, t1, t2); - HermOpEO.MpcDagMpc(phi_o, dphi_o, t1, t2); + HermOpEO.MpcDagMpc(phi_e, dphi_e); + HermOpEO.MpcDagMpc(phi_o, dphi_o); pDce = innerProduct(phi_e, dchi_e); pDco = innerProduct(phi_o, dchi_o); diff --git a/tests/core/Test_dwf_even_odd.cc b/tests/core/Test_dwf_even_odd.cc index d654e588..6093ee8f 100644 --- a/tests/core/Test_dwf_even_odd.cc +++ b/tests/core/Test_dwf_even_odd.cc @@ -216,11 +216,11 @@ int main (int argc, char ** argv) SchurDiagMooeeOperator HermOpEO(Ddwf); - HermOpEO.MpcDagMpc(chi_e,dchi_e,t1,t2); - HermOpEO.MpcDagMpc(chi_o,dchi_o,t1,t2); + HermOpEO.MpcDagMpc(chi_e,dchi_e); + HermOpEO.MpcDagMpc(chi_o,dchi_o); - HermOpEO.MpcDagMpc(phi_e,dphi_e,t1,t2); - HermOpEO.MpcDagMpc(phi_o,dphi_o,t1,t2); + HermOpEO.MpcDagMpc(phi_e,dphi_e); + HermOpEO.MpcDagMpc(phi_o,dphi_o); pDce = innerProduct(phi_e,dchi_e); pDco = innerProduct(phi_o,dchi_o); diff --git a/tests/core/Test_gpwilson_even_odd.cc b/tests/core/Test_gpwilson_even_odd.cc index ac4cde99..bf37f4d5 100644 --- a/tests/core/Test_gpwilson_even_odd.cc +++ b/tests/core/Test_gpwilson_even_odd.cc @@ -201,11 +201,11 @@ int main (int argc, char ** argv) RealD t1,t2; SchurDiagMooeeOperator HermOpEO(Dw); - HermOpEO.MpcDagMpc(chi_e,dchi_e,t1,t2); - HermOpEO.MpcDagMpc(chi_o,dchi_o,t1,t2); + HermOpEO.MpcDagMpc(chi_e,dchi_e); + HermOpEO.MpcDagMpc(chi_o,dchi_o); - HermOpEO.MpcDagMpc(phi_e,dphi_e,t1,t2); - HermOpEO.MpcDagMpc(phi_o,dphi_o,t1,t2); + HermOpEO.MpcDagMpc(phi_e,dphi_e); + HermOpEO.MpcDagMpc(phi_o,dphi_o); pDce = innerProduct(phi_e,dchi_e); pDco = innerProduct(phi_o,dchi_o); diff --git a/tests/core/Test_mobius_eofa_even_odd.cc b/tests/core/Test_mobius_eofa_even_odd.cc index bfd53c72..68091229 100644 --- a/tests/core/Test_mobius_eofa_even_odd.cc +++ b/tests/core/Test_mobius_eofa_even_odd.cc @@ -220,11 +220,11 @@ int main (int argc, char ** argv) RealD t1,t2; SchurDiagMooeeOperator HermOpEO(Ddwf); - HermOpEO.MpcDagMpc(chi_e, dchi_e, t1, t2); - HermOpEO.MpcDagMpc(chi_o, dchi_o, t1, t2); + HermOpEO.MpcDagMpc(chi_e, dchi_e); + HermOpEO.MpcDagMpc(chi_o, dchi_o); - HermOpEO.MpcDagMpc(phi_e, dphi_e, t1, t2); - HermOpEO.MpcDagMpc(phi_o, dphi_o, t1, t2); + HermOpEO.MpcDagMpc(phi_e, dphi_e); + HermOpEO.MpcDagMpc(phi_o, dphi_o); pDce = innerProduct(phi_e, dchi_e); pDco = innerProduct(phi_o, dchi_o); diff --git a/tests/core/Test_mobius_even_odd.cc b/tests/core/Test_mobius_even_odd.cc index 0a035dc8..7f808cac 100644 --- a/tests/core/Test_mobius_even_odd.cc +++ b/tests/core/Test_mobius_even_odd.cc @@ -266,11 +266,11 @@ int main (int argc, char ** argv) SchurDiagMooeeOperator HermOpEO(Ddwf); - HermOpEO.MpcDagMpc(chi_e,dchi_e,t1,t2); - HermOpEO.MpcDagMpc(chi_o,dchi_o,t1,t2); + HermOpEO.MpcDagMpc(chi_e,dchi_e); + HermOpEO.MpcDagMpc(chi_o,dchi_o); - HermOpEO.MpcDagMpc(phi_e,dphi_e,t1,t2); - HermOpEO.MpcDagMpc(phi_o,dphi_o,t1,t2); + HermOpEO.MpcDagMpc(phi_e,dphi_e); + HermOpEO.MpcDagMpc(phi_o,dphi_o); pDce = innerProduct(phi_e,dchi_e); pDco = innerProduct(phi_o,dchi_o); diff --git a/tests/core/Test_staggered.cc b/tests/core/Test_staggered.cc index c85d4090..1f42ff0d 100644 --- a/tests/core/Test_staggered.cc +++ b/tests/core/Test_staggered.cc @@ -270,11 +270,11 @@ int main (int argc, char ** argv) pickCheckerboard(Odd ,phi_o,phi); SchurDiagMooeeOperator HermOpEO(Ds); - HermOpEO.MpcDagMpc(chi_e,dchi_e,t1,t2); - HermOpEO.MpcDagMpc(chi_o,dchi_o,t1,t2); + HermOpEO.MpcDagMpc(chi_e,dchi_e); + HermOpEO.MpcDagMpc(chi_o,dchi_o); - HermOpEO.MpcDagMpc(phi_e,dphi_e,t1,t2); - HermOpEO.MpcDagMpc(phi_o,dphi_o,t1,t2); + HermOpEO.MpcDagMpc(phi_e,dphi_e); + HermOpEO.MpcDagMpc(phi_o,dphi_o); pDce = innerProduct(phi_e,dchi_e); pDco = innerProduct(phi_o,dchi_o); diff --git a/tests/core/Test_staggered5D.cc b/tests/core/Test_staggered5D.cc index 7055d183..68b8e537 100644 --- a/tests/core/Test_staggered5D.cc +++ b/tests/core/Test_staggered5D.cc @@ -289,11 +289,11 @@ int main (int argc, char ** argv) pickCheckerboard(Odd ,phi_o,phi); SchurDiagMooeeOperator HermOpEO(Ds); - HermOpEO.MpcDagMpc(chi_e,dchi_e,t1,t2); - HermOpEO.MpcDagMpc(chi_o,dchi_o,t1,t2); + HermOpEO.MpcDagMpc(chi_e,dchi_e); + HermOpEO.MpcDagMpc(chi_o,dchi_o); - HermOpEO.MpcDagMpc(phi_e,dphi_e,t1,t2); - HermOpEO.MpcDagMpc(phi_o,dphi_o,t1,t2); + HermOpEO.MpcDagMpc(phi_e,dphi_e); + HermOpEO.MpcDagMpc(phi_o,dphi_o); pDce = innerProduct(phi_e,dchi_e); pDco = innerProduct(phi_o,dchi_o); diff --git a/tests/core/Test_wilson_even_odd.cc b/tests/core/Test_wilson_even_odd.cc index 8f325f1c..dc49cf81 100644 --- a/tests/core/Test_wilson_even_odd.cc +++ b/tests/core/Test_wilson_even_odd.cc @@ -207,11 +207,11 @@ int main (int argc, char ** argv) RealD t1,t2; SchurDiagMooeeOperator HermOpEO(Dw); - HermOpEO.MpcDagMpc(chi_e,dchi_e,t1,t2); - HermOpEO.MpcDagMpc(chi_o,dchi_o,t1,t2); + HermOpEO.MpcDagMpc(chi_e,dchi_e); + HermOpEO.MpcDagMpc(chi_o,dchi_o); - HermOpEO.MpcDagMpc(phi_e,dphi_e,t1,t2); - HermOpEO.MpcDagMpc(phi_o,dphi_o,t1,t2); + HermOpEO.MpcDagMpc(phi_e,dphi_e); + HermOpEO.MpcDagMpc(phi_o,dphi_o); pDce = innerProduct(phi_e,dchi_e); pDco = innerProduct(phi_o,dchi_o); diff --git a/tests/core/Test_wilson_twisted_mass_even_odd.cc b/tests/core/Test_wilson_twisted_mass_even_odd.cc index 58b0b60f..ba80fd0e 100644 --- a/tests/core/Test_wilson_twisted_mass_even_odd.cc +++ b/tests/core/Test_wilson_twisted_mass_even_odd.cc @@ -208,11 +208,11 @@ int main (int argc, char ** argv) RealD t1,t2; SchurDiagMooeeOperator HermOpEO(Dw); - HermOpEO.MpcDagMpc(chi_e,dchi_e,t1,t2); - HermOpEO.MpcDagMpc(chi_o,dchi_o,t1,t2); + HermOpEO.MpcDagMpc(chi_e,dchi_e); + HermOpEO.MpcDagMpc(chi_o,dchi_o); - HermOpEO.MpcDagMpc(phi_e,dphi_e,t1,t2); - HermOpEO.MpcDagMpc(phi_o,dphi_o,t1,t2); + HermOpEO.MpcDagMpc(phi_e,dphi_e); + HermOpEO.MpcDagMpc(phi_o,dphi_o); pDce = innerProduct(phi_e,dchi_e); pDco = innerProduct(phi_o,dchi_o); diff --git a/tests/core/Test_zmobius_even_odd.cc b/tests/core/Test_zmobius_even_odd.cc index 1150930b..a52e9bc2 100644 --- a/tests/core/Test_zmobius_even_odd.cc +++ b/tests/core/Test_zmobius_even_odd.cc @@ -280,11 +280,11 @@ int main (int argc, char ** argv) SchurDiagMooeeOperator HermOpEO(Ddwf); - HermOpEO.MpcDagMpc(chi_e,dchi_e,t1,t2); - HermOpEO.MpcDagMpc(chi_o,dchi_o,t1,t2); + HermOpEO.MpcDagMpc(chi_e,dchi_e); + HermOpEO.MpcDagMpc(chi_o,dchi_o); - HermOpEO.MpcDagMpc(phi_e,dphi_e,t1,t2); - HermOpEO.MpcDagMpc(phi_o,dphi_o,t1,t2); + HermOpEO.MpcDagMpc(phi_e,dphi_e); + HermOpEO.MpcDagMpc(phi_o,dphi_o); pDce = innerProduct(phi_e,dchi_e); pDco = innerProduct(phi_o,dchi_o); diff --git a/tests/hmc/Test_multishift_sqrt.cc b/tests/hmc/Test_multishift_sqrt.cc index 834e6fc8..f8477220 100644 --- a/tests/hmc/Test_multishift_sqrt.cc +++ b/tests/hmc/Test_multishift_sqrt.cc @@ -57,6 +57,7 @@ public: // Support for coarsening to a multigrid void OpDiag (const Field &in, Field &out) {}; void OpDir (const Field &in, Field &out,int dir,int disp){}; + void OpDirAll (const Field &in, std::vector &out) {}; // Abstract base void Op (const Field &in, Field &out){ out = scale * in; diff --git a/tests/solver/Test_dwf_fpgcr.cc b/tests/solver/Test_dwf_fpgcr.cc index 226bd933..156f678a 100644 --- a/tests/solver/Test_dwf_fpgcr.cc +++ b/tests/solver/Test_dwf_fpgcr.cc @@ -70,9 +70,6 @@ int main (int argc, char ** argv) SU3::HotConfiguration(RNG4,Umu); - TrivialPrecon simple; - - PrecGeneralisedConjugateResidual PGCR(1.0e-6,10000,simple,4,160); ConjugateResidual CR(1.0e-6,10000); @@ -86,15 +83,19 @@ int main (int argc, char ** argv) std::cout< HermOp(Ddwf); + TrivialPrecon simple; + PrecGeneralisedConjugateResidual PGCR(1.0e-6,10000,HermOp,simple,4,160); + result=Zero(); - PGCR(HermOp,src,result); + PGCR(src,result); std::cout< g5HermOp(Ddwf); + PrecGeneralisedConjugateResidual PGCR5(1.0e-6,10000,g5HermOp,simple,4,160); result=Zero(); - PGCR(g5HermOp,src,result); + PGCR5(src,result); std::cout<