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/parallelIO/IldgIO.h b/Grid/parallelIO/IldgIO.h index 9ed773dd..576f08bd 100644 --- a/Grid/parallelIO/IldgIO.h +++ b/Grid/parallelIO/IldgIO.h @@ -576,7 +576,8 @@ class ScidacReader : public GridLimeReader { std::string rec_name(ILDG_BINARY_DATA); while ( limeReaderNextRecord(LimeR) == LIME_SUCCESS ) { if ( !strncmp(limeReaderType(LimeR), rec_name.c_str(),strlen(rec_name.c_str()) ) ) { - skipPastObjectRecord(std::string(GRID_FIELD_NORM)); + // in principle should do the line below, but that breaks backard compatibility with old data + // skipPastObjectRecord(std::string(GRID_FIELD_NORM)); skipPastObjectRecord(std::string(SCIDAC_CHECKSUM)); return; } diff --git a/Grid/qcd/action/fermion/implementation/CayleyFermion5DImplementation.h b/Grid/qcd/action/fermion/implementation/CayleyFermion5DImplementation.h index 1ed66bda..1e2b13e3 100644 --- a/Grid/qcd/action/fermion/implementation/CayleyFermion5DImplementation.h +++ b/Grid/qcd/action/fermion/implementation/CayleyFermion5DImplementation.h @@ -828,6 +828,7 @@ void CayleyFermion5D::SeqConservedCurrent(PropagatorField &q_in, #if (!defined(GRID_HIP)) int tshift = (mu == Nd-1) ? 1 : 0; + unsigned int LLt = GridDefaultLatt()[Tp]; //////////////////////////////////////////////// // GENERAL CAYLEY CASE //////////////////////////////////////////////// @@ -880,7 +881,7 @@ void CayleyFermion5D::SeqConservedCurrent(PropagatorField &q_in, } std::vector G_s(Ls,1.0); - RealD sign = 1; // sign flip for vector/tadpole + RealD sign = 1.0; // sign flip for vector/tadpole if ( curr_type == Current::Axial ) { for(int s=0;s::SeqConservedCurrent(PropagatorField &q_in, auto b=this->_b; auto c=this->_c; if ( b == 1 && c == 0 ) { - sign = -1; + sign = -1.0; } else { std::cerr << "Error: Tadpole implementation currently unavailable for non-Shamir actions." << std::endl; @@ -934,7 +935,13 @@ void CayleyFermion5D::SeqConservedCurrent(PropagatorField &q_in, tmp = Cshift(tmp,mu,-1); Impl::multLinkField(Utmp,this->Umu,tmp,mu+Nd); // Adjoint link tmp = -G_s[s]*( Utmp + gmu*Utmp ); - tmp = where((lcoor>=tmin+tshift),tmp,zz); // Mask the time + // Mask the time + if (tmax == LLt - 1 && tshift == 1){ // quick fix to include timeslice 0 if tmax + tshift is over the last timeslice + unsigned int t0 = 0; + tmp = where(((lcoor==t0) || (lcoor>=tmin+tshift)),tmp,zz); + } else { + tmp = where((lcoor>=tmin+tshift),tmp,zz); + } L_Q += where((lcoor<=tmax+tshift),tmp,zz); // Position of current complicated InsertSlice(L_Q, q_out, s , 0); 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/Grid/util/Coordinate.h b/Grid/util/Coordinate.h index 004fbc72..05b83bf9 100644 --- a/Grid/util/Coordinate.h +++ b/Grid/util/Coordinate.h @@ -88,7 +88,7 @@ public: // Coordinate class, maxdims = 8 for now. //////////////////////////////////////////////////////////////// #define GRID_MAX_LATTICE_DIMENSION (8) -#define GRID_MAX_SIMD (16) +#define GRID_MAX_SIMD (32) static constexpr int MaxDims = GRID_MAX_LATTICE_DIMENSION; 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/examples/Example_wall_wall_3pt.cc b/examples/Example_wall_wall_3pt.cc new file mode 100644 index 00000000..9ea38260 --- /dev/null +++ b/examples/Example_wall_wall_3pt.cc @@ -0,0 +1,539 @@ +/* + * Warning: This code illustrative only: not well tested, and not meant for production use + * without regression / tests being applied + */ + +#include + +using namespace std; +using namespace Grid; +typedef SpinColourMatrix Propagator; +typedef SpinColourVector Fermion; +typedef PeriodicGimplR GimplR; + +template class CovariantLaplacianCshift : public SparseMatrixBase +{ +public: + INHERIT_GIMPL_TYPES(Gimpl); + + GridBase *grid; + GaugeField U; + + CovariantLaplacianCshift(GaugeField &_U) : + grid(_U.Grid()), + U(_U) { }; + + virtual GridBase *Grid(void) { return grid; }; + + virtual void M (const Field &in, Field &out) + { + out=Zero(); + for(int mu=0;mu(U, mu); // NB: Inefficent + out = out - Gimpl::CovShiftForward(Umu,mu,in); + out = out - Gimpl::CovShiftBackward(Umu,mu,in); + out = out + 2.0*in; + } + }; + virtual void Mdag (const Field &in, Field &out) { M(in,out);}; // Laplacian is hermitian + virtual void Mdiag (const Field &in, Field &out) {assert(0);}; // Unimplemented need only for multigrid + virtual void Mdir (const Field &in, Field &out,int dir, int disp){assert(0);}; // Unimplemented need only for multigrid + virtual void MdirAll (const Field &in, std::vector &out) {assert(0);}; // Unimplemented need only for multigrid +}; + +void MakePhase(Coordinate mom,LatticeComplex &phase) +{ + GridBase *grid = phase.Grid(); + auto latt_size = grid->GlobalDimensions(); + ComplexD ci(0.0,1.0); + phase=Zero(); + + LatticeComplex coor(phase.Grid()); + for(int mu=0;mu Stout(rho); + LatticeGaugeField Utmp(Uin.Grid()); + Utmp = Uin; + for(int i=0;i::avgPlaquette(U); + + std::cout << " Initial plaquette "<::SteepestDescentGaugeFix(Ufix,xform,alpha,100000,1.0e-14, 1.0e-14,true,orthog); + + plaq=WilsonLoops::avgPlaquette(Ufix); + + std::cout << " Final plaquette "< +void GaussianSmear(LatticeGaugeField &U,Field &unsmeared,Field &smeared) +{ + typedef CovariantLaplacianCshift Laplacian_t; + Laplacian_t Laplacian(U); + + Integer Iterations = 40; + Real width = 2.0; + Real coeff = (width*width) / Real(4*Iterations); + + Field tmp(U.Grid()); + smeared=unsmeared; + // chi = (1-p^2/2N)^N kronecker + for(int n = 0; n < Iterations; ++n) { + Laplacian.M(smeared,tmp); + smeared = smeared - coeff*tmp; + std::cout << " smear iter " << n<<" " < +void Solve(Action &D,LatticePropagator &source,LatticePropagator &propagator) +{ + GridBase *UGrid = D.GaugeGrid(); + GridBase *FGrid = D.FermionGrid(); + + LatticeFermion src4 (UGrid); + LatticeFermion src5 (FGrid); + LatticeFermion result5(FGrid); + LatticeFermion result4(UGrid); + + ConjugateGradient CG(1.0e-12,100000); + SchurRedBlackDiagTwoSolve schur(CG); + ZeroGuesser ZG; // Could be a DeflatedGuesser if have eigenvectors + for(int s=0;s(src4,source,s,c); + + D.ImportPhysicalFermionSource(src4,src5); + + result5=Zero(); + schur(D,src5,result5,ZG); + std::cout<(propagator,result4,s,c); + } + } +} + +class MesonFile: Serializable { +public: + GRID_SERIALIZABLE_CLASS_MEMBERS(MesonFile, std::vector >, data); +}; + +void MesonTrace(std::string file,LatticePropagator &q1,LatticePropagator &q2,LatticeComplex &phase) +{ + const int nchannel=4; + Gamma::Algebra Gammas[nchannel][2] = { + {Gamma::Algebra::Gamma5 ,Gamma::Algebra::Gamma5}, + {Gamma::Algebra::GammaTGamma5,Gamma::Algebra::GammaTGamma5}, + {Gamma::Algebra::GammaTGamma5,Gamma::Algebra::Gamma5}, + {Gamma::Algebra::Gamma5 ,Gamma::Algebra::GammaTGamma5} + }; + + Gamma G5(Gamma::Algebra::Gamma5); + + LatticeComplex meson_CF(q1.Grid()); + MesonFile MF; + + for(int ch=0;ch meson_T; + sliceSum(meson_CF,meson_T, Tdir); + + int nt=meson_T.size(); + + std::vector corr(nt); + for(int t=0;t meson_T; + sliceSum(meson_CF,meson_T, Tdir); + + int nt=meson_T.size(); + + std::vector corr(nt); + for(int t=0;t &q1,std::vector &q2) +{ + const int nchannel=4; + Gamma::Algebra Gammas[nchannel][2] = { + {Gamma::Algebra::Gamma5 ,Gamma::Algebra::Gamma5}, + {Gamma::Algebra::GammaTGamma5,Gamma::Algebra::GammaTGamma5}, + {Gamma::Algebra::GammaTGamma5,Gamma::Algebra::Gamma5}, + {Gamma::Algebra::Gamma5 ,Gamma::Algebra::GammaTGamma5} + }; + + Gamma G5(Gamma::Algebra::Gamma5); + int nt=q1.size(); + std::vector meson_CF(nt); + MesonFile MF; + + for(int ch=0;ch corr(nt); + for(int t=0;t 1 && argv[1][0] != '-' ) + { + std::cout<::ColdConfiguration(Umu); + config="ColdConfig"; + } + // GaugeFix(Umu,Utmp); + // Umu=Utmp; + + int nsmr=3; + RealD rho=0.1; + LinkSmear(nsmr,rho,Umu,Usmr); + + + std::vector smeared_link({ 0,0,1} ); + std::vector masses({ 0.004,0.02477,0.447} ); // u/d, s, c ?? + std::vector M5s ({ 1.8,1.8,1.0} ); + std::vector bs ({ 1.0,1.0,1.5} ); // DDM + std::vector cs ({ 0.0,0.0,0.5} ); // DDM + std::vector Ls_s ({ 16,16,12} ); + std::vector FGrids; + std::vector FrbGrids; + + std::vector momenta; + momenta.push_back(Coordinate({0,0,0,0})); + momenta.push_back(Coordinate({1,0,0,0})); + momenta.push_back(Coordinate({2,0,0,0})); + + int nmass = masses.size(); + int nmom = momenta.size(); + + std::vector FermActs; + + std::cout< boundary = {1,1,1,-1}; + typedef MobiusFermionR FermionAction; + FermionAction::ImplParams Params(boundary); + + for(int m=0;m phase(nmom,UGrid); + for(int m=0;m Z2Props (nmom+nmass-1,UGrid); + std::vector GFProps (nmom+nmass-1,UGrid); + for(int p=0;p > wsnk_z2Props(nmom+nmass-1); + std::vector > wsnk_gfProps(nmom+nmass-1); + + // Non-zero kaon and point and D two point + // WW stick momentum on m1 (lighter) + // zero momentum on m2 + for(int m1=0;m1 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);