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