mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-21 01:02:02 +01:00
USe sloppy comms options
This commit is contained in:
@ -43,7 +43,7 @@ Gamma::Algebra Gmu [] = {
|
||||
Gamma::Algebra::GammaT
|
||||
};
|
||||
|
||||
void Benchmark(int Ls, Coordinate Dirichlet);
|
||||
void Benchmark(int Ls, Coordinate Dirichlet,bool Sloppy);
|
||||
|
||||
int main (int argc, char ** argv)
|
||||
{
|
||||
@ -69,7 +69,14 @@ int main (int argc, char ** argv)
|
||||
std::cout << GridLogMessage<< " Testing with full communication " <<std::endl;
|
||||
std::cout << GridLogMessage<< "++++++++++++++++++++++++++++++++++++++++++++++++" <<std::endl;
|
||||
|
||||
Benchmark(Ls,Dirichlet);
|
||||
Benchmark(Ls,Dirichlet,false);
|
||||
|
||||
std::cout << "\n\n\n\n\n\n" <<std::endl;
|
||||
std::cout << GridLogMessage<< "++++++++++++++++++++++++++++++++++++++++++++++++" <<std::endl;
|
||||
std::cout << GridLogMessage<< " Testing with sloppy communication " <<std::endl;
|
||||
std::cout << GridLogMessage<< "++++++++++++++++++++++++++++++++++++++++++++++++" <<std::endl;
|
||||
|
||||
Benchmark(Ls,Dirichlet,true);
|
||||
|
||||
//////////////////
|
||||
// Domain decomposed
|
||||
@ -90,33 +97,28 @@ int main (int argc, char ** argv)
|
||||
std::cout << GridLogMessage<< "++++++++++++++++++++++++++++++++++++++++++++++++" <<std::endl;
|
||||
|
||||
for(int d=0;d<Nd;d++) CommDim[d]= (mpi[d]/shm[d])>1 ? 1 : 0;
|
||||
// Dirichlet[0] = 0;
|
||||
// Dirichlet[1] = CommDim[0]*latt4[0]/mpi[0] * shm[0];
|
||||
// Dirichlet[2] = CommDim[1]*latt4[1]/mpi[1] * shm[1];
|
||||
// Dirichlet[3] = CommDim[2]*latt4[2]/mpi[2] * shm[2];
|
||||
// Dirichlet[4] = CommDim[3]*latt4[3]/mpi[3] * shm[3];
|
||||
Dirichlet[0] = 0;
|
||||
Dirichlet[1] = CommDim[0]*latt4[0]/mpi[0] * shm[0];
|
||||
Dirichlet[2] = CommDim[1]*latt4[1]/mpi[1] * shm[1];
|
||||
Dirichlet[3] = CommDim[2]*latt4[2]/mpi[2] * shm[2];
|
||||
Dirichlet[4] = CommDim[3]*latt4[3]/mpi[3] * shm[3];
|
||||
|
||||
Benchmark(Ls,Dirichlet);
|
||||
Benchmark(Ls,Dirichlet,false);
|
||||
|
||||
std::cout << "\n\n\n\n\n\n" <<std::endl;
|
||||
|
||||
std::cout << GridLogMessage<< "++++++++++++++++++++++++++++++++++++++++++++++++" <<std::endl;
|
||||
std::cout << GridLogMessage<< " Testing without intranode communication " <<std::endl;
|
||||
std::cout << GridLogMessage<< " Testing with sloppy intranode communication " <<std::endl;
|
||||
std::cout << GridLogMessage<< "++++++++++++++++++++++++++++++++++++++++++++++++" <<std::endl;
|
||||
|
||||
for(int d=0;d<Nd;d++) CommDim[d]= mpi[d]>1 ? 1 : 0;
|
||||
// Dirichlet[0] = 0;
|
||||
// Dirichlet[1] = CommDim[0]*latt4[0]/mpi[0];
|
||||
// Dirichlet[2] = CommDim[1]*latt4[1]/mpi[1];
|
||||
// Dirichlet[3] = CommDim[2]*latt4[2]/mpi[2];
|
||||
// Dirichlet[4] = CommDim[3]*latt4[3]/mpi[3];
|
||||
|
||||
Benchmark(Ls,Dirichlet);
|
||||
Benchmark(Ls,Dirichlet,true);
|
||||
|
||||
Grid_finalize();
|
||||
exit(0);
|
||||
}
|
||||
void Benchmark(int Ls, Coordinate Dirichlet)
|
||||
void Benchmark(int Ls, Coordinate Dirichlet,bool sloppy)
|
||||
{
|
||||
Coordinate latt4 = GridDefaultLatt();
|
||||
GridLogLayout();
|
||||
@ -132,21 +134,13 @@ void Benchmark(int Ls, Coordinate Dirichlet)
|
||||
typedef LatticeGaugeFieldF GaugeField;
|
||||
typedef LatticeColourMatrixF ColourMatrixField;
|
||||
typedef DomainWallFermionF FermionAction;
|
||||
#endif
|
||||
#ifdef DOUBLE
|
||||
#else
|
||||
typedef vComplexD Simd;
|
||||
typedef LatticeFermionD FermionField;
|
||||
typedef LatticeGaugeFieldD GaugeField;
|
||||
typedef LatticeColourMatrixD ColourMatrixField;
|
||||
typedef DomainWallFermionD FermionAction;
|
||||
#endif
|
||||
#ifdef DOUBLE2
|
||||
typedef vComplexD2 Simd;
|
||||
typedef LatticeFermionD2 FermionField;
|
||||
typedef LatticeGaugeFieldD2 GaugeField;
|
||||
typedef LatticeColourMatrixD2 ColourMatrixField;
|
||||
typedef DomainWallFermionD2 FermionAction;
|
||||
#endif
|
||||
|
||||
GridCartesian * UGrid = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), GridDefaultSimd(Nd,Simd::Nsimd()),GridDefaultMpi());
|
||||
GridRedBlackCartesian * UrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(UGrid);
|
||||
@ -269,6 +263,7 @@ void Benchmark(int Ls, Coordinate Dirichlet)
|
||||
FermionAction::ImplParams p;
|
||||
p.dirichlet=Dirichlet;
|
||||
FermionAction Dw(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,p);
|
||||
Dw.SloppyComms(sloppy);
|
||||
Dw.ImportGauge(Umu);
|
||||
|
||||
int ncall =300;
|
||||
|
Reference in New Issue
Block a user