/************************************************************************************* Grid physics library, www.github.com/paboyle/Grid Source file: ./benchmarks/Benchmark_dwf.cc Copyright (C) 2015 Author: Peter Boyle Author: paboyle This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. See the full license in the file "LICENSE" in the top level distribution directory *************************************************************************************/ /* END LEGAL */ #include using namespace std; using namespace Grid; using namespace Grid::QCD; int main (int argc, char ** argv) { Grid_init(&argc,&argv); int threads = GridThread::GetThreads(); std::cout< latt4 = GridDefaultLatt(); const int Ls=16; GridCartesian * UGrid = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), GridDefaultSimd(Nd,vComplex::Nsimd()),GridDefaultMpi()); GridRedBlackCartesian * UrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(UGrid); GridCartesian * FGrid = SpaceTimeGrid::makeFiveDimGrid(Ls,UGrid); GridRedBlackCartesian * FrbGrid = SpaceTimeGrid::makeFiveDimRedBlackGrid(Ls,UGrid); std::cout << GridLogMessage << "Making Vec5d innermost grids"< seeds4({1,2,3,4}); std::vector seeds5({5,6,7,8}); GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4); std::cout << GridLogMessage << "Seeded"<_Nprocessors; if (1) { const int ncall=1000; std::cout << GridLogMessage<< "*********************************************************" <Barrier(); \ t0=usecond(); \ for(int i=0;iBarrier(); \ Dw.CayleyReport(); \ std::cout<Barrier(); \ t0=usecond(); \ for(int i=0;iBarrier(); \ zDw.CayleyReport(); \ std::cout<Barrier(); \ t0=usecond(); \ for(int i=0;iBarrier(); \ Dw.CayleyReport(); \ std::cout<Barrier(); \ t0=usecond(); \ for(int i=0;iBarrier(); \ Dw.CayleyReport(); \ std::cout< 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_MEO(Dhop ,src,result); BENCH_DW_MEO(DhopEO ,src_o,r_e); 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(); }