mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-11-04 05:54:32 +00:00 
			
		
		
		
	Make all tests compile
This commit is contained in:
		@@ -111,8 +111,8 @@ public:
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  void CheckpointRestore(int traj, Field &U, GridSerialRNG &sRNG, GridParallelRNG &pRNG) {
 | 
			
		||||
    std::string config, rng;
 | 
			
		||||
    this->build_filenames(traj, Params, config, rng);
 | 
			
		||||
    std::string config, rng, smr;
 | 
			
		||||
    this->build_filenames(traj, Params, config, smr, rng);
 | 
			
		||||
    this->check_filename(rng);
 | 
			
		||||
    this->check_filename(config);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -75,7 +75,7 @@ public:
 | 
			
		||||
                          GridParallelRNG &pRNG) {
 | 
			
		||||
    if ((traj % Params.saveInterval) == 0) {
 | 
			
		||||
      std::string config, rng, smr;
 | 
			
		||||
      this->build_filenames(traj, Params, config, rng);
 | 
			
		||||
      this->build_filenames(traj, Params, config, smr, rng);
 | 
			
		||||
      GridBase *grid = SmartConfig.get_U(false).Grid();
 | 
			
		||||
      uint32_t nersc_csum,scidac_csuma,scidac_csumb;
 | 
			
		||||
      BinaryIO::writeRNG(sRNG, pRNG, rng, 0,nersc_csum,scidac_csuma,scidac_csumb);
 | 
			
		||||
@@ -102,7 +102,7 @@ public:
 | 
			
		||||
      if ( Params.saveSmeared ) { 
 | 
			
		||||
	IldgWriter _IldgWriter(grid->IsBoss());
 | 
			
		||||
	_IldgWriter.open(smr);
 | 
			
		||||
	_IldgWriter.writeConfiguration<GaugeStats>(SmartConfig.get_U(true), traj, config, config);
 | 
			
		||||
	_IldgWriter.writeConfiguration<GaugeStats>(SmartConfig.get_U(true), traj, smr, smr);
 | 
			
		||||
	_IldgWriter.close();
 | 
			
		||||
 | 
			
		||||
	std::cout << GridLogMessage << "Written ILDG Configuration on " << smr
 | 
			
		||||
@@ -118,8 +118,8 @@ public:
 | 
			
		||||
 | 
			
		||||
  void CheckpointRestore(int traj, GaugeField &U, GridSerialRNG &sRNG,
 | 
			
		||||
                         GridParallelRNG &pRNG) {
 | 
			
		||||
    std::string config, rng;
 | 
			
		||||
    this->build_filenames(traj, Params, config, rng);
 | 
			
		||||
    std::string config, rng, smr;
 | 
			
		||||
    this->build_filenames(traj, Params, config, smr, rng);
 | 
			
		||||
    this->check_filename(rng);
 | 
			
		||||
    this->check_filename(config);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -107,8 +107,8 @@ class ScidacHmcCheckpointer : public BaseHmcCheckpointer<Implementation> {
 | 
			
		||||
 | 
			
		||||
  void CheckpointRestore(int traj, Field &U, GridSerialRNG &sRNG,
 | 
			
		||||
                         GridParallelRNG &pRNG) {
 | 
			
		||||
    std::string config, rng;
 | 
			
		||||
    this->build_filenames(traj, Params, config, rng);
 | 
			
		||||
    std::string config, rng, smr;
 | 
			
		||||
    this->build_filenames(traj, Params, config, smr, rng);
 | 
			
		||||
    this->check_filename(rng);
 | 
			
		||||
    this->check_filename(config);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -62,15 +62,15 @@ accelerator_inline int stencilIndex(int mu, int nu) {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*!  @brief structure holding the link treatment */
 | 
			
		||||
struct SmearingParameters{
 | 
			
		||||
    SmearingParameters(){}
 | 
			
		||||
struct HISQSmearingParameters{
 | 
			
		||||
    HISQSmearingParameters(){}
 | 
			
		||||
    Real c_1;               // 1 link
 | 
			
		||||
    Real c_naik;            // Naik term
 | 
			
		||||
    Real c_3;               // 3 link
 | 
			
		||||
    Real c_5;               // 5 link
 | 
			
		||||
    Real c_7;               // 7 link
 | 
			
		||||
    Real c_lp;              // 5 link Lepage
 | 
			
		||||
    SmearingParameters(Real c1, Real cnaik, Real c3, Real c5, Real c7, Real clp) 
 | 
			
		||||
    HISQSmearingParameters(Real c1, Real cnaik, Real c3, Real c5, Real c7, Real clp) 
 | 
			
		||||
        : c_1(c1),
 | 
			
		||||
          c_naik(cnaik),
 | 
			
		||||
          c_3(c3),
 | 
			
		||||
@@ -86,7 +86,7 @@ class Smear_HISQ : public Gimpl {
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    GridCartesian* const _grid;
 | 
			
		||||
    SmearingParameters _linkTreatment;
 | 
			
		||||
    HISQSmearingParameters _linkTreatment;
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
@@ -117,7 +117,7 @@ public:
 | 
			
		||||
    //          IN--u_thin
 | 
			
		||||
    void smear(GF& u_smr, GF& u_naik, GF& u_thin) const {
 | 
			
		||||
 | 
			
		||||
        SmearingParameters lt = this->_linkTreatment;
 | 
			
		||||
        HISQSmearingParameters lt = this->_linkTreatment;
 | 
			
		||||
        auto grid = this->_grid;
 | 
			
		||||
 | 
			
		||||
        // Create a padded cell of extra padding depth=1 and fill the padding.
 | 
			
		||||
 
 | 
			
		||||
@@ -294,7 +294,7 @@ public:
 | 
			
		||||
  //////////////////////////////////////////////////
 | 
			
		||||
  static void Staple(GaugeMat &staple, const GaugeLorentz &U, int mu) {
 | 
			
		||||
 | 
			
		||||
    std::vector<GaugeMat> Umu(Nd, U.grid());
 | 
			
		||||
    std::vector<GaugeMat> Umu(Nd, U.Grid());
 | 
			
		||||
    for (int d = 0; d < Nd; d++) {
 | 
			
		||||
      Umu[d] = PeekIndex<LorentzIndex>(U, d);
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -3,6 +3,7 @@
 | 
			
		||||
CXX=mpicxx ../../configure \
 | 
			
		||||
	   --enable-simd=GEN \
 | 
			
		||||
	   --enable-comms=mpi-auto \
 | 
			
		||||
	   --enable-Sp=yes \
 | 
			
		||||
	   --enable-unified=yes \
 | 
			
		||||
	   --prefix /Users/peterboyle/QCD/vtk/Grid/install \
 | 
			
		||||
	   --with-lime=$CLIME \
 | 
			
		||||
@@ -11,5 +12,5 @@ CXX=mpicxx ../../configure \
 | 
			
		||||
	   --with-openssl=$OPENSSL \
 | 
			
		||||
	   --with-gmp=$GMP \
 | 
			
		||||
	   --with-mpfr=$MPFR \
 | 
			
		||||
	   --disable-fermion-reps --disable-gparity --disable-debug 
 | 
			
		||||
	   --disable-debug 
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -62,7 +62,7 @@ int VerifyOnDevice(const FermionField &res, FermionField &ref)
 | 
			
		||||
    if (((random()&0xF)==0)&&injection) {
 | 
			
		||||
      uint64_t sF = random()%(NN);
 | 
			
		||||
      int lane=0;
 | 
			
		||||
      printf("Error injection site %ld on rank %d\n",sF,res.Grid()->ThisRank());
 | 
			
		||||
      printf("Error injection site %ld on rank %d\n",(long)sF,res.Grid()->ThisRank());
 | 
			
		||||
      auto vv = acceleratorGet(res_v[sF]);
 | 
			
		||||
      double *dd = (double *)&vv;
 | 
			
		||||
      *dd=M_PI;
 | 
			
		||||
 
 | 
			
		||||
@@ -195,8 +195,8 @@ int main (int argc, char ** argv)
 | 
			
		||||
 | 
			
		||||
  int Nk=nrhs;
 | 
			
		||||
  int Nm=Nk*3;
 | 
			
		||||
  int Nk=36;
 | 
			
		||||
  int Nm=144;
 | 
			
		||||
  //  int Nk=36;
 | 
			
		||||
  //  int Nm=144;
 | 
			
		||||
  int Nstop=Nk;
 | 
			
		||||
  int Nconv_test_interval=1;
 | 
			
		||||
  
 | 
			
		||||
 
 | 
			
		||||
@@ -54,6 +54,7 @@ const RealD            M5       = 1.8;
 | 
			
		||||
 | 
			
		||||
int main(int argc, char** argv)
 | 
			
		||||
{
 | 
			
		||||
#ifdef ENABLE_GPARITY
 | 
			
		||||
  Grid_init(&argc, &argv);
 | 
			
		||||
 | 
			
		||||
  int threads = GridThread::GetThreads();
 | 
			
		||||
@@ -106,6 +107,6 @@ int main(int argc, char** argv)
 | 
			
		||||
    Meofa.refresh(Umu,sRNG, RNG5);
 | 
			
		||||
    printf("<Phi|Meofa|Phi> = %1.15e\n", Meofa.S(Umu));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
  return 0;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -56,6 +56,7 @@ const RealD            M5       = 1.8;
 | 
			
		||||
 | 
			
		||||
int main(int argc, char** argv)
 | 
			
		||||
{
 | 
			
		||||
#ifdef ENABLE_GPARITY  
 | 
			
		||||
  Grid_init(&argc, &argv);
 | 
			
		||||
 | 
			
		||||
  int threads = GridThread::GetThreads();
 | 
			
		||||
@@ -106,6 +107,6 @@ int main(int argc, char** argv)
 | 
			
		||||
    Meofa.refresh(Umu, sRNG, RNG5);
 | 
			
		||||
    printf("<Phi|Meofa|Phi> = %1.15e\n", Meofa.S(Umu));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
  return 0;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -33,6 +33,7 @@ using namespace std;
 | 
			
		||||
using namespace Grid;
 | 
			
		||||
 | 
			
		||||
// This is to optimize the SIMD
 | 
			
		||||
/*
 | 
			
		||||
template<class vobj> void gpermute(vobj & inout,int perm){
 | 
			
		||||
  vobj tmp=inout;
 | 
			
		||||
  if (perm & 0x1 ) { permute(inout,tmp,0); tmp=inout;}
 | 
			
		||||
@@ -40,7 +41,7 @@ template<class vobj> void gpermute(vobj & inout,int perm){
 | 
			
		||||
  if (perm & 0x4 ) { permute(inout,tmp,2); tmp=inout;}
 | 
			
		||||
  if (perm & 0x8 ) { permute(inout,tmp,3); tmp=inout;}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
int main (int argc, char ** argv)
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -153,7 +153,7 @@ public:
 | 
			
		||||
    t=usecond();
 | 
			
		||||
    {
 | 
			
		||||
      autoView( gStaple_v , gStaple, AcceleratorWrite);
 | 
			
		||||
      auto gStencil_v = gStencil.View();
 | 
			
		||||
      auto gStencil_v = gStencil.View(AcceleratorRead);
 | 
			
		||||
      autoView( Ug_mu_v , Ug_mu, AcceleratorRead);
 | 
			
		||||
      autoView( Ug_nu_v , Ug_nu, AcceleratorRead);
 | 
			
		||||
  
 | 
			
		||||
@@ -389,7 +389,7 @@ public:
 | 
			
		||||
    GeneralLocalStencil gStencil(ggrid,shifts);
 | 
			
		||||
    {
 | 
			
		||||
      autoView( gStaple_v , gStaple, AcceleratorWrite);
 | 
			
		||||
      auto gStencil_v = gStencil.View();
 | 
			
		||||
      auto gStencil_v = gStencil.View(AcceleratorRead);
 | 
			
		||||
 | 
			
		||||
      typedef LatticeView<typename GaugeMat::vector_object> GaugeViewType;
 | 
			
		||||
      size_t vsize = Nd*sizeof(GaugeViewType);
 | 
			
		||||
 
 | 
			
		||||
@@ -83,6 +83,7 @@ std::vector<RealD> jack_stats(const std::vector<RealD>& data)
 | 
			
		||||
 | 
			
		||||
int main(int argc, char **argv)
 | 
			
		||||
{
 | 
			
		||||
#ifdef ENABLE_GPARITY  
 | 
			
		||||
  Grid_init(&argc, &argv);
 | 
			
		||||
 | 
			
		||||
  // Initialize spacetime grid
 | 
			
		||||
@@ -206,4 +207,5 @@ int main(int argc, char **argv)
 | 
			
		||||
  std::cout << std::endl << "EOFA: rw = " << eofa_result[0] << " +/- " << eofa_result[1] << std::endl;
 | 
			
		||||
 | 
			
		||||
  Grid_finalize();
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -85,6 +85,7 @@ std::vector<RealD> jack_stats(const std::vector<RealD>& data)
 | 
			
		||||
 | 
			
		||||
int main(int argc, char **argv)
 | 
			
		||||
{
 | 
			
		||||
#ifdef ENABLE_GPARITY  
 | 
			
		||||
  Grid_init(&argc, &argv);
 | 
			
		||||
 | 
			
		||||
  // Initialize spacetime grid
 | 
			
		||||
@@ -215,4 +216,5 @@ int main(int argc, char **argv)
 | 
			
		||||
  std::cout << std::endl << "EOFA: rw = " << eofa_result[0] << " +/- " << eofa_result[1] << std::endl;
 | 
			
		||||
 | 
			
		||||
  Grid_finalize();
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -35,6 +35,7 @@ using namespace Grid;
 | 
			
		||||
 | 
			
		||||
int main (int argc, char ** argv)
 | 
			
		||||
{
 | 
			
		||||
#ifdef ENABLE_GPARITY  
 | 
			
		||||
  Grid_init(&argc,&argv);
 | 
			
		||||
 | 
			
		||||
  Coordinate latt_size   = GridDefaultLatt();
 | 
			
		||||
@@ -244,4 +245,5 @@ int main (int argc, char ** argv)
 | 
			
		||||
 | 
			
		||||
  std::cout<< GridLogMessage << "Done" <<std::endl;
 | 
			
		||||
  Grid_finalize();
 | 
			
		||||
#endif  
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -38,6 +38,7 @@ typedef typename FermionAction::FermionField FermionField;
 | 
			
		||||
 | 
			
		||||
int main (int argc, char** argv)
 | 
			
		||||
{
 | 
			
		||||
#ifdef ENABLE_GPARITY  
 | 
			
		||||
  Grid_init(&argc, &argv);
 | 
			
		||||
 | 
			
		||||
  Coordinate latt_size   = GridDefaultLatt();
 | 
			
		||||
@@ -173,4 +174,5 @@ int main (int argc, char** argv)
 | 
			
		||||
 | 
			
		||||
  std::cout << GridLogMessage << "Done" << std::endl;
 | 
			
		||||
  Grid_finalize();
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -35,6 +35,7 @@ using namespace Grid;
 | 
			
		||||
 | 
			
		||||
int main (int argc, char ** argv)
 | 
			
		||||
{
 | 
			
		||||
#ifdef ENABLE_GPARITY
 | 
			
		||||
  Grid_init(&argc,&argv);
 | 
			
		||||
 | 
			
		||||
  Coordinate latt_size   = GridDefaultLatt();
 | 
			
		||||
@@ -204,4 +205,5 @@ int main (int argc, char ** argv)
 | 
			
		||||
  assert( fabs(real(Sprime-S-dSpred)) < 1.0 ) ;
 | 
			
		||||
  std::cout<< GridLogMessage << "Done" <<std::endl;
 | 
			
		||||
  Grid_finalize();
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -32,6 +32,7 @@ using namespace std;
 | 
			
		||||
using namespace Grid;
 | 
			
		||||
 | 
			
		||||
//Here we test the G-parity action and force between the 1f (doubled-lattice) and 2f approaches 
 | 
			
		||||
#ifdef ENABLE_GPARITY
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void copyConjGauge(LatticeGaugeFieldD &Umu_1f, const LatticeGaugeFieldD &Umu_2f, const int nu){
 | 
			
		||||
@@ -444,3 +445,7 @@ int main (int argc, char ** argv)
 | 
			
		||||
    assert(0);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#else
 | 
			
		||||
int main (int argc, char ** argv){};
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -32,6 +32,7 @@ using namespace Grid;
 | 
			
		||||
 | 
			
		||||
int main (int argc, char ** argv)
 | 
			
		||||
{
 | 
			
		||||
#ifdef ENABLE_GPARITY
 | 
			
		||||
  Grid_init(&argc,&argv);
 | 
			
		||||
 | 
			
		||||
  Coordinate latt_size   = GridDefaultLatt();
 | 
			
		||||
@@ -155,4 +156,5 @@ int main (int argc, char ** argv)
 | 
			
		||||
 | 
			
		||||
  std::cout<< GridLogMessage << "Done" <<std::endl;
 | 
			
		||||
  Grid_finalize();
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -30,9 +30,10 @@ See the full license in the file "LICENSE" in the top level distribution directo
 | 
			
		||||
 | 
			
		||||
#include <Grid/Grid.h>
 | 
			
		||||
 | 
			
		||||
#ifdef ENABLE_GPARITY
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
using namespace Grid;
 | 
			
		||||
 ;
 | 
			
		||||
 | 
			
		||||
typedef GparityWilsonImplD FermionImplPolicyD;
 | 
			
		||||
typedef GparityMobiusEOFAFermionD FermionActionD;
 | 
			
		||||
@@ -231,3 +232,7 @@ int main (int argc, char** argv)
 | 
			
		||||
  std::cout << GridLogMessage << "Done" << std::endl;
 | 
			
		||||
  Grid_finalize();
 | 
			
		||||
}
 | 
			
		||||
#else
 | 
			
		||||
int main(int argc,char ** argv) { return 0;};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -31,14 +31,14 @@ See the full license in the file "LICENSE" in the top level distribution directo
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
using namespace Grid;
 | 
			
		||||
 ;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef GparityWilsonImplR FermionImplPolicy;
 | 
			
		||||
typedef GparityMobiusEOFAFermionD FermionAction;
 | 
			
		||||
typedef typename FermionAction::FermionField FermionField;
 | 
			
		||||
 | 
			
		||||
int main (int argc, char** argv)
 | 
			
		||||
{
 | 
			
		||||
#ifdef ENABLE_GPARITY
 | 
			
		||||
  Grid_init(&argc, &argv);
 | 
			
		||||
 | 
			
		||||
  Coordinate latt_size   = GridDefaultLatt();
 | 
			
		||||
@@ -171,4 +171,5 @@ int main (int argc, char** argv)
 | 
			
		||||
 | 
			
		||||
  std::cout << GridLogMessage << "Done" << std::endl;
 | 
			
		||||
  Grid_finalize();
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -30,7 +30,7 @@
 | 
			
		||||
 | 
			
		||||
using namespace Grid;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef ENABLE_GPARITY
 | 
			
		||||
 | 
			
		||||
template<typename FermionField2f, typename FermionField1f>
 | 
			
		||||
void copy2fTo1fFermionField(FermionField1f &out, const FermionField2f &in, int gpdir){
 | 
			
		||||
@@ -255,3 +255,6 @@ int main(int argc, char **argv) {
 | 
			
		||||
} // main
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#else
 | 
			
		||||
int main(int argc, char **argv){};
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -30,6 +30,7 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int main(int argc, char **argv) {
 | 
			
		||||
#ifdef ENABLE_GPARITY
 | 
			
		||||
  using namespace Grid;
 | 
			
		||||
   ;
 | 
			
		||||
 | 
			
		||||
@@ -139,7 +140,7 @@ int main(int argc, char **argv) {
 | 
			
		||||
  Grid_finalize();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
} // main
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -55,13 +55,13 @@ namespace Grid{
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
  struct SmearingParameters: Serializable {
 | 
			
		||||
    GRID_SERIALIZABLE_CLASS_MEMBERS(SmearingParameters,
 | 
			
		||||
  struct HmcSmearingParameters: Serializable {
 | 
			
		||||
    GRID_SERIALIZABLE_CLASS_MEMBERS(HmcSmearingParameters,
 | 
			
		||||
				    double, rho,
 | 
			
		||||
				    Integer, Nsmear)
 | 
			
		||||
 | 
			
		||||
    template <class ReaderClass >
 | 
			
		||||
    SmearingParameters(Reader<ReaderClass>& Reader){
 | 
			
		||||
    HmcSmearingParameters(Reader<ReaderClass>& Reader){
 | 
			
		||||
      read(Reader, "StoutSmearing", *this);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -213,7 +213,7 @@ int main(int argc, char **argv) {
 | 
			
		||||
  // Reset performance counters 
 | 
			
		||||
 | 
			
		||||
  if (ApplySmearing){
 | 
			
		||||
    SmearingParameters SmPar(Reader);
 | 
			
		||||
    HmcSmearingParameters SmPar(Reader);
 | 
			
		||||
    //double rho = 0.1;  // smearing parameter
 | 
			
		||||
    //int Nsmear = 3;    // number of smearing levels
 | 
			
		||||
    Smear_Stout<HMCWrapper::ImplPolicy> Stout(SmPar.rho);
 | 
			
		||||
 
 | 
			
		||||
@@ -35,6 +35,8 @@ Author: Peter Boyle <paboyle@ph.ed.ac.uk>
 | 
			
		||||
#include <Grid/algorithms/iterative/ImplicitlyRestartedLanczos.h>
 | 
			
		||||
#include <Grid/algorithms/iterative/LocalCoherenceLanczos.h>
 | 
			
		||||
 | 
			
		||||
#ifdef ENABLE_GPARITY
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
using namespace Grid;
 | 
			
		||||
 | 
			
		||||
@@ -378,7 +380,8 @@ void runTest(const Options &opt){
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//Note:  because we rely upon physical properties we must use a "real" gauge configuration
 | 
			
		||||
int main (int argc, char ** argv) {
 | 
			
		||||
int main (int argc, char ** argv)
 | 
			
		||||
{
 | 
			
		||||
  Grid_init(&argc,&argv);
 | 
			
		||||
  GridLogIRL.TimingMode(1);
 | 
			
		||||
 | 
			
		||||
@@ -482,4 +485,8 @@ int main (int argc, char ** argv) {
 | 
			
		||||
  
 | 
			
		||||
  Grid_finalize();
 | 
			
		||||
}
 | 
			
		||||
#else
 | 
			
		||||
int main(int argc, char **argv){};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -29,11 +29,11 @@ Author: Peter Boyle <paboyle@ph.ed.ac.uk>
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
using namespace Grid;
 | 
			
		||||
 ;
 | 
			
		||||
 | 
			
		||||
template<typename Action>
 | 
			
		||||
struct Setup{};
 | 
			
		||||
 | 
			
		||||
#ifdef ENABLE_GPARITY
 | 
			
		||||
template<>
 | 
			
		||||
struct Setup<GparityMobiusFermionF>{
 | 
			
		||||
  static GparityMobiusFermionF* getAction(LatticeGaugeFieldF &Umu,
 | 
			
		||||
@@ -47,16 +47,24 @@ struct Setup<GparityMobiusFermionF>{
 | 
			
		||||
    return new GparityMobiusFermionF(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,mob_b,mob_b-1.,params);
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
template<>
 | 
			
		||||
struct Setup<DomainWallFermionF>{
 | 
			
		||||
  static DomainWallFermionF* getAction(LatticeGaugeFieldF &Umu,
 | 
			
		||||
					  GridCartesian* FGrid, GridRedBlackCartesian* FrbGrid, GridCartesian* UGrid, GridRedBlackCartesian* UrbGrid){
 | 
			
		||||
    RealD mass=0.00054;
 | 
			
		||||
    RealD M5=1.8;
 | 
			
		||||
    return new DomainWallFermionF(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
template<>
 | 
			
		||||
struct Setup<DomainWallFermionD>{
 | 
			
		||||
  static DomainWallFermionD* getAction(LatticeGaugeField &Umu,
 | 
			
		||||
					  GridCartesian* FGrid, GridRedBlackCartesian* FrbGrid, GridCartesian* UGrid, GridRedBlackCartesian* UrbGrid){
 | 
			
		||||
    RealD mass=0.00054;
 | 
			
		||||
    RealD M5=1.8;
 | 
			
		||||
    return new DomainWallFermionF(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
 | 
			
		||||
    return new DomainWallFermionD(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@@ -168,7 +176,9 @@ int main (int argc, char ** argv)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if(action == "GparityMobius"){
 | 
			
		||||
#ifdef ENABLE_GPARITY    
 | 
			
		||||
    run<GparityMobiusFermionF>();
 | 
			
		||||
#endif    
 | 
			
		||||
  }else if(action == "DWF"){
 | 
			
		||||
    run<DomainWallFermionF>();
 | 
			
		||||
  }else if(action == "Mobius"){
 | 
			
		||||
 
 | 
			
		||||
@@ -555,6 +555,7 @@ int main (int argc, char ** argv) {
 | 
			
		||||
  double c = (args.mobius_scale - bmc)/2.;  // c = 1/2 [ (b+c) - (b-c) ]
 | 
			
		||||
    
 | 
			
		||||
  if(is_gparity){
 | 
			
		||||
#ifdef ENABLE_GPARITY    
 | 
			
		||||
    GparityWilsonImplD::ImplParams Params = setupGparityParams(args.GparityDirs);
 | 
			
		||||
    readConfiguration<ConjugateGimplD>(Umu, config, args.is_cps_cfg);   //Read the gauge field
 | 
			
		||||
    
 | 
			
		||||
@@ -565,6 +566,9 @@ int main (int argc, char ** argv) {
 | 
			
		||||
      GparityMobiusFermionD action(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, args.mass, args.M5, b, c, Params);
 | 
			
		||||
      run(action, config, args);	    
 | 
			
		||||
    }
 | 
			
		||||
#else
 | 
			
		||||
    assert(0);
 | 
			
		||||
#endif
 | 
			
		||||
  }else{
 | 
			
		||||
    WilsonImplD::ImplParams Params = setupParams();
 | 
			
		||||
    readConfiguration<PeriodicGimplD>(Umu, config, args.is_cps_cfg);   //Read the gauge field
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
*************************************************************************************
 | 
			
		||||
/*************************************************************************************
 | 
			
		||||
 | 
			
		||||
Grid physics library, www.github.com/paboyle/Grid
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -165,6 +165,7 @@ int main (int argc, char ** argv)
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  if(gparity){
 | 
			
		||||
#ifdef ENABLE_GPARITY
 | 
			
		||||
    std::cout << "Running test with G-parity BCs in " << gpdir << " direction" << std::endl;
 | 
			
		||||
    GparityWilsonImplParams params;
 | 
			
		||||
    params.twists[gpdir] = 1;
 | 
			
		||||
@@ -174,6 +175,9 @@ int main (int argc, char ** argv)
 | 
			
		||||
    ConjugateGimplD::setDirections(conj_dirs);
 | 
			
		||||
 | 
			
		||||
    run_test<GparityDomainWallFermionD, GparityDomainWallFermionF, ConjugateGaugeStatistics>(argc,argv,params);
 | 
			
		||||
#else
 | 
			
		||||
    std::cout << " Gparity is not compiled "<<std::endl;
 | 
			
		||||
#endif
 | 
			
		||||
  }else{
 | 
			
		||||
    std::cout << "Running test with periodic BCs" << std::endl;
 | 
			
		||||
    WilsonImplParams params;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user