From b2493d6d254f43176f159d9a2bce3036d5bf05a6 Mon Sep 17 00:00:00 2001 From: Chulwoo Jung Date: Tue, 8 Mar 2022 10:18:36 -0800 Subject: [PATCH] Switching Block lanczos precision to explicitly single Adding sample run script and input file --- tests/lanczos/Test_dwf_block_lanczos.cc | 30 +++++++++++++------------ tests/lanczos/dwf.batch | 27 ++++++++++++++++++++++ tests/lanczos/in.params | 17 ++++++++++++++ 3 files changed, 60 insertions(+), 14 deletions(-) create mode 100644 tests/lanczos/dwf.batch create mode 100644 tests/lanczos/in.params diff --git a/tests/lanczos/Test_dwf_block_lanczos.cc b/tests/lanczos/Test_dwf_block_lanczos.cc index c71b80ec..4ecd1b3f 100644 --- a/tests/lanczos/Test_dwf_block_lanczos.cc +++ b/tests/lanczos/Test_dwf_block_lanczos.cc @@ -34,7 +34,7 @@ using namespace Grid; //using namespace Grid::QCD; //typedef typename GparityDomainWallFermionR::FermionField FermionField; -typedef typename ZMobiusFermionR::FermionField FermionField; +typedef typename ZMobiusFermionF::FermionField FermionField; RealD AllZero(RealD x){ return 0.;} @@ -249,11 +249,11 @@ int main (int argc, char ** argv) CmdJobParams JP; JP.Parse(argv,argc); - GridCartesian * UGrid = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), GridDefaultSimd(Nd,vComplex::Nsimd()),GridDefaultMpi()); + GridCartesian * UGridD = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), GridDefaultSimd(Nd,vComplex::Nsimd()),GridDefaultMpi()); + GridCartesian * UGrid = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), GridDefaultSimd(Nd,vComplexF::Nsimd()),GridDefaultMpi()); GridRedBlackCartesian * UrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(UGrid); GridCartesian * FGrid = SpaceTimeGrid::makeFiveDimGrid(JP.Ls,UGrid); GridRedBlackCartesian * FrbGrid = SpaceTimeGrid::makeFiveDimRedBlackGrid(JP.Ls,UGrid); -// printf("UGrid=%p UrbGrid=%p FGrid=%p FrbGrid=%p\n",UGrid,UrbGrid,FGrid,FrbGrid); std::vector seeds4({1,2,3,4}); std::vector seeds5({5,6,7,8}); @@ -262,16 +262,18 @@ int main (int argc, char ** argv) // ypj [note] why seed RNG5 again? bug? In this case, run with a default seed(). GridParallelRNG RNG5rb(FrbGrid); RNG5rb.SeedFixedIntegers(seeds5); - LatticeGaugeField Umu(UGrid); - std::vector U(4,UGrid); + LatticeGaugeField UmuD(UGridD); + LatticeGaugeFieldF Umu(UGrid); + std::vector U(4,UGrid); if ( JP.gaugefile.compare("Hot") == 0 ) { - SU3::HotConfiguration(RNG4, Umu); + SU3::HotConfiguration(RNG4, UmuD); } else { FieldMetaData header; - NerscIO::readConfiguration(Umu,header,JP.gaugefile); + NerscIO::readConfiguration(UmuD,header,JP.gaugefile); // ypj [fixme] additional checks for the loaded configuration? } + precisionChange(Umu,UmuD); for(int mu=0;mu(Umu,mu); @@ -321,7 +323,7 @@ int main (int argc, char ** argv) // Split into 1^4 mpi communicators ///////////////////////////////////////////// GridCartesian * SGrid = new GridCartesian(GridDefaultLatt(), - GridDefaultSimd(Nd,vComplex::Nsimd()), + GridDefaultSimd(Nd,vComplexF::Nsimd()), mpi_split, *UGrid); @@ -329,19 +331,19 @@ int main (int argc, char ** argv) GridRedBlackCartesian * SrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(SGrid); GridRedBlackCartesian * SFrbGrid = SpaceTimeGrid::makeFiveDimRedBlackGrid(JP.Ls,SGrid); - LatticeGaugeField s_Umu(SGrid); + LatticeGaugeFieldF s_Umu(SGrid); Grid_split (Umu,s_Umu); //WilsonFermionR::ImplParams params; - ZMobiusFermionR::ImplParams params; + ZMobiusFermionF::ImplParams params; params.overlapCommsCompute = true; params.boundary_phases = JP.boundary_phase; - ZMobiusFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,JP.omega,1.,0.,params); + ZMobiusFermionF Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,JP.omega,1.,0.,params); // SchurDiagTwoOperator HermOp(Ddwf); - SchurDiagOneOperator HermOp(Ddwf); - ZMobiusFermionR Dsplit(s_Umu,*SFGrid,*SFrbGrid,*SGrid,*SrbGrid,mass,M5,JP.omega,1.,0.,params); + SchurDiagOneOperator HermOp(Ddwf); + ZMobiusFermionF Dsplit(s_Umu,*SFGrid,*SFrbGrid,*SGrid,*SrbGrid,mass,M5,JP.omega,1.,0.,params); // SchurDiagTwoOperator SHermOp(Dsplit); - SchurDiagOneOperator SHermOp(Dsplit); + SchurDiagOneOperator SHermOp(Dsplit); //std::vector Coeffs { 0.,-1.}; // ypj [note] this may not be supported by some compilers diff --git a/tests/lanczos/dwf.batch b/tests/lanczos/dwf.batch new file mode 100644 index 00000000..43d677fc --- /dev/null +++ b/tests/lanczos/dwf.batch @@ -0,0 +1,27 @@ +# run script on Cori +#!/bin/bash +#SBATCH -t 30 +#SBATCH -N 16 +#SBATCH -C knl +#SBATCH -A mp13 +#SBATCH --ntasks-per-node=1 + +export OMP_PROC_BIND=true +export OMP_PLACES=threads +export OMP_NUM_THREADS=64 + +#BIN=benchmarks/Benchmark_ITT +#OPT='--cpu-bind=cores' +BIN=./Test_dwf_block_lanczos +rundir=. +CONF='--gconf '${rundir}'/ckpoint_lat.IEEE64BIG.5000' +VOL='--grid 16.16.16.32' +GRID='--mpi 1.2.2.4' +OPT='--mass 0.00054 --M5 1.8 --phase in.params --omega in.params --shm 4096' +BL='--rbl 4.32.32.30.7 --split 1.2.2.1 --check_int 8 --resid 1.0e-5 --cheby_l 0.0027 --cheby_u 7 --cheby_n 51' + +#echo srun $OPT $BIN $gridoptions $jobparams +#srun $OPT $BIN $gridoptions $jobparams + +echo srun $BIN $CONF $OPT $BL $VOL $GRID +srun $BIN $CONF $OPT $BL $VOL $GRID diff --git a/tests/lanczos/in.params b/tests/lanczos/in.params new file mode 100644 index 00000000..d00ad329 --- /dev/null +++ b/tests/lanczos/in.params @@ -0,0 +1,17 @@ +boundary_phase 0 1 0 +boundary_phase 1 1 0 +boundary_phase 2 1 0 +boundary_phase 3 -1 0 + +omega 0 0.375 0 +omega 1 0.375 0 +omega 2 0.375 0 +omega 3 0.375 0 +omega 4 0.375 0 +omega 5 0.375 0 +omega 6 0.375 0 +omega 7 0.375 0 +omega 8 0.375 0 +omega 9 0.375 0 +omega 10 0.375 0 +omega 11 0.375 0