From 29ae5615c0e5c080061e2176bbd5c3f6a61c0b0b Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Wed, 29 Apr 2020 03:05:15 -0400 Subject: [PATCH] Seqeuential fix --- tests/debug/Test_cayley_mres.cc | 104 ++++++++++++++++++++------------ 1 file changed, 66 insertions(+), 38 deletions(-) diff --git a/tests/debug/Test_cayley_mres.cc b/tests/debug/Test_cayley_mres.cc index 0562546c..1bf6f2dc 100644 --- a/tests/debug/Test_cayley_mres.cc +++ b/tests/debug/Test_cayley_mres.cc @@ -57,18 +57,34 @@ int main (int argc, char ** argv) std::cout< omegas(10,ComplexD(1.0,0.0)); - std::vector < ComplexD > omegasrev(10,ComplexD(1.0,0.0)); - omegas.push_back( std::complex(0.0686324988446592,0.0550658530827402) ); - omegas.push_back( std::complex(0.0686324988446592,-0.0550658530827402) ); + std::vector < ComplexD > omegas; + std::vector < ComplexD > omegasrev(Ls); + +#if 1 omegas.push_back( std::complex(1.45806438985048,-0) ); omegas.push_back( std::complex(0.830951166685955,-0) ); omegas.push_back( std::complex(0.341985020453729,-0) ); omegas.push_back( std::complex(0.126074299502912,-0) ); + // omegas.push_back( std::complex(0.0686324988446592,0.0550658530827402) ); + // omegas.push_back( std::complex(0.0686324988446592,-0.0550658530827402) ); + omegas.push_back( std::complex(0.0686324988446592,0)); + omegas.push_back( std::complex(0.0686324988446592,0)); omegas.push_back( std::complex(0.0990136651962626,-0) ); omegas.push_back( std::complex(0.21137902619029,-0) ); omegas.push_back( std::complex(0.542352409156791,-0) ); omegas.push_back( std::complex(1.18231318389348,-0) ); +#else + omegas.push_back( std::complex(0.8,0.0)); + omegas.push_back( std::complex(1.1,0.0)); + omegas.push_back( std::complex(1.2,0.0)); + omegas.push_back( std::complex(1.3,0.0)); + omegas.push_back( std::complex(0.5,0.2)); + omegas.push_back( std::complex(0.5,-0.2)); + omegas.push_back( std::complex(0.8,0.0)); + omegas.push_back( std::complex(1.1,0.0)); + omegas.push_back( std::complex(1.2,0.0)); + omegas.push_back( std::complex(1.3,0.0)); +#endif GridCartesian * UGrid = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), GridDefaultSimd(Nd,vComplex::Nsimd()), @@ -92,10 +108,10 @@ int main (int argc, char ** argv) GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4); LatticeGaugeField Umu(UGrid); - // SU3::ColdConfiguration(Umu); - SU3::HotConfiguration(RNG4,Umu); + SU3::ColdConfiguration(Umu); + // SU3::HotConfiguration(RNG4,Umu); - RealD mass=0.2; + RealD mass=0.3; RealD M5 =1.0; std::cout< gamma(Ls,ComplexD(1.0,0.0)); + // std::vector gamma(Ls,ComplexD(1.0,0.0)); std::cout<(Dsham,Dsham,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); - std::cout< -void TestConserved(Action & Ddwf, Action & Ddwfrev, - LatticeGaugeField &Umu, - GridCartesian * FGrid, GridRedBlackCartesian * FrbGrid, - GridCartesian * UGrid, GridRedBlackCartesian * UrbGrid, - RealD mass, RealD M5, - GridParallelRNG *RNG4, - GridParallelRNG *RNG5) +void TestConserved(Action & Ddwf, + Action & Ddwfrev, + LatticeGaugeField &Umu, + GridCartesian * FGrid, GridRedBlackCartesian * FrbGrid, + GridCartesian * UGrid, GridRedBlackCartesian * UrbGrid, + RealD mass, RealD M5, + GridParallelRNG *RNG4, + GridParallelRNG *RNG5) { int Ls=Ddwf.Ls; @@ -155,7 +171,10 @@ void TestConserved(Action & Ddwf, Action & Ddwfrev, LatticePropagator prop5rev(FGrid); LatticePropagator prop4(UGrid); LatticePropagator Axial_mu(UGrid); + LatticePropagator Vector_mu(UGrid); LatticeComplex PA (UGrid); + LatticeComplex SV (UGrid); + LatticeComplex VV (UGrid); LatticeComplex PJ5q(UGrid); LatticeComplex PP (UGrid); LatticePropagator seqprop(UGrid); @@ -167,7 +186,7 @@ void TestConserved(Action & Ddwf, Action & Ddwfrev, MdagMLinearOperator HermOp(Ddwf); MdagMLinearOperator HermOprev(Ddwfrev); - ConjugateGradient CG(1.0e-12,10000); + ConjugateGradient CG(1.0e-16,100000); for(int s=0;s(prop4,result4,s,c); + Ddwfrev.ImportPhysicalFermionSource(src4,src5); Ddwfrev.Mdag(src5,Mdagsrc5); CG(HermOprev,Mdagsrc5,result5); FermToProp(prop5rev,result5,s,c); } } - #if 1 auto curr = Current::Axial; const int mu_J=Nd-1; @@ -206,14 +225,14 @@ void TestConserved(Action & Ddwf, Action & Ddwfrev, LatticeComplex ph (UGrid); ph=1.0; - Ddwfrev.SeqConservedCurrent(prop5rev, - seqsrc, - phys_src, - curr, - mu_J, - t_J, - t_J,// whole lattice - ph); + Ddwf.SeqConservedCurrent(prop5, + seqsrc, + phys_src, + curr, + mu_J, + t_J, + t_J,// whole lattice + ph); for(int s=0;s sumPA; + std::vector sumSV; + std::vector sumVV; std::vector sumPP; std::vector sumPJ5q; - Ddwf.ContractConservedCurrent(prop5rev,prop5,Axial_mu,phys_src,Current::Axial,Tdir); - //Ddwf.ContractConservedCurrent(prop5rev,prop5,Axial_mu,Current::Axial,Tdir); + Ddwf.ContractConservedCurrent(prop5rev,prop5,Vector_mu,phys_src,Current::Vector,Tdir); Ddwf.ContractJ5q(prop5,PJ5q); PA = trace(g5*Axial_mu); + SV = trace(Vector_mu); + VV = trace(gT*Vector_mu); PP = trace(adj(prop4)*prop4); // Spatial sum sliceSum(PA,sumPA,Tdir); + sliceSum(SV,sumSV,Tdir); + sliceSum(VV,sumVV,Tdir); sliceSum(PP,sumPP,Tdir); sliceSum(PJ5q,sumPJ5q,Tdir); int Nt=sumPA.size(); + for(int t=0;t U(4,FGrid); {