From a4ce6e42c7814853be1c5342ede2c1d979e60553 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Wed, 27 Oct 2021 00:27:03 +0100 Subject: [PATCH] Warning free compile on make all and make tests under nvcc --- Grid/algorithms/CoarsenedMatrix.h | 8 +++--- Grid/algorithms/LinearOperator.h | 4 ++- Grid/algorithms/Preconditioner.h | 10 +++++-- Grid/algorithms/iterative/BiCGSTABMixedPrec.h | 3 +- .../iterative/LocalCoherenceLanczos.h | 2 ++ .../PrecGeneralisedConjugateResidual.h | 2 +- ...GeneralisedConjugateResidualNonHermitian.h | 11 ++++---- Grid/tensors/Tensor_traits.h | 6 ++-- examples/Example_Laplacian_solver.cc | 2 +- tests/core/Test_contfrac_even_odd.cc | 1 - tests/core/Test_dwf_eofa_even_odd.cc | 1 - tests/core/Test_dwf_even_odd.cc | 2 -- tests/core/Test_gamma.cc | 4 +-- tests/core/Test_gpwilson_even_odd.cc | 1 - tests/core/Test_main.cc | 12 ++++---- tests/core/Test_mobius_eofa_even_odd.cc | 1 - tests/core/Test_mobius_even_odd.cc | 1 - tests/core/Test_staggered.cc | 2 +- tests/core/Test_staggered5D.cc | 1 - tests/core/Test_staggered_naive.cc | 2 -- tests/core/Test_wilson_even_odd.cc | 1 - .../core/Test_wilson_twisted_mass_even_odd.cc | 1 - tests/core/Test_zmobius_even_odd.cc | 1 - tests/forces/Test_rect_force.cc | 1 - ..._dwf_compressed_lanczos_reorg_synthetic.cc | 3 ++ tests/solver/Test_dwf_hdcr.cc | 3 ++ tests/solver/Test_dwf_hdcr_16_rb.cc | 9 ++++-- tests/solver/Test_dwf_hdcr_24_regression.cc | 4 +++ tests/solver/Test_dwf_hdcr_2level.cc | 8 ++++-- tests/solver/Test_dwf_hdcr_48_rb.cc | 5 +++- tests/solver/Test_dwf_hdcr_48_regression.cc | 3 ++ tests/solver/Test_dwf_multigrid.cc | 3 ++ tests/solver/Test_hw_multigrid_mixed_48.cc | 21 ++++++++------ tests/solver/Test_hw_multigrid_mixed_48_rb.cc | 28 +++++++++++-------- tests/solver/Test_multigrid_common.h | 3 ++ tests/solver/Test_wilson_qmr_unprec.cc | 1 - 36 files changed, 101 insertions(+), 70 deletions(-) diff --git a/Grid/algorithms/CoarsenedMatrix.h b/Grid/algorithms/CoarsenedMatrix.h index 2fd187ff..a9a82f34 100644 --- a/Grid/algorithms/CoarsenedMatrix.h +++ b/Grid/algorithms/CoarsenedMatrix.h @@ -358,7 +358,7 @@ public: autoView( in_v , in, AcceleratorRead); autoView( out_v , out, AcceleratorWrite); autoView( Stencil_v , Stencil, AcceleratorRead); - auto& geom_v = geom; + int npoint = geom.npoint; typedef LatticeView Aview; Vector AcceleratorViewContainer; @@ -380,7 +380,7 @@ public: int ptype; StencilEntry *SE; - for(int point=0;point Aview; Vector AcceleratorViewContainer; @@ -454,7 +454,7 @@ public: int ptype; StencilEntry *SE; - for(int p=0;p { virtual void MpcDag (const Field &in, Field &out){ Mpc(in,out); } - virtual void MpcDagMpc(const Field &in, Field &out,RealD &ni,RealD &no) { + virtual void MpcDagMpc(const Field &in, Field &out) { assert(0);// Never need with staggered } }; @@ -586,6 +586,7 @@ class HermOpOperatorFunction : public OperatorFunction { template class PlainHermOp : public LinearFunction { public: + using LinearFunction::operator(); LinearOperatorBase &_Linop; PlainHermOp(LinearOperatorBase& linop) : _Linop(linop) @@ -599,6 +600,7 @@ public: template class FunctionHermOp : public LinearFunction { public: + using LinearFunction::operator(); OperatorFunction & _poly; LinearOperatorBase &_Linop; diff --git a/Grid/algorithms/Preconditioner.h b/Grid/algorithms/Preconditioner.h index 65ac3cf9..a95dad7c 100644 --- a/Grid/algorithms/Preconditioner.h +++ b/Grid/algorithms/Preconditioner.h @@ -30,13 +30,19 @@ Author: Azusa Yamaguchi NAMESPACE_BEGIN(Grid); -template class Preconditioner : public LinearFunction { +template using Preconditioner = LinearFunction ; + +/* +template class Preconditioner : public LinearFunction { + using LinearFunction::operator(); virtual void operator()(const Field &src, Field & psi)=0; }; +*/ template class TrivialPrecon : public Preconditioner { public: - void operator()(const Field &src, Field & psi){ + using Preconditioner::operator(); + virtual void operator()(const Field &src, Field & psi){ psi = src; } TrivialPrecon(void){}; diff --git a/Grid/algorithms/iterative/BiCGSTABMixedPrec.h b/Grid/algorithms/iterative/BiCGSTABMixedPrec.h index d9b2a9d7..c34035a8 100644 --- a/Grid/algorithms/iterative/BiCGSTABMixedPrec.h +++ b/Grid/algorithms/iterative/BiCGSTABMixedPrec.h @@ -36,7 +36,8 @@ NAMESPACE_BEGIN(Grid); template::value == 2, int>::type = 0, typename std::enable_if< getPrecision::value == 1, int>::type = 0> class MixedPrecisionBiCGSTAB : public LinearFunction { - public: + public: + using LinearFunction::operator(); RealD Tolerance; RealD InnerTolerance; // Initial tolerance for inner CG. Defaults to Tolerance but can be changed Integer MaxInnerIterations; diff --git a/Grid/algorithms/iterative/LocalCoherenceLanczos.h b/Grid/algorithms/iterative/LocalCoherenceLanczos.h index 9c945565..dc82134a 100644 --- a/Grid/algorithms/iterative/LocalCoherenceLanczos.h +++ b/Grid/algorithms/iterative/LocalCoherenceLanczos.h @@ -67,6 +67,7 @@ public: template class ProjectedHermOp : public LinearFunction > > { public: + using LinearFunction > >::operator(); typedef iVector CoarseSiteVector; typedef Lattice CoarseField; typedef Lattice CoarseScalar; // used for inner products on fine field @@ -97,6 +98,7 @@ public: template class ProjectedFunctionHermOp : public LinearFunction > > { public: + using LinearFunction > >::operator(); typedef iVector CoarseSiteVector; typedef Lattice CoarseField; typedef Lattice CoarseScalar; // used for inner products on fine field diff --git a/Grid/algorithms/iterative/PrecGeneralisedConjugateResidual.h b/Grid/algorithms/iterative/PrecGeneralisedConjugateResidual.h index bf454ade..feceb21f 100644 --- a/Grid/algorithms/iterative/PrecGeneralisedConjugateResidual.h +++ b/Grid/algorithms/iterative/PrecGeneralisedConjugateResidual.h @@ -43,7 +43,7 @@ NAMESPACE_BEGIN(Grid); template class PrecGeneralisedConjugateResidual : public LinearFunction { public: - + using LinearFunction::operator(); RealD Tolerance; Integer MaxIterations; int verbose; diff --git a/Grid/algorithms/iterative/PrecGeneralisedConjugateResidualNonHermitian.h b/Grid/algorithms/iterative/PrecGeneralisedConjugateResidualNonHermitian.h index 22b7725e..181df320 100644 --- a/Grid/algorithms/iterative/PrecGeneralisedConjugateResidualNonHermitian.h +++ b/Grid/algorithms/iterative/PrecGeneralisedConjugateResidualNonHermitian.h @@ -43,7 +43,7 @@ NAMESPACE_BEGIN(Grid); template class PrecGeneralisedConjugateResidualNonHermitian : public LinearFunction { public: - + using LinearFunction::operator(); RealD Tolerance; Integer MaxIterations; int verbose; @@ -119,7 +119,8 @@ public: RealD GCRnStep(const Field &src, Field &psi,RealD rsq){ RealD cp; - ComplexD a, b, zAz; + ComplexD a, b; + // ComplexD zAz; RealD zAAz; ComplexD rq; @@ -146,7 +147,7 @@ public: ////////////////////////////////// MatTimer.Start(); Linop.Op(psi,Az); - zAz = innerProduct(Az,psi); + // zAz = innerProduct(Az,psi); zAAz= norm2(Az); MatTimer.Stop(); @@ -170,7 +171,7 @@ public: LinalgTimer.Start(); - zAz = innerProduct(Az,psi); + // zAz = innerProduct(Az,psi); zAAz= norm2(Az); //p[0],q[0],qq[0] @@ -212,7 +213,7 @@ public: MatTimer.Start(); Linop.Op(z,Az); MatTimer.Stop(); - zAz = innerProduct(Az,psi); + // zAz = innerProduct(Az,psi); zAAz= norm2(Az); LinalgTimer.Start(); diff --git a/Grid/tensors/Tensor_traits.h b/Grid/tensors/Tensor_traits.h index dfa3c043..89290214 100644 --- a/Grid/tensors/Tensor_traits.h +++ b/Grid/tensors/Tensor_traits.h @@ -47,20 +47,20 @@ NAMESPACE_BEGIN(Grid); class TypePair { public: T _internal[2]; - TypePair& operator=(const Grid::Zero& o) { + accelerator TypePair& operator=(const Grid::Zero& o) { _internal[0] = Zero(); _internal[1] = Zero(); return *this; } - TypePair operator+(const TypePair& o) const { + accelerator TypePair operator+(const TypePair& o) const { TypePair r; r._internal[0] = _internal[0] + o._internal[0]; r._internal[1] = _internal[1] + o._internal[1]; return r; } - TypePair& operator+=(const TypePair& o) { + accelerator TypePair& operator+=(const TypePair& o) { _internal[0] += o._internal[0]; _internal[1] += o._internal[1]; return *this; diff --git a/examples/Example_Laplacian_solver.cc b/examples/Example_Laplacian_solver.cc index 4dc00280..9a584c0f 100644 --- a/examples/Example_Laplacian_solver.cc +++ b/examples/Example_Laplacian_solver.cc @@ -4,7 +4,7 @@ using namespace Grid; template void SimpleConjugateGradient(LinearOperatorBase &HPDop,const Field &b, Field &x) { - RealD cp, c, alpha, d, beta, ssq, qq; + RealD cp, c, alpha, d, beta, ssq; RealD Tolerance=1.0e-10; int MaxIterations=10000; diff --git a/tests/core/Test_contfrac_even_odd.cc b/tests/core/Test_contfrac_even_odd.cc index 53d00010..42bfe361 100644 --- a/tests/core/Test_contfrac_even_odd.cc +++ b/tests/core/Test_contfrac_even_odd.cc @@ -235,7 +235,6 @@ void TestWhat(What & Ddwf, pickCheckerboard(Odd ,chi_o,chi); pickCheckerboard(Even,phi_e,phi); pickCheckerboard(Odd ,phi_o,phi); - RealD t1,t2; SchurDiagMooeeOperator HermOpEO(Ddwf); HermOpEO.MpcDagMpc(chi_e,dchi_e); diff --git a/tests/core/Test_dwf_eofa_even_odd.cc b/tests/core/Test_dwf_eofa_even_odd.cc index 64701069..7812ebb8 100644 --- a/tests/core/Test_dwf_eofa_even_odd.cc +++ b/tests/core/Test_dwf_eofa_even_odd.cc @@ -215,7 +215,6 @@ int main (int argc, char ** argv) pickCheckerboard(Odd , chi_o, chi); pickCheckerboard(Even, phi_e, phi); pickCheckerboard(Odd , phi_o, phi); - RealD t1,t2; SchurDiagMooeeOperator HermOpEO(Ddwf); HermOpEO.MpcDagMpc(chi_e, dchi_e); diff --git a/tests/core/Test_dwf_even_odd.cc b/tests/core/Test_dwf_even_odd.cc index 4918f02a..924eb3b7 100644 --- a/tests/core/Test_dwf_even_odd.cc +++ b/tests/core/Test_dwf_even_odd.cc @@ -212,8 +212,6 @@ int main (int argc, char ** argv) pickCheckerboard(Odd ,chi_o,chi); pickCheckerboard(Even,phi_e,phi); pickCheckerboard(Odd ,phi_o,phi); - RealD t1,t2; - SchurDiagMooeeOperator HermOpEO(Ddwf); HermOpEO.MpcDagMpc(chi_e,dchi_e); diff --git a/tests/core/Test_gamma.cc b/tests/core/Test_gamma.cc index 2658f2c1..e52049fe 100644 --- a/tests/core/Test_gamma.cc +++ b/tests/core/Test_gamma.cc @@ -181,8 +181,8 @@ void checkAdj(const Gamma::Algebra a) void checkProject(GridSerialRNG &rng) { - SpinVector rv, recon, full; - HalfSpinVector hsp, hsm; + SpinVector rv, recon; + HalfSpinVector hsm; random(rng, rv); diff --git a/tests/core/Test_gpwilson_even_odd.cc b/tests/core/Test_gpwilson_even_odd.cc index 69ace859..d510657e 100644 --- a/tests/core/Test_gpwilson_even_odd.cc +++ b/tests/core/Test_gpwilson_even_odd.cc @@ -198,7 +198,6 @@ int main (int argc, char ** argv) pickCheckerboard(Odd ,chi_o,chi); pickCheckerboard(Even,phi_e,phi); pickCheckerboard(Odd ,phi_o,phi); - RealD t1,t2; SchurDiagMooeeOperator HermOpEO(Dw); HermOpEO.MpcDagMpc(chi_e,dchi_e); diff --git a/tests/core/Test_main.cc b/tests/core/Test_main.cc index 6e316aa6..25d840a6 100644 --- a/tests/core/Test_main.cc +++ b/tests/core/Test_main.cc @@ -364,14 +364,12 @@ int main(int argc, char **argv) { { // Peek-ology and Poke-ology, with a little app-ology Complex c; - ColourMatrix c_m; - SpinMatrix s_m; - SpinColourMatrix sc_m; + ColourMatrix c_m = Zero(); + SpinMatrix s_m = Zero(); + SpinColourMatrix sc_m = Zero(); - s_m = TensorIndexRecursion::traceIndex( - sc_m); // Map to traceColour - c_m = TensorIndexRecursion::traceIndex( - sc_m); // map to traceSpin + s_m = TensorIndexRecursion::traceIndex(sc_m); // Map to traceColour + c_m = TensorIndexRecursion::traceIndex(sc_m); // map to traceSpin c = TensorIndexRecursion::traceIndex(s_m); c = TensorIndexRecursion::traceIndex(c_m); diff --git a/tests/core/Test_mobius_eofa_even_odd.cc b/tests/core/Test_mobius_eofa_even_odd.cc index 7339f156..68ffe624 100644 --- a/tests/core/Test_mobius_eofa_even_odd.cc +++ b/tests/core/Test_mobius_eofa_even_odd.cc @@ -217,7 +217,6 @@ int main (int argc, char ** argv) pickCheckerboard(Odd , chi_o, chi); pickCheckerboard(Even, phi_e, phi); pickCheckerboard(Odd , phi_o, phi); - RealD t1,t2; SchurDiagMooeeOperator HermOpEO(Ddwf); HermOpEO.MpcDagMpc(chi_e, dchi_e); diff --git a/tests/core/Test_mobius_even_odd.cc b/tests/core/Test_mobius_even_odd.cc index 7f808cac..e210f236 100644 --- a/tests/core/Test_mobius_even_odd.cc +++ b/tests/core/Test_mobius_even_odd.cc @@ -262,7 +262,6 @@ int main (int argc, char ** argv) pickCheckerboard(Odd ,chi_o,chi); pickCheckerboard(Even,phi_e,phi); pickCheckerboard(Odd ,phi_o,phi); - RealD t1,t2; SchurDiagMooeeOperator HermOpEO(Ddwf); diff --git a/tests/core/Test_staggered.cc b/tests/core/Test_staggered.cc index 51f92993..ba615ad2 100644 --- a/tests/core/Test_staggered.cc +++ b/tests/core/Test_staggered.cc @@ -144,7 +144,7 @@ int main (int argc, char ** argv) Ds.Dhop(src,result,0); } double t1=usecond(); - double t2; + double flops=(16*(3*(6+8+8)) + 15*3*2)*volume*ncall; // == 66*16 + == 1146 std::cout< using namespace std; using namespace Grid; - ; int main (int argc, char ** argv) { @@ -135,7 +134,6 @@ int main (int argc, char ** argv) Ds.Dhop(src,result,0); } double t1=usecond(); - double t2; double flops=(16*(3*(6+8+8)) + 15*3*2)*volume*ncall; // == 66*16 + == 1146 std::cout< HermOpEO(Dw); HermOpEO.MpcDagMpc(chi_e,dchi_e); diff --git a/tests/core/Test_wilson_twisted_mass_even_odd.cc b/tests/core/Test_wilson_twisted_mass_even_odd.cc index e0f73456..d9e798c3 100644 --- a/tests/core/Test_wilson_twisted_mass_even_odd.cc +++ b/tests/core/Test_wilson_twisted_mass_even_odd.cc @@ -205,7 +205,6 @@ int main (int argc, char ** argv) pickCheckerboard(Odd ,chi_o,chi); pickCheckerboard(Even,phi_e,phi); pickCheckerboard(Odd ,phi_o,phi); - RealD t1,t2; SchurDiagMooeeOperator HermOpEO(Dw); HermOpEO.MpcDagMpc(chi_e,dchi_e); diff --git a/tests/core/Test_zmobius_even_odd.cc b/tests/core/Test_zmobius_even_odd.cc index a52e9bc2..f6e18934 100644 --- a/tests/core/Test_zmobius_even_odd.cc +++ b/tests/core/Test_zmobius_even_odd.cc @@ -276,7 +276,6 @@ int main (int argc, char ** argv) pickCheckerboard(Odd ,chi_o,chi); pickCheckerboard(Even,phi_e,phi); pickCheckerboard(Odd ,phi_o,phi); - RealD t1,t2; SchurDiagMooeeOperator HermOpEO(Ddwf); diff --git a/tests/forces/Test_rect_force.cc b/tests/forces/Test_rect_force.cc index c9326f8d..e40cb5fd 100644 --- a/tests/forces/Test_rect_force.cc +++ b/tests/forces/Test_rect_force.cc @@ -57,7 +57,6 @@ int main (int argc, char ** argv) SU::HotConfiguration(pRNG,U); double beta = 1.0; - double c1 = -0.331; IwasakiGaugeActionR Action(beta); // PlaqPlusRectangleActionR Action(beta,c1); diff --git a/tests/lanczos/Test_dwf_compressed_lanczos_reorg_synthetic.cc b/tests/lanczos/Test_dwf_compressed_lanczos_reorg_synthetic.cc index 3766e069..f3cb567c 100644 --- a/tests/lanczos/Test_dwf_compressed_lanczos_reorg_synthetic.cc +++ b/tests/lanczos/Test_dwf_compressed_lanczos_reorg_synthetic.cc @@ -40,6 +40,7 @@ using namespace Grid; template class ProjectedHermOp : public LinearFunction > > { public: + using LinearFunction > >::operator(); typedef iVector CoarseSiteVector; typedef Lattice CoarseField; typedef Lattice CoarseScalar; // used for inner products on fine field @@ -67,6 +68,8 @@ public: template class ProjectedFunctionHermOp : public LinearFunction > > { public: + using LinearFunction > >::operator (); + typedef iVector CoarseSiteVector; typedef Lattice CoarseField; typedef Lattice CoarseScalar; // used for inner products on fine field diff --git a/tests/solver/Test_dwf_hdcr.cc b/tests/solver/Test_dwf_hdcr.cc index f68e99ab..ba77dffa 100644 --- a/tests/solver/Test_dwf_hdcr.cc +++ b/tests/solver/Test_dwf_hdcr.cc @@ -55,6 +55,7 @@ RealD InverseApproximation(RealD x){ template class ChebyshevSmoother : public LinearFunction { public: + using LinearFunction::operator(); typedef LinearOperatorBase FineOperator; Matrix & _SmootherMatrix; FineOperator & _SmootherOperator; @@ -78,6 +79,7 @@ public: template class MirsSmoother : public LinearFunction { public: + using LinearFunction::operator(); typedef LinearOperatorBase FineOperator; Matrix & SmootherMatrix; FineOperator & SmootherOperator; @@ -108,6 +110,7 @@ public: template class MultiGridPreconditioner : public LinearFunction< Lattice > { public: + using LinearFunction >::operator(); typedef Aggregation Aggregates; typedef CoarsenedMatrix CoarseOperator; diff --git a/tests/solver/Test_dwf_hdcr_16_rb.cc b/tests/solver/Test_dwf_hdcr_16_rb.cc index b7900b04..4682272d 100644 --- a/tests/solver/Test_dwf_hdcr_16_rb.cc +++ b/tests/solver/Test_dwf_hdcr_16_rb.cc @@ -56,9 +56,9 @@ template class SolverWrapper : public LinearFunction { private: CheckerBoardedSparseMatrixBase & _Matrix; SchurRedBlackBase & _Solver; -public: - - ///////////////////////////////////////////////////// +public: + using LinearFunction::operator(); + ///////////////////////////////////////////////////// // Wrap the usual normal equations trick ///////////////////////////////////////////////////// SolverWrapper(CheckerBoardedSparseMatrixBase &Matrix, @@ -75,6 +75,7 @@ public: template class ChebyshevSmoother : public LinearFunction { public: + using LinearFunction::operator(); typedef LinearOperatorBase FineOperator; Matrix & _SmootherMatrix; FineOperator & _SmootherOperator; @@ -98,6 +99,7 @@ public: template class MirsSmoother : public LinearFunction { public: + using LinearFunction::operator(); typedef LinearOperatorBase FineOperator; Matrix & SmootherMatrix; FineOperator & SmootherOperator; @@ -128,6 +130,7 @@ public: template class MultiGridPreconditioner : public LinearFunction< Lattice > { public: + using LinearFunction >::operator(); typedef Aggregation Aggregates; typedef CoarsenedMatrix CoarseOperator; diff --git a/tests/solver/Test_dwf_hdcr_24_regression.cc b/tests/solver/Test_dwf_hdcr_24_regression.cc index 180b2e00..e6363474 100644 --- a/tests/solver/Test_dwf_hdcr_24_regression.cc +++ b/tests/solver/Test_dwf_hdcr_24_regression.cc @@ -55,6 +55,7 @@ RealD InverseApproximation(RealD x){ template class ChebyshevSmoother : public LinearFunction { public: + using LinearFunction::operator(); typedef LinearOperatorBase FineOperator; Matrix & _SmootherMatrix; FineOperator & _SmootherOperator; @@ -78,6 +79,7 @@ public: template class MirsSmoother : public LinearFunction { public: + using LinearFunction::operator(); typedef LinearOperatorBase FineOperator; Matrix & SmootherMatrix; FineOperator & SmootherOperator; @@ -108,6 +110,8 @@ public: template class MultiGridPreconditioner : public LinearFunction< Lattice > { public: + + using LinearFunction >::operator(); typedef Aggregation Aggregates; typedef CoarsenedMatrix CoarseOperator; diff --git a/tests/solver/Test_dwf_hdcr_2level.cc b/tests/solver/Test_dwf_hdcr_2level.cc index 4fa1e302..819f3464 100644 --- a/tests/solver/Test_dwf_hdcr_2level.cc +++ b/tests/solver/Test_dwf_hdcr_2level.cc @@ -56,6 +56,7 @@ RealD InverseApproximation(RealD x){ template class ChebyshevSmoother : public LinearFunction { public: + using LinearFunction::operator(); typedef LinearOperatorBase FineOperator; Matrix & _SmootherMatrix; FineOperator & _SmootherOperator; @@ -79,6 +80,7 @@ public: template class MirsSmoother : public LinearFunction { public: + using LinearFunction::operator(); typedef LinearOperatorBase FineOperator; Matrix & SmootherMatrix; FineOperator & SmootherOperator; @@ -108,6 +110,7 @@ public: template class RedBlackSmoother : public LinearFunction { public: + using LinearFunction::operator(); typedef LinearOperatorBase FineOperator; Matrix & SmootherMatrix; RealD tol; @@ -134,6 +137,7 @@ public: template class MultiGridPreconditioner : public LinearFunction< Lattice > { public: + using LinearFunction >::operator(); typedef Aggregation Aggregates; typedef CoarsenedMatrix CoarseOperator; @@ -241,7 +245,7 @@ int main (int argc, char ** argv) Grid_init(&argc,&argv); const int Ls=16; - const int rLs=8; + // const int rLs=8; GridCartesian * UGrid = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), GridDefaultSimd(Nd,vComplex::Nsimd()),GridDefaultMpi()); GridRedBlackCartesian * UrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(UGrid); @@ -388,7 +392,7 @@ int main (int argc, char ** argv) // RedBlackSmoother FineRBSmoother(0.00,0.001,100,Ddwf); // Wrap the 2nd level solver in a MultiGrid preconditioner acting on the fine space - ZeroGuesser CoarseZeroGuesser; + // ZeroGuesser CoarseZeroGuesser; TwoLevelMG TwoLevelPrecon(Aggregates, LDOp, HermIndefOp,Ddwf, FineSmoother, diff --git a/tests/solver/Test_dwf_hdcr_48_rb.cc b/tests/solver/Test_dwf_hdcr_48_rb.cc index a4d7bbb9..2b76681e 100644 --- a/tests/solver/Test_dwf_hdcr_48_rb.cc +++ b/tests/solver/Test_dwf_hdcr_48_rb.cc @@ -57,7 +57,7 @@ private: CheckerBoardedSparseMatrixBase & _Matrix; SchurRedBlackBase & _Solver; public: - + using LinearFunction::operator(); ///////////////////////////////////////////////////// // Wrap the usual normal equations trick ///////////////////////////////////////////////////// @@ -75,6 +75,7 @@ public: template class ChebyshevSmoother : public LinearFunction { public: + using LinearFunction::operator(); typedef LinearOperatorBase FineOperator; Matrix & _SmootherMatrix; FineOperator & _SmootherOperator; @@ -98,6 +99,7 @@ public: template class MirsSmoother : public LinearFunction { public: + using LinearFunction::operator(); typedef LinearOperatorBase FineOperator; Matrix & SmootherMatrix; FineOperator & SmootherOperator; @@ -128,6 +130,7 @@ public: template class MultiGridPreconditioner : public LinearFunction< Lattice > { public: + using LinearFunction >::operator(); typedef Aggregation Aggregates; typedef CoarsenedMatrix CoarseOperator; diff --git a/tests/solver/Test_dwf_hdcr_48_regression.cc b/tests/solver/Test_dwf_hdcr_48_regression.cc index d07bd3a5..4dbb097b 100644 --- a/tests/solver/Test_dwf_hdcr_48_regression.cc +++ b/tests/solver/Test_dwf_hdcr_48_regression.cc @@ -55,6 +55,7 @@ RealD InverseApproximation(RealD x){ template class ChebyshevSmoother : public LinearFunction { public: + using LinearFunction::operator(); typedef LinearOperatorBase FineOperator; Matrix & _SmootherMatrix; FineOperator & _SmootherOperator; @@ -78,6 +79,7 @@ public: template class MirsSmoother : public LinearFunction { public: + using LinearFunction::operator(); typedef LinearOperatorBase FineOperator; Matrix & SmootherMatrix; FineOperator & SmootherOperator; @@ -108,6 +110,7 @@ public: template class MultiGridPreconditioner : public LinearFunction< Lattice > { public: + using LinearFunction >::operator(); typedef Aggregation Aggregates; typedef CoarsenedMatrix CoarseOperator; diff --git a/tests/solver/Test_dwf_multigrid.cc b/tests/solver/Test_dwf_multigrid.cc index 351e10fd..e670b358 100644 --- a/tests/solver/Test_dwf_multigrid.cc +++ b/tests/solver/Test_dwf_multigrid.cc @@ -57,6 +57,7 @@ private: OperatorFunction & _Solver; LinearFunction & _Guess; public: + using LinearFunction::operator(); ///////////////////////////////////////////////////// // Wrap the usual normal equations trick @@ -118,6 +119,7 @@ RealD InverseApproximation(RealD x){ template class ChebyshevSmoother : public LinearFunction { public: + using LinearFunction::operator(); typedef LinearOperatorBase FineOperator; Matrix & _SmootherMatrix; FineOperator & _SmootherOperator; @@ -174,6 +176,7 @@ public: template class HDCRPreconditioner : public LinearFunction< Lattice > { public: + using LinearFunction >::operator(); typedef Aggregation Aggregates; typedef CoarsenedMatrix CoarseOperator; diff --git a/tests/solver/Test_hw_multigrid_mixed_48.cc b/tests/solver/Test_hw_multigrid_mixed_48.cc index 6b3b5f56..0e8d6a17 100644 --- a/tests/solver/Test_hw_multigrid_mixed_48.cc +++ b/tests/solver/Test_hw_multigrid_mixed_48.cc @@ -456,8 +456,8 @@ public: siteVector *CBp=Stencil.CommBuf(); - int ptype; - int nb2=nbasis/2; + // int ptype; + // int nb2=nbasis/2; autoView(in_v , in, AcceleratorRead); autoView(st, Stencil, AcceleratorRead); @@ -471,7 +471,7 @@ public: typedef decltype(coalescedRead(in_v[0])) calcVector; typedef decltype(coalescedRead(in_v[0](0))) calcComplex; int sU = sF/Ls; - int s = sF%Ls; + // int s = sF%Ls; calcComplex res = Zero(); calcVector nbr; @@ -517,14 +517,14 @@ public: autoView(st, Stencil, AcceleratorRead); siteVector *CBp=Stencil.CommBuf(); - int ptype; - int nb2=nbasis/2; + // int ptype; + // int nb2=nbasis/2; accelerator_for2d(sF, Coarse5D->oSites(), b, nbasis, Nsimd, { typedef decltype(coalescedRead(in_v[0])) calcVector; typedef decltype(coalescedRead(in_v[0](0))) calcComplex; int sU = sF/Ls; - int s = sF%Ls; + // int s = sF%Ls; calcComplex res = Zero(); @@ -650,7 +650,7 @@ private: OperatorFunction & _Solver; LinearFunction & _Guess; public: - + using LinearFunction::operator(); ///////////////////////////////////////////////////// // Wrap the usual normal equations trick ///////////////////////////////////////////////////// @@ -712,6 +712,7 @@ RealD InverseApproximation(RealD x){ template class ChebyshevSmoother : public LinearFunction { public: + using LinearFunction::operator(); typedef LinearOperatorBase FineOperator; Matrix & _SmootherMatrix; FineOperator & _SmootherOperator; @@ -735,6 +736,7 @@ public: template class MGPreconditioner : public LinearFunction< Lattice > { public: + using LinearFunction >::operator(); typedef Aggregation Aggregates; typedef typename Aggregation::CoarseVector CoarseVector; @@ -831,6 +833,7 @@ public: template class HDCRPreconditioner : public LinearFunction< Lattice > { public: + using LinearFunction >::operator(); typedef Aggregation Aggregates; typedef typename Aggregation::CoarseVector CoarseVector; @@ -1174,18 +1177,18 @@ int main (int argc, char ** argv) PlainHermOp IRLOpL2 (IRLHermOpL2); ImplicitlyRestartedLanczos IRLL2(IRLOpChebyL2,IRLOpL2,cNstop,cNk,cNm,1.0e-3,20); - int cNconv; cNm=0; std::vector eval2(cNm); std::vector evec2(cNm,CoarseCoarse5d); cc_src=1.0; + // int cNconv; // IRLL2.calc(eval2,evec2,cc_src,cNconv); ConjugateGradient CoarseCoarseCG(0.02,10000); DeflatedGuesser DeflCoarseCoarseGuesser(evec2,eval2); NormalEquations DeflCoarseCoarseCGNE(cc_Dwf,CoarseCoarseCG,DeflCoarseCoarseGuesser); - ZeroGuesser CoarseZeroGuesser; + // ZeroGuesser CoarseZeroGuesser; ZeroGuesser CoarseCoarseZeroGuesser; std::cout<oSites(), b, nbasis, Nsimd, { typedef decltype(coalescedRead(in_v[0])) calcVector; typedef decltype(coalescedRead(in_v[0](0))) calcComplex; int sU = sF/Ls; - int s = sF%Ls; + // int s = sF%Ls; calcComplex res = Zero(); @@ -648,7 +648,7 @@ private: CheckerBoardedSparseMatrixBase & _Matrix; SchurRedBlackBase & _Solver; public: - + using LinearFunction::operator(); ///////////////////////////////////////////////////// // Wrap the usual normal equations trick ///////////////////////////////////////////////////// @@ -669,6 +669,7 @@ private: OperatorFunction & _Solver; LinearFunction & _Guess; public: + using LinearFunction::operator(); ///////////////////////////////////////////////////// // Wrap the usual normal equations trick @@ -731,6 +732,7 @@ RealD InverseApproximation(RealD x){ template class ChebyshevSmoother : public LinearFunction { public: + using LinearFunction::operator(); typedef LinearOperatorBase FineOperator; Matrix & _SmootherMatrix; FineOperator & _SmootherOperator; @@ -754,6 +756,7 @@ public: template class MGPreconditioner : public LinearFunction< Lattice > { public: + using LinearFunction >::operator(); typedef Aggregation Aggregates; typedef typename Aggregation::CoarseVector CoarseVector; @@ -850,7 +853,8 @@ public: template class HDCRPreconditioner : public LinearFunction< Lattice > { public: - + using LinearFunction >::operator(); + typedef Aggregation Aggregates; typedef typename Aggregation::CoarseVector CoarseVector; typedef typename Aggregation::CoarseMatrix CoarseMatrix; @@ -1194,11 +1198,11 @@ int main (int argc, char ** argv) PlainHermOp IRLOpL2 (IRLHermOpL2); ImplicitlyRestartedLanczos IRLL2(IRLOpChebyL2,IRLOpL2,cNstop,cNk,cNm,1.0e-3,20); - int cNconv; cNm=0; std::vector eval2(cNm); std::vector evec2(cNm,CoarseCoarse5d); cc_src=1.0; + // int cNconv; // IRLL2.calc(eval2,evec2,cc_src,cNconv); std::vector tols ({0.005,0.001}); @@ -1218,10 +1222,10 @@ int main (int argc, char ** argv) for(auto c_hi : c_his ) { for(auto f_lo : f_los ) { for(auto f_hi : f_his ) { - ZeroGuesser CoarseZeroGuesser; - ZeroGuesser CoarseCoarseZeroGuesser; + // ZeroGuesser CoarseZeroGuesser; + // ZeroGuesser CoarseCoarseZeroGuesser; ConjugateGradient CoarseCoarseCG(tol,10000); - ZeroGuesser CoarseCoarseGuesser; + // ZeroGuesser CoarseCoarseGuesser; SchurRedBlackDiagMooeeSolve CoarseCoarseRBCG(CoarseCoarseCG); SchurSolverWrapper CoarseCoarseSolver(cc_Dwf,CoarseCoarseRBCG); diff --git a/tests/solver/Test_multigrid_common.h b/tests/solver/Test_multigrid_common.h index 22743b72..0cb63530 100644 --- a/tests/solver/Test_multigrid_common.h +++ b/tests/solver/Test_multigrid_common.h @@ -143,6 +143,7 @@ public: template class MultiGridPreconditionerBase : public LinearFunction { public: + using LinearFunction::operator(); virtual ~MultiGridPreconditionerBase() = default; virtual void setup() = 0; virtual void operator()(Field const &in, Field &out) = 0; @@ -156,6 +157,7 @@ public: ///////////////////////////////////////////// // Type Definitions ///////////////////////////////////////////// + using MultiGridPreconditionerBase>::operator(); // clang-format off typedef Aggregation Aggregates; @@ -568,6 +570,7 @@ public: ///////////////////////////////////////////// // Type Definitions ///////////////////////////////////////////// + using MultiGridPreconditionerBase>::operator(); typedef Matrix FineDiracMatrix; typedef Lattice FineVector; diff --git a/tests/solver/Test_wilson_qmr_unprec.cc b/tests/solver/Test_wilson_qmr_unprec.cc index 45e241e6..c0b42a28 100644 --- a/tests/solver/Test_wilson_qmr_unprec.cc +++ b/tests/solver/Test_wilson_qmr_unprec.cc @@ -56,7 +56,6 @@ int main (int argc, char ** argv) QuasiMinimalResidual QMR(1.0e-8,10000); RealD mass=0.0; - RealD M5=1.8; WilsonFermionR Dw(Umu,*Grid,*rbGrid,mass); NonHermitianLinearOperator NonHermOp(Dw);