From 47c063f984f46acbc0f5d02bcfd6eda771cca791 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Tue, 4 Jun 2019 20:45:35 +0100 Subject: [PATCH] Remove Ls Vec cases from benchmarks --- benchmarks/Benchmark_ITT.cc | 24 ++--- benchmarks/Benchmark_dwf.cc | 168 ------------------------------ benchmarks/Benchmark_dwf_sweep.cc | 148 +------------------------- benchmarks/Benchmark_mooee.cc | 59 ----------- 4 files changed, 7 insertions(+), 392 deletions(-) diff --git a/benchmarks/Benchmark_ITT.cc b/benchmarks/Benchmark_ITT.cc index 3e49e2c2..37fa8e6a 100644 --- a/benchmarks/Benchmark_ITT.cc +++ b/benchmarks/Benchmark_ITT.cc @@ -30,9 +30,6 @@ Author: paboyle using namespace Grid; -typedef WilsonFermion5D WilsonFermion5DR; -typedef WilsonFermion5D WilsonFermion5DF; -typedef WilsonFermion5D WilsonFermion5DD; std::vector L_list; std::vector Ls_list; @@ -273,6 +270,7 @@ public: } }; +#if 0 static double DWF5(int Ls,int L) { // RealD mass=0.1; @@ -454,6 +452,7 @@ public: } return mflops_best; } +#endif static double DWF(int Ls,int L, double & robust) { @@ -742,24 +741,14 @@ int main (int argc, char ** argv) } } - if ( do_dwf ) { - std::cout< WilsonFermion5DR; -typedef WilsonFermion5D WilsonFermion5DF; -typedef WilsonFermion5D WilsonFermion5DD; int main (int argc, char ** argv) { @@ -247,171 +244,6 @@ int main (int argc, char ** argv) DwH.Report(); } - if (1) - { - - std::cout << GridLogMessage<< "*********************************************************" <::Dhop "< WilsonFermion5DR; - LatticeFermion ssrc(sFGrid); - LatticeFermion sref(sFGrid); - LatticeFermion sresult(sFGrid); - - WilsonFermion5DR sDw(Umu,*sFGrid,*sFrbGrid,*sUGrid,*sUrbGrid,M5); - - localConvert(src,ssrc); - std::cout<Barrier(); - sDw.Dhop(ssrc,sresult,0); - sDw.ZeroCounters(); - double t0=usecond(); - for(int i=0;iBarrier(); - double volume=Ls; for(int mu=0;mu 1.0e-4 ){ - std::cout<< "sD REF\n " < 1.0e-4 ){ - std::cout<< "sD REF\n " <::DhopEO "<Barrier(); - sDw.DhopEO(ssrc_o, sr_e, DaggerNo); - sDw.ZeroCounters(); - // sDw.stat.init("DhopEO"); - double t0=usecond(); - for (int i = 0; i < ncall; i++) { - sDw.DhopEO(ssrc_o, sr_e, DaggerNo); - } - double t1=usecond(); - FGrid->Barrier(); - // sDw.stat.print(); - - double volume=Ls; for(int mu=0;mu1.0e-4) ) { - setCheckerboard(ssrc,ssrc_o); - setCheckerboard(ssrc,ssrc_e); - std::cout<< "DIFF\n " < & L, int Ls, int threads, int report =0 ); -void benchsDw(std::vector & L, int Ls, int threads, int report=0 ); int main (int argc, char ** argv) { @@ -66,7 +65,7 @@ int main (int argc, char ** argv) std::cout< latt4(4,16); std::cout< & latt4, int Ls, int threads,int report ) } } -#define CHECK_SDW -void benchsDw(std::vector & latt4, int Ls, int threads, int report ) -{ - long unsigned int single_site_flops = 8*Nc*(7+16*Nc); - - GridCartesian * UGrid = SpaceTimeGrid::makeFourDimGrid(latt4, GridDefaultSimd(Nd,vComplex::Nsimd()),GridDefaultMpi()); - GridRedBlackCartesian * UrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(UGrid); - GridCartesian * FGrid = SpaceTimeGrid::makeFiveDimGrid(Ls,UGrid); - GridRedBlackCartesian * FrbGrid = SpaceTimeGrid::makeFiveDimRedBlackGrid(Ls,UGrid); - - GridCartesian * sUGrid = SpaceTimeGrid::makeFourDimDWFGrid(latt4,GridDefaultMpi()); - GridRedBlackCartesian * sUrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(sUGrid); - GridCartesian * sFGrid = SpaceTimeGrid::makeFiveDimDWFGrid(Ls,UGrid); - GridRedBlackCartesian * sFrbGrid = SpaceTimeGrid::makeFiveDimDWFRedBlackGrid(Ls,UGrid); - - std::vector seeds4({1,2,3,4}); - std::vector seeds5({5,6,7,8}); - -#ifdef CHECK_SDW - GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4); - GridParallelRNG RNG5(FGrid); RNG5.SeedFixedIntegers(seeds5); - LatticeFermion src (FGrid); random(RNG5,src); - LatticeGaugeField Umu(UGrid); - random(RNG4,Umu); -#else - LatticeFermion src (FGrid); src=Zero(); - LatticeGaugeField Umu(UGrid); Umu=Zero(); -#endif - - LatticeFermion result(FGrid); result=Zero(); - LatticeFermion ref(FGrid); ref=Zero(); - LatticeFermion tmp(FGrid); - LatticeFermion err(FGrid); - - ColourMatrix cm = Complex(1.0,0.0); - - LatticeGaugeField Umu5d(FGrid); - - // replicate across fifth dimension - auto Umu5d_v = Umu5d.View(); - auto Umu_v = Umu.View(); - for(int ss=0;ssoSites();ss++){ - for(int s=0;s WilsonFermion5DR; - LatticeFermion ssrc(sFGrid); - LatticeFermion sref(sFGrid); - LatticeFermion sresult(sFGrid); - WilsonFermion5DR sDw(Umu,*sFGrid,*sFrbGrid,*sUGrid,*sUrbGrid,M5); - - for(int x=0;x site({s,x,y,z,t}); - SpinColourVector tmp; - peekSite(tmp,src,site); - pokeSite(tmp,ssrc,site); - }}}}} - - double t0=usecond(); - sDw.Dhop(ssrc,sresult,0); - double t1=usecond(); - -#ifdef TIMERS_OFF - int ncall =10; -#else - int ncall =1+(int) ((5.0*1000*1000)/(t1-t0)); -#endif - -#ifdef PERFCOUNT - PerformanceCounter Counter(8); - Counter.Start(); -#endif - t0=usecond(); - for(int i=0;i seeds4({1,2,3,4}); std::vector seeds5({5,6,7,8}); @@ -159,58 +153,5 @@ int main (int argc, char ** argv) } - if (1) - { - const int ncall=1000; - - std::cout << GridLogMessage<< "*********************************************************" < gamma(Ls,std::complex(1.0,0.0)); - ZMobiusFermionVec5dR zDw(Umu,*sFGrid,*sFrbGrid,*sUGrid,*sUrbGrid,mass,M5,gamma,b,c); - - std::cout<Barrier(); - - double t0,t1; - - LatticeFermion r_eo(sFGrid); - LatticeFermion src_e (sFrbGrid); - LatticeFermion src_o (sFrbGrid); - LatticeFermion r_e (sFrbGrid); - LatticeFermion r_o (sFrbGrid); - - pickCheckerboard(Even,src_e,src); - pickCheckerboard(Odd,src_o,src); - - setCheckerboard(r_eo,src_o); - setCheckerboard(r_eo,src_e); - - r_e = Zero(); - r_o = Zero(); - - BENCH_DW(Dhop ,src,result,0); - BENCH_DW(DhopEO ,src_o,r_e,0); - BENCH_DW_SSC(Meooe ,src_o,r_e); - BENCH_DW(Mooee ,src_o,r_o); - BENCH_DW(MooeeInv,src_o,r_o); - - BENCH_ZDW(Mooee ,src_o,r_o); - BENCH_ZDW(MooeeInv,src_o,r_o); - - } - Grid_finalize(); }