From 99445673f65e3792c5e14a3c634da7c40c2dfa33 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Thu, 14 Jan 2021 21:00:36 -0500 Subject: [PATCH] Gparity fix, and plaquette IO --- Grid/parallelIO/IldgIO.h | 22 +++--- Grid/parallelIO/MetaData.h | 34 +++----- Grid/parallelIO/NerscIO.h | 46 +++++------ Grid/parallelIO/OpenQcdIO.h | 2 +- Grid/parallelIO/OpenQcdIOChromaReference.h | 2 +- Grid/qcd/action/gauge/Gauge.cc | 38 +++++++++ Grid/qcd/action/gauge/GaugeImplementations.h | 79 +++++++++++-------- Grid/qcd/hmc/checkpointers/BaseCheckpointer.h | 3 +- Grid/qcd/hmc/checkpointers/ILDGCheckpointer.h | 5 +- .../qcd/hmc/checkpointers/NerscCheckpointer.h | 7 +- Grid/qcd/modules/Modules.h | 2 +- Grid/qcd/utils/CovariantCshift.h | 51 ++++++++++++ Grid/tensors/Tensor_Ta.h | 14 +++- tests/core/Test_reunitarise.cc | 3 +- tests/hmc/Test_hmc_EODWFRatio_Gparity.cc | 7 +- tests/hmc/Test_hmc_GparityIwasakiGauge.cc | 4 + tests/hmc/Test_hmc_GparityWilsonGauge.cc | 3 + 17 files changed, 220 insertions(+), 102 deletions(-) create mode 100644 Grid/qcd/action/gauge/Gauge.cc diff --git a/Grid/parallelIO/IldgIO.h b/Grid/parallelIO/IldgIO.h index b564371b..ef42c159 100644 --- a/Grid/parallelIO/IldgIO.h +++ b/Grid/parallelIO/IldgIO.h @@ -123,7 +123,7 @@ assert(GRID_FIELD_NORM_CALC(FieldNormMetaData_, n2ck) < 1.0e-5); //////////////////////////////////////////////////////////// // Helper to fill out metadata //////////////////////////////////////////////////////////// - template void ScidacMetaData(Lattice & field, +template void ScidacMetaData(Lattice & field, FieldMetaData &header, scidacRecord & _scidacRecord, scidacFile & _scidacFile) @@ -619,12 +619,12 @@ class IldgWriter : public ScidacWriter { // Don't require scidac records EXCEPT checksum // Use Grid MetaData object if present. //////////////////////////////////////////////////////////////// - template - void writeConfiguration(Lattice > &Umu,int sequence,std::string LFN,std::string description) + template + void writeConfiguration(Lattice &Umu,int sequence,std::string LFN,std::string description) { GridBase * grid = Umu.Grid(); - typedef Lattice > GaugeField; - typedef iLorentzColourMatrix vobj; + typedef Lattice GaugeField; + typedef vLorentzColourMatrixD vobj; typedef typename vobj::scalar_object sobj; //////////////////////////////////////// @@ -636,6 +636,9 @@ class IldgWriter : public ScidacWriter { ScidacMetaData(Umu,header,_scidacRecord,_scidacFile); + stats Stats; + Stats(Umu,header); + std::string format = header.floating_point; header.ensemble_id = description; header.ensemble_label = description; @@ -705,10 +708,10 @@ class IldgReader : public GridLimeReader { // Else use ILDG MetaData object if present. // Else use SciDAC MetaData object if present. //////////////////////////////////////////////////////////////// - template - void readConfiguration(Lattice > &Umu, FieldMetaData &FieldMetaData_) { + template + void readConfiguration(Lattice &Umu, FieldMetaData &FieldMetaData_) { - typedef Lattice > GaugeField; + typedef Lattice GaugeField; typedef typename GaugeField::vector_object vobj; typedef typename vobj::scalar_object sobj; @@ -921,7 +924,8 @@ class IldgReader : public GridLimeReader { if ( found_FieldMetaData || found_usqcdInfo ) { FieldMetaData checker; - GaugeStatistics(Umu,checker); + stats Stats; + Stats(Umu,checker); assert(fabs(checker.plaquette - FieldMetaData_.plaquette )<1.0e-5); assert(fabs(checker.link_trace - FieldMetaData_.link_trace)<1.0e-5); std::cout << GridLogMessage<<"Plaquette and link trace match " << std::endl; diff --git a/Grid/parallelIO/MetaData.h b/Grid/parallelIO/MetaData.h index 4c1cfbdb..d30ba523 100644 --- a/Grid/parallelIO/MetaData.h +++ b/Grid/parallelIO/MetaData.h @@ -176,29 +176,18 @@ template inline void PrepareMetaData(Lattice & field, FieldMet GridMetaData(grid,header); MachineCharacteristics(header); } -inline void GaugeStatistics(Lattice & data,FieldMetaData &header) +template +class GaugeStatistics { - // How to convert data precision etc... - header.link_trace=WilsonLoops::linkTrace(data); - header.plaquette =WilsonLoops::avgPlaquette(data); -} -inline void GaugeStatistics(Lattice & data,FieldMetaData &header) -{ - // How to convert data precision etc... - header.link_trace=WilsonLoops::linkTrace(data); - header.plaquette =WilsonLoops::avgPlaquette(data); -} -template<> inline void PrepareMetaData(Lattice & field, FieldMetaData &header) -{ - - GridBase *grid = field.Grid(); - std::string format = getFormatString(); - header.floating_point = format; - header.checksum = 0x0; // Nersc checksum unused in ILDG, Scidac - GridMetaData(grid,header); - GaugeStatistics(field,header); - MachineCharacteristics(header); -} +public: + void operator()(Lattice & data,FieldMetaData &header) + { + header.link_trace=WilsonLoops::linkTrace(data); + header.plaquette =WilsonLoops::avgPlaquette(data); + } +}; +typedef GaugeStatistics PeriodicGaugeStatistics; +typedef GaugeStatistics ConjugateGaugeStatistics; template<> inline void PrepareMetaData(Lattice & field, FieldMetaData &header) { GridBase *grid = field.Grid(); @@ -206,7 +195,6 @@ template<> inline void PrepareMetaData(Lattice GaugeField; + static inline void truncate(std::string file){ std::ofstream fout(file,std::ios::out); } @@ -129,12 +131,12 @@ public: // Now the meat: the object readers ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - template - static inline void readConfiguration(Lattice > &Umu, + template + static inline void readConfiguration(GaugeField &Umu, FieldMetaData& header, - std::string file) + std::string file, + GaugeStats GaugeStatisticsCalculator=GaugeStats()) { - typedef Lattice > GaugeField; GridBase *grid = Umu.Grid(); uint64_t offset = readHeader(file,Umu.Grid(),header); @@ -153,23 +155,23 @@ public: // munger is a function of if ( header.data_type == std::string("4D_SU3_GAUGE") ) { if ( ieee32 || ieee32big ) { - BinaryIO::readLatticeObject, LorentzColour2x3F> + BinaryIO::readLatticeObject (Umu,file,Gauge3x2munger(), offset,format, nersc_csum,scidac_csuma,scidac_csumb); } if ( ieee64 || ieee64big ) { - BinaryIO::readLatticeObject, LorentzColour2x3D> + BinaryIO::readLatticeObject (Umu,file,Gauge3x2munger(),offset,format, nersc_csum,scidac_csuma,scidac_csumb); } } else if ( header.data_type == std::string("4D_SU3_GAUGE_3x3") ) { if ( ieee32 || ieee32big ) { - BinaryIO::readLatticeObject,LorentzColourMatrixF> + BinaryIO::readLatticeObject (Umu,file,GaugeSimpleMunger(),offset,format, nersc_csum,scidac_csuma,scidac_csumb); } if ( ieee64 || ieee64big ) { - BinaryIO::readLatticeObject,LorentzColourMatrixD> + BinaryIO::readLatticeObject (Umu,file,GaugeSimpleMunger(),offset,format, nersc_csum,scidac_csuma,scidac_csumb); } @@ -177,7 +179,7 @@ public: assert(0); } - GaugeStatistics(Umu,clone); + GaugeStats Stats; Stats(Umu,clone); std::cout< - static inline void writeConfiguration(Lattice > &Umu, + template + static inline void writeConfiguration(Lattice &Umu, std::string file, int two_row, int bits32) { - typedef Lattice > GaugeField; - - typedef iLorentzColourMatrix vobj; + typedef vLorentzColourMatrixD vobj; typedef typename vobj::scalar_object sobj; FieldMetaData header; @@ -229,7 +229,7 @@ public: GridMetaData(grid,header); assert(header.nd==4); - GaugeStatistics(Umu,header); + GaugeStats Stats; Stats(Umu,header); MachineCharacteristics(header); uint64_t offset; @@ -238,19 +238,19 @@ public: header.floating_point = std::string("IEEE64BIG"); header.data_type = std::string("4D_SU3_GAUGE_3x3"); GaugeSimpleUnmunger munge; - if ( grid->IsBoss() ) { - truncate(file); - offset = writeHeader(header,file); - } - grid->Broadcast(0,(void *)&offset,sizeof(offset)); + if ( grid->IsBoss() ) { + truncate(file); + offset = writeHeader(header,file); + } + grid->Broadcast(0,(void *)&offset,sizeof(offset)); uint32_t nersc_csum,scidac_csuma,scidac_csumb; BinaryIO::writeLatticeObject(Umu,file,munge,offset,header.floating_point, nersc_csum,scidac_csuma,scidac_csumb); header.checksum = nersc_csum; - if ( grid->IsBoss() ) { - writeHeader(header,file); - } + if ( grid->IsBoss() ) { + writeHeader(header,file); + } std::cout<Barrier(); timer.Stop(); std::cout << Grid::GridLogMessage << "OpenQcdIO::readConfiguration: redistribute overhead " << timer.Elapsed() << std::endl; - GaugeStatistics(Umu, clone); + PeriodicGaugeStatistics Stats; Stats(Umu, clone); RealD plaq_diff = fabs(clone.plaquette - header.plaquette); diff --git a/Grid/parallelIO/OpenQcdIOChromaReference.h b/Grid/parallelIO/OpenQcdIOChromaReference.h index bab54fe8..886536ad 100644 --- a/Grid/parallelIO/OpenQcdIOChromaReference.h +++ b/Grid/parallelIO/OpenQcdIOChromaReference.h @@ -208,7 +208,7 @@ public: FieldMetaData clone(header); - GaugeStatistics(Umu, clone); + PeriodicGaugeStatistics Stats; Stats(Umu, clone); RealD plaq_diff = fabs(clone.plaquette - header.plaquette); diff --git a/Grid/qcd/action/gauge/Gauge.cc b/Grid/qcd/action/gauge/Gauge.cc new file mode 100644 index 00000000..2b5e2691 --- /dev/null +++ b/Grid/qcd/action/gauge/Gauge.cc @@ -0,0 +1,38 @@ +/************************************************************************************* + +Grid physics library, www.github.com/paboyle/Grid + +Source file: ./lib/qcd/action/gauge/Gauge.cc + +Copyright (C) 2020 + +Author: Peter Boyle +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 + +NAMESPACE_BEGIN(Grid); + +std::vector ConjugateGaugeImplBase::_conjDirs; + +NAMESPACE_END(Grid); + diff --git a/Grid/qcd/action/gauge/GaugeImplementations.h b/Grid/qcd/action/gauge/GaugeImplementations.h index a14aec1b..16147c77 100644 --- a/Grid/qcd/action/gauge/GaugeImplementations.h +++ b/Grid/qcd/action/gauge/GaugeImplementations.h @@ -59,14 +59,14 @@ public: } static inline GaugeLinkField CovShiftIdentityBackward(const GaugeLinkField &Link, int mu) { - return Cshift(adj(Link), mu, -1); + return PeriodicBC::CovShiftIdentityBackward(Link, mu); } static inline GaugeLinkField CovShiftIdentityForward(const GaugeLinkField &Link, int mu) { - return Link; + return PeriodicBC::CovShiftIdentityForward(Link,mu); } static inline GaugeLinkField ShiftStaple(const GaugeLinkField &Link, int mu) { - return Cshift(Link, mu, 1); + return PeriodicBC::ShiftStaple(Link,mu); } static inline bool isPeriodicGaugeField(void) { return true; } @@ -74,7 +74,13 @@ public: // Composition with smeared link, bc's etc.. probably need multiple inheritance // Variable precision "S" and variable Nc -template class ConjugateGaugeImpl : public GimplTypes { +class ConjugateGaugeImplBase { +protected: + static std::vector _conjDirs; +}; + + template class ConjugateGaugeImpl : public GimplTypes, ConjugateGaugeImplBase { +private: public: INHERIT_GIMPL_TYPES(GimplTypes); @@ -84,47 +90,56 @@ public: //////////////////////////////////////////////////////////////////////////////////////////////////////////// template static Lattice CovShiftForward(const GaugeLinkField &Link, int mu, - const Lattice &field) { - return ConjugateBC::CovShiftForward(Link, mu, field); + const Lattice &field) + { + assert(_conjDirs.size() == Nd); + if(_conjDirs[mu]) + return ConjugateBC::CovShiftForward(Link, mu, field); + else + return PeriodicBC::CovShiftForward(Link, mu, field); } template static Lattice CovShiftBackward(const GaugeLinkField &Link, int mu, - const Lattice &field) { - return ConjugateBC::CovShiftBackward(Link, mu, field); + const Lattice &field) + { + assert(_conjDirs.size() == Nd); + if(_conjDirs[mu]) + return ConjugateBC::CovShiftBackward(Link, mu, field); + else + return PeriodicBC::CovShiftBackward(Link, mu, field); } static inline GaugeLinkField - CovShiftIdentityBackward(const GaugeLinkField &Link, int mu) { - GridBase *grid = Link.Grid(); - int Lmu = grid->GlobalDimensions()[mu] - 1; - - Lattice> coor(grid); - LatticeCoordinate(coor, mu); - - GaugeLinkField tmp(grid); - tmp = adj(Link); - tmp = where(coor == Lmu, conjugate(tmp), tmp); - return Cshift(tmp, mu, -1); // moves towards positive mu + CovShiftIdentityBackward(const GaugeLinkField &Link, int mu) + { + assert(_conjDirs.size() == Nd); + if(_conjDirs[mu]) + return ConjugateBC::CovShiftIdentityBackward(Link, mu); + else + return PeriodicBC::CovShiftIdentityBackward(Link, mu); } static inline GaugeLinkField - CovShiftIdentityForward(const GaugeLinkField &Link, int mu) { - return Link; + CovShiftIdentityForward(const GaugeLinkField &Link, int mu) + { + assert(_conjDirs.size() == Nd); + if(_conjDirs[mu]) + return ConjugateBC::CovShiftIdentityForward(Link,mu); + else + return PeriodicBC::CovShiftIdentityForward(Link,mu); } - static inline GaugeLinkField ShiftStaple(const GaugeLinkField &Link, int mu) { - GridBase *grid = Link.Grid(); - int Lmu = grid->GlobalDimensions()[mu] - 1; - - Lattice> coor(grid); - LatticeCoordinate(coor, mu); - - GaugeLinkField tmp(grid); - tmp = Cshift(Link, mu, 1); - tmp = where(coor == Lmu, conjugate(tmp), tmp); - return tmp; + static inline GaugeLinkField ShiftStaple(const GaugeLinkField &Link, int mu) + { + assert(_conjDirs.size() == Nd); + if(_conjDirs[mu]) + return ConjugateBC::ShiftStaple(Link,mu); + else + return PeriodicBC::ShiftStaple(Link,mu); } + static inline void setDirections(std::vector &conjDirs) { _conjDirs=conjDirs; } + static inline std::vector getDirections(void) { return _conjDirs; } static inline bool isPeriodicGaugeField(void) { return false; } }; diff --git a/Grid/qcd/hmc/checkpointers/BaseCheckpointer.h b/Grid/qcd/hmc/checkpointers/BaseCheckpointer.h index 3cd05ebc..c09fdeeb 100644 --- a/Grid/qcd/hmc/checkpointers/BaseCheckpointer.h +++ b/Grid/qcd/hmc/checkpointers/BaseCheckpointer.h @@ -74,7 +74,7 @@ public: conf_file = os.str(); } } - + virtual ~BaseHmcCheckpointer(){}; void check_filename(const std::string &filename){ std::ifstream f(filename.c_str()); if(!f.good()){ @@ -82,7 +82,6 @@ public: abort(); }; } - virtual void initialize(const CheckpointerParameters &Params) = 0; virtual void CheckpointRestore(int traj, typename Impl::Field &U, diff --git a/Grid/qcd/hmc/checkpointers/ILDGCheckpointer.h b/Grid/qcd/hmc/checkpointers/ILDGCheckpointer.h index 269caa6e..1bb8aa1a 100644 --- a/Grid/qcd/hmc/checkpointers/ILDGCheckpointer.h +++ b/Grid/qcd/hmc/checkpointers/ILDGCheckpointer.h @@ -45,6 +45,7 @@ private: public: INHERIT_GIMPL_TYPES(Implementation); + typedef GaugeStatistics GaugeStats; ILDGHmcCheckpointer(const CheckpointerParameters &Params_) { initialize(Params_); } @@ -78,7 +79,7 @@ public: BinaryIO::writeRNG(sRNG, pRNG, rng, 0,nersc_csum,scidac_csuma,scidac_csumb); IldgWriter _IldgWriter(grid->IsBoss()); _IldgWriter.open(config); - _IldgWriter.writeConfiguration(U, traj, config, config); + _IldgWriter.writeConfiguration(U, traj, config, config); _IldgWriter.close(); std::cout << GridLogMessage << "Written ILDG Configuration on " << config @@ -105,7 +106,7 @@ public: FieldMetaData header; IldgReader _IldgReader; _IldgReader.open(config); - _IldgReader.readConfiguration(U,header); // format from the header + _IldgReader.readConfiguration(U,header); // format from the header _IldgReader.close(); std::cout << GridLogMessage << "Read ILDG Configuration from " << config diff --git a/Grid/qcd/hmc/checkpointers/NerscCheckpointer.h b/Grid/qcd/hmc/checkpointers/NerscCheckpointer.h index cfcc44d8..4534e4c4 100644 --- a/Grid/qcd/hmc/checkpointers/NerscCheckpointer.h +++ b/Grid/qcd/hmc/checkpointers/NerscCheckpointer.h @@ -43,7 +43,8 @@ private: public: INHERIT_GIMPL_TYPES(Gimpl); // only for gauge configurations - + typedef GaugeStatistics GaugeStats; + NerscHmcCheckpointer(const CheckpointerParameters &Params_) { initialize(Params_); } void initialize(const CheckpointerParameters &Params_) { @@ -60,7 +61,7 @@ public: int precision32 = 1; int tworow = 0; NerscIO::writeRNGState(sRNG, pRNG, rng); - NerscIO::writeConfiguration(U, config, tworow, precision32); + NerscIO::writeConfiguration(U, config, tworow, precision32); } }; @@ -74,7 +75,7 @@ public: FieldMetaData header; NerscIO::readRNGState(sRNG, pRNG, header, rng); - NerscIO::readConfiguration(U, header, config); + NerscIO::readConfiguration(U, header, config); }; }; diff --git a/Grid/qcd/modules/Modules.h b/Grid/qcd/modules/Modules.h index 1c1c8889..7aa3f0ac 100644 --- a/Grid/qcd/modules/Modules.h +++ b/Grid/qcd/modules/Modules.h @@ -99,7 +99,7 @@ public: virtual Prod* getPtr() = 0; // add a getReference? - + virtual ~HMCModuleBase(){}; virtual void print_parameters(){}; // default to nothing }; diff --git a/Grid/qcd/utils/CovariantCshift.h b/Grid/qcd/utils/CovariantCshift.h index cee1fa12..6c70706f 100644 --- a/Grid/qcd/utils/CovariantCshift.h +++ b/Grid/qcd/utils/CovariantCshift.h @@ -53,6 +53,24 @@ namespace PeriodicBC { return Cshift(tmp,mu,-1);// moves towards positive mu } + template Lattice + CovShiftIdentityBackward(const Lattice &Link, int mu) + { + return Cshift(adj(Link), mu, -1); + } + + template Lattice + CovShiftIdentityForward(const Lattice &Link, int mu) + { + return Link; + } + + template Lattice + ShiftStaple(const Lattice &Link, int mu) + { + return Cshift(Link, mu, 1); + } + template::value,void>::type * = nullptr> auto CovShiftForward(const Lattice &Link, int mu, @@ -70,6 +88,7 @@ namespace PeriodicBC { return CovShiftBackward(Link,mu,arg); } + } @@ -139,6 +158,38 @@ namespace ConjugateBC { // std::cout<<"Gparity::CovCshiftBackward mu="< Lattice + CovShiftIdentityBackward(const Lattice &Link, int mu) { + GridBase *grid = Link.Grid(); + int Lmu = grid->GlobalDimensions()[mu] - 1; + + Lattice> coor(grid); + LatticeCoordinate(coor, mu); + + Lattice tmp(grid); + tmp = adj(Link); + tmp = where(coor == Lmu, conjugate(tmp), tmp); + return Cshift(tmp, mu, -1); // moves towards positive mu + } + template Lattice + CovShiftIdentityForward(const Lattice &Link, int mu) { + return Link; + } + + template Lattice + ShiftStaple(const Lattice &Link, int mu) + { + GridBase *grid = Link.Grid(); + int Lmu = grid->GlobalDimensions()[mu] - 1; + + Lattice> coor(grid); + LatticeCoordinate(coor, mu); + + Lattice tmp(grid); + tmp = Cshift(Link, mu, 1); + tmp = where(coor == Lmu, conjugate(tmp), tmp); + return tmp; + } template::value,void>::type * = nullptr> auto CovShiftForward(const Lattice &Link, diff --git a/Grid/tensors/Tensor_Ta.h b/Grid/tensors/Tensor_Ta.h index bbaa4a00..90e57b2b 100644 --- a/Grid/tensors/Tensor_Ta.h +++ b/Grid/tensors/Tensor_Ta.h @@ -117,7 +117,19 @@ accelerator_inline iMatrix ProjectOnGroup(const iMatrix &arg) ret._internal[b][c] -= pr * ret._internal[c1][c]; } } - + } + + // Normalise last row + { + int c1 = N-1; + zeroit(inner); + for(int c2=0;c2(U,Nc-1,i); element = element * phase; PokeIndex(U,element,Nc-1,i); - } + } + U=U*0.1; UU=U; detU= Determinant(U) ; diff --git a/tests/hmc/Test_hmc_EODWFRatio_Gparity.cc b/tests/hmc/Test_hmc_EODWFRatio_Gparity.cc index 3434fccc..9ca0b0a0 100644 --- a/tests/hmc/Test_hmc_EODWFRatio_Gparity.cc +++ b/tests/hmc/Test_hmc_EODWFRatio_Gparity.cc @@ -81,6 +81,10 @@ int main(int argc, char **argv) { // that have a complex construction // standard RealD beta = 5.6 ; + const int nu = 3; + std::vector twists(Nd,0); + twists[nu] = 1; + ConjugateGimplD::setDirections(twists); ConjugateWilsonGaugeActionR Waction(beta); const int Ls = 8; @@ -93,9 +97,6 @@ int main(int argc, char **argv) { // temporarily need a gauge field LatticeGaugeField U(GridPtr); - const int nu = 3; - std::vector twists(Nd,0); - twists[nu] = 1; FermionAction::ImplParams params; params.twists = twists; Real mass=0.04; diff --git a/tests/hmc/Test_hmc_GparityIwasakiGauge.cc b/tests/hmc/Test_hmc_GparityIwasakiGauge.cc index bc47b6c2..7f74d5d8 100644 --- a/tests/hmc/Test_hmc_GparityIwasakiGauge.cc +++ b/tests/hmc/Test_hmc_GparityIwasakiGauge.cc @@ -79,6 +79,10 @@ int main(int argc, char **argv) { // that have a complex construction // standard RealD beta = 2.6 ; + const int nu = 3; + std::vector twists(Nd,0); + twists[nu] = 1; + ConjugateGimplD::setDirections(twists); ConjugateIwasakiGaugeActionR Waction(beta); diff --git a/tests/hmc/Test_hmc_GparityWilsonGauge.cc b/tests/hmc/Test_hmc_GparityWilsonGauge.cc index eb057181..b8c078fe 100644 --- a/tests/hmc/Test_hmc_GparityWilsonGauge.cc +++ b/tests/hmc/Test_hmc_GparityWilsonGauge.cc @@ -80,6 +80,9 @@ int main(int argc, char **argv) { // that have a complex construction // standard RealD beta = 5.6 ; + std::vector twists(Nd,0); + twists[3] = 1; + ConjugateGimplD::setDirections(twists); ConjugateWilsonGaugeActionR Waction(beta);