diff --git a/Grid/GridCore.h b/Grid/GridCore.h index 8e04a859..41c64ef6 100644 --- a/Grid/GridCore.h +++ b/Grid/GridCore.h @@ -44,10 +44,10 @@ Author: paboyle #include #include #include -#include //#include #include #include +#include #include #include #include diff --git a/Grid/algorithms/CoarsenedMatrix.h b/Grid/algorithms/CoarsenedMatrix.h index ba4abecd..7008008c 100644 --- a/Grid/algorithms/CoarsenedMatrix.h +++ b/Grid/algorithms/CoarsenedMatrix.h @@ -324,9 +324,9 @@ public: GridBase* _cbgrid; int hermitian; - CartesianStencil Stencil; - CartesianStencil StencilEven; - CartesianStencil StencilOdd; + CartesianStencil Stencil; + CartesianStencil StencilEven; + CartesianStencil StencilOdd; std::vector A; std::vector Aeven; @@ -631,7 +631,7 @@ public: assert(Aself != nullptr); } - void DselfInternal(CartesianStencil &st, CoarseMatrix &a, + void DselfInternal(CartesianStencil &st, CoarseMatrix &a, const CoarseVector &in, CoarseVector &out, int dag) { int point = geom.npoint-1; autoView( out_v, out, AcceleratorWrite); @@ -694,7 +694,7 @@ public: } } - void DhopInternal(CartesianStencil &st, std::vector &a, + void DhopInternal(CartesianStencil &st, std::vector &a, const CoarseVector &in, CoarseVector &out, int dag) { SimpleCompressor compressor; @@ -784,9 +784,9 @@ public: _cbgrid(new GridRedBlackCartesian(&CoarseGrid)), geom(CoarseGrid._ndimension), hermitian(hermitian_), - Stencil(&CoarseGrid,geom.npoint,Even,geom.directions,geom.displacements,0), - StencilEven(_cbgrid,geom.npoint,Even,geom.directions,geom.displacements,0), - StencilOdd(_cbgrid,geom.npoint,Odd,geom.directions,geom.displacements,0), + Stencil(&CoarseGrid,geom.npoint,Even,geom.directions,geom.displacements), + StencilEven(_cbgrid,geom.npoint,Even,geom.directions,geom.displacements), + StencilOdd(_cbgrid,geom.npoint,Odd,geom.directions,geom.displacements), A(geom.npoint,&CoarseGrid), Aeven(geom.npoint,_cbgrid), Aodd(geom.npoint,_cbgrid), @@ -804,9 +804,9 @@ public: _cbgrid(&CoarseRBGrid), geom(CoarseGrid._ndimension), hermitian(hermitian_), - Stencil(&CoarseGrid,geom.npoint,Even,geom.directions,geom.displacements,0), - StencilEven(&CoarseRBGrid,geom.npoint,Even,geom.directions,geom.displacements,0), - StencilOdd(&CoarseRBGrid,geom.npoint,Odd,geom.directions,geom.displacements,0), + Stencil(&CoarseGrid,geom.npoint,Even,geom.directions,geom.displacements), + StencilEven(&CoarseRBGrid,geom.npoint,Even,geom.directions,geom.displacements), + StencilOdd(&CoarseRBGrid,geom.npoint,Odd,geom.directions,geom.displacements), A(geom.npoint,&CoarseGrid), Aeven(geom.npoint,&CoarseRBGrid), Aodd(geom.npoint,&CoarseRBGrid), diff --git a/Grid/algorithms/LinearOperator.h b/Grid/algorithms/LinearOperator.h index b1cf4d97..090fed46 100644 --- a/Grid/algorithms/LinearOperator.h +++ b/Grid/algorithms/LinearOperator.h @@ -526,6 +526,7 @@ public: (*this)(Linop,in[k],out[k]); } }; + virtual ~OperatorFunction(){}; }; template class LinearFunction { diff --git a/Grid/algorithms/approx/Chebyshev.h b/Grid/algorithms/approx/Chebyshev.h index 7c93f0b8..1d6984f3 100644 --- a/Grid/algorithms/approx/Chebyshev.h +++ b/Grid/algorithms/approx/Chebyshev.h @@ -258,26 +258,12 @@ public: for(int n=2;nView(); - auto Tnp_v = Tnp->View(); - auto Tnm_v = Tnm->View(); - constexpr int Nsimd = vector_type::Nsimd(); - accelerator_for(ss, in.Grid()->oSites(), Nsimd, { - coalescedWrite(y_v[ss],xscale*y_v(ss)+mscale*Tn_v(ss)); - coalescedWrite(Tnp_v[ss],2.0*y_v(ss)-Tnm_v(ss)); - }); - if ( Coeffs[n] != 0.0) { - axpy(out,Coeffs[n],*Tnp,out); - } -#else axpby(y,xscale,mscale,y,(*Tn)); axpby(*Tnp,2.0,-1.0,y,(*Tnm)); if ( Coeffs[n] != 0.0) { axpy(out,Coeffs[n],*Tnp,out); } -#endif + // Cycle pointers to avoid copies Field *swizzle = Tnm; Tnm =Tn; diff --git a/Grid/allocator/MemoryManager.h b/Grid/allocator/MemoryManager.h index 740d8d92..ad2d9ffc 100644 --- a/Grid/allocator/MemoryManager.h +++ b/Grid/allocator/MemoryManager.h @@ -36,6 +36,11 @@ NAMESPACE_BEGIN(Grid); #define GRID_ALLOC_SMALL_LIMIT (4096) +#define STRINGIFY(x) #x +#define TOSTRING(x) STRINGIFY(x) +#define FILE_LINE __FILE__ ":" TOSTRING(__LINE__) +#define AUDIT(a) MemoryManager::Audit(FILE_LINE) + /*Pinning pages is costly*/ //////////////////////////////////////////////////////////////////////////// // Advise the LatticeAccelerator class @@ -94,6 +99,7 @@ private: static void PrintBytes(void); public: + static void Audit(std::string s); static void Init(void); static void InitMessage(void); static void *AcceleratorAllocate(size_t bytes); diff --git a/Grid/allocator/MemoryManagerCache.cc b/Grid/allocator/MemoryManagerCache.cc index 3bb3db7e..f03ee79f 100644 --- a/Grid/allocator/MemoryManagerCache.cc +++ b/Grid/allocator/MemoryManagerCache.cc @@ -8,9 +8,8 @@ NAMESPACE_BEGIN(Grid); static char print_buffer [ MAXLINE ]; #define mprintf(...) snprintf (print_buffer,MAXLINE, __VA_ARGS__ ); std::cout << GridLogMemory << print_buffer; -//#define dprintf(...) printf (__VA_ARGS__ ); fflush(stdout); -#define dprintf(...) - +#define dprintf(...) snprintf (print_buffer,MAXLINE, __VA_ARGS__ ); std::cout << GridLogMemory << print_buffer; +//#define dprintf(...) //////////////////////////////////////////////////////////// @@ -132,9 +131,11 @@ void MemoryManager::Evict(AcceleratorViewEntry &AccCache) /////////////////////////////////////////////////////////////////////////// assert(AccCache.state!=Empty); - mprintf("MemoryManager: Evict(%lx) %lx\n",(uint64_t)AccCache.CpuPtr,(uint64_t)AccCache.AccPtr); - assert(AccCache.accLock==0); - assert(AccCache.cpuLock==0); + mprintf("MemoryManager: Evict cpu %lx acc %lx cpuLock %ld accLock %ld\n", + (uint64_t)AccCache.CpuPtr,(uint64_t)AccCache.AccPtr, + (uint64_t)AccCache.cpuLock,(uint64_t)AccCache.accLock); + if (AccCache.accLock!=0) return; + if (AccCache.cpuLock!=0) return; if(AccCache.state==AccDirty) { Flush(AccCache); } @@ -197,6 +198,7 @@ void MemoryManager::CpuDiscard(AcceleratorViewEntry &AccCache) void MemoryManager::ViewClose(void* Ptr,ViewMode mode) { if( (mode==AcceleratorRead)||(mode==AcceleratorWrite)||(mode==AcceleratorWriteDiscard) ){ + dprintf("AcceleratorViewClose %lx\n",(uint64_t)Ptr); AcceleratorViewClose((uint64_t)Ptr); } else if( (mode==CpuRead)||(mode==CpuWrite)){ CpuViewClose((uint64_t)Ptr); @@ -208,6 +210,7 @@ void *MemoryManager::ViewOpen(void* _CpuPtr,size_t bytes,ViewMode mode,ViewAdvis { uint64_t CpuPtr = (uint64_t)_CpuPtr; if( (mode==AcceleratorRead)||(mode==AcceleratorWrite)||(mode==AcceleratorWriteDiscard) ){ + dprintf("AcceleratorViewOpen %lx\n",(uint64_t)CpuPtr); return (void *) AcceleratorViewOpen(CpuPtr,bytes,mode,hint); } else if( (mode==CpuRead)||(mode==CpuWrite)){ return (void *)CpuViewOpen(CpuPtr,bytes,mode,hint); @@ -247,11 +250,12 @@ uint64_t MemoryManager::AcceleratorViewOpen(uint64_t CpuPtr,size_t bytes,ViewMod assert(AccCache.cpuLock==0); // Programming error if(AccCache.state!=Empty) { - dprintf("ViewOpen found entry %lx %lx : %ld %ld\n", + dprintf("ViewOpen found entry %lx %lx : %ld %ld accLock %ld\n", (uint64_t)AccCache.CpuPtr, (uint64_t)CpuPtr, (uint64_t)AccCache.bytes, - (uint64_t)bytes); + (uint64_t)bytes, + (uint64_t)AccCache.accLock); assert(AccCache.CpuPtr == CpuPtr); assert(AccCache.bytes ==bytes); } @@ -286,6 +290,7 @@ uint64_t MemoryManager::AcceleratorViewOpen(uint64_t CpuPtr,size_t bytes,ViewMod AccCache.state = Consistent; // Empty + AccRead => Consistent } AccCache.accLock= 1; + dprintf("Copied Empty entry into device accLock= %d\n",AccCache.accLock); } else if(AccCache.state==CpuDirty ){ if(mode==AcceleratorWriteDiscard) { CpuDiscard(AccCache); @@ -298,21 +303,21 @@ uint64_t MemoryManager::AcceleratorViewOpen(uint64_t CpuPtr,size_t bytes,ViewMod AccCache.state = Consistent; // CpuDirty + AccRead => Consistent } AccCache.accLock++; - dprintf("Copied CpuDirty entry into device accLock %d\n",AccCache.accLock); + dprintf("CpuDirty entry into device ++accLock= %d\n",AccCache.accLock); } else if(AccCache.state==Consistent) { if((mode==AcceleratorWrite)||(mode==AcceleratorWriteDiscard)) AccCache.state = AccDirty; // Consistent + AcceleratorWrite=> AccDirty else AccCache.state = Consistent; // Consistent + AccRead => Consistent AccCache.accLock++; - dprintf("Consistent entry into device accLock %d\n",AccCache.accLock); + dprintf("Consistent entry into device ++accLock= %d\n",AccCache.accLock); } else if(AccCache.state==AccDirty) { if((mode==AcceleratorWrite)||(mode==AcceleratorWriteDiscard)) AccCache.state = AccDirty; // AccDirty + AcceleratorWrite=> AccDirty else AccCache.state = AccDirty; // AccDirty + AccRead => AccDirty AccCache.accLock++; - dprintf("AccDirty entry into device accLock %d\n",AccCache.accLock); + dprintf("AccDirty entry ++accLock= %d\n",AccCache.accLock); } else { assert(0); } @@ -320,6 +325,7 @@ uint64_t MemoryManager::AcceleratorViewOpen(uint64_t CpuPtr,size_t bytes,ViewMod // If view is opened on device remove from LRU if(AccCache.LRU_valid==1){ // must possibly remove from LRU as now locked on GPU + dprintf("AccCache entry removed from LRU \n"); LRUremove(AccCache); } @@ -340,10 +346,12 @@ void MemoryManager::AcceleratorViewClose(uint64_t CpuPtr) assert(AccCache.accLock>0); AccCache.accLock--; - // Move to LRU queue if not locked and close on device if(AccCache.accLock==0) { + dprintf("AccleratorViewClose %lx AccLock decremented to %ld move to LRU queue\n",(uint64_t)CpuPtr,(uint64_t)AccCache.accLock); LRUinsert(AccCache); + } else { + dprintf("AccleratorViewClose %lx AccLock decremented to %ld\n",(uint64_t)CpuPtr,(uint64_t)AccCache.accLock); } } void MemoryManager::CpuViewClose(uint64_t CpuPtr) @@ -479,6 +487,29 @@ int MemoryManager::isOpen (void* _CpuPtr) return 0; } } +void MemoryManager::Audit(std::string s) +{ + for(auto it=AccViewTable.begin();it!=AccViewTable.end();it++){ + auto &AccCache = it->second; + + std::string str; + if ( AccCache.state==Empty ) str = std::string("Empty"); + if ( AccCache.state==CpuDirty ) str = std::string("CpuDirty"); + if ( AccCache.state==AccDirty ) str = std::string("AccDirty"); + if ( AccCache.state==Consistent)str = std::string("Consistent"); + + if ( AccCache.cpuLock || AccCache.accLock ) { + std::cout << GridLogError << s<< "\n\t 0x"< &logstreams) { GridLogError.Active(1); GridLogWarning.Active(0); GridLogMessage.Active(1); // at least the messages should be always on - GridLogMemory.Active(0); // at least the messages should be always on + GridLogMemory.Active(0); + GridLogTracing.Active(0); GridLogIterative.Active(0); GridLogDebug.Active(0); GridLogPerformance.Active(0); @@ -87,6 +89,7 @@ void GridLogConfigure(std::vector &logstreams) { GridLogHMC.Active(1); for (int i = 0; i < logstreams.size(); i++) { + if (logstreams[i] == std::string("Tracing")) GridLogTracing.Active(1); if (logstreams[i] == std::string("Memory")) GridLogMemory.Active(1); if (logstreams[i] == std::string("Warning")) GridLogWarning.Active(1); if (logstreams[i] == std::string("NoMessage")) GridLogMessage.Active(0); @@ -94,8 +97,8 @@ void GridLogConfigure(std::vector &logstreams) { if (logstreams[i] == std::string("Debug")) GridLogDebug.Active(1); if (logstreams[i] == std::string("Performance")) GridLogPerformance.Active(1); if (logstreams[i] == std::string("Dslash")) GridLogDslash.Active(1); - if (logstreams[i] == std::string("NoIntegrator")) GridLogIntegrator.Active(0); - if (logstreams[i] == std::string("NoHMC")) GridLogHMC.Active(0); + if (logstreams[i] == std::string("NoIntegrator"))GridLogIntegrator.Active(0); + if (logstreams[i] == std::string("NoHMC")) GridLogHMC.Active(0); if (logstreams[i] == std::string("Colours")) GridLogColours.Active(1); } } diff --git a/Grid/log/Log.h b/Grid/log/Log.h index fd706771..2d663a3c 100644 --- a/Grid/log/Log.h +++ b/Grid/log/Log.h @@ -186,6 +186,7 @@ extern GridLogger GridLogIterative ; extern GridLogger GridLogIntegrator ; extern GridLogger GridLogHMC; extern GridLogger GridLogMemory; +extern GridLogger GridLogTracing; extern Colours GridLogColours; std::string demangle(const char* name) ; diff --git a/Grid/perfmon/Tracing.h b/Grid/perfmon/Tracing.h index d39350c9..5000cef4 100644 --- a/Grid/perfmon/Tracing.h +++ b/Grid/perfmon/Tracing.h @@ -1,4 +1,7 @@ #pragma once + +NAMESPACE_BEGIN(Grid); + #ifdef GRID_TRACING_NVTX #include class GridTracer { @@ -64,3 +67,4 @@ inline void traceStop(int ID) { } #else #define GRID_TRACE(name) GridTracer uniq_name_using_macros##__COUNTER__(name); #endif +NAMESPACE_END(Grid); diff --git a/Grid/qcd/action/ActionBase.h b/Grid/qcd/action/ActionBase.h index 5027fcf4..1e8d6d7a 100644 --- a/Grid/qcd/action/ActionBase.h +++ b/Grid/qcd/action/ActionBase.h @@ -55,14 +55,18 @@ public: deriv_num=0; } void deriv_log(RealD nrm, RealD max,RealD Fdt_nrm,RealD Fdt_max) { - deriv_max_sum+=max; + if ( max > deriv_max_sum ) { + deriv_max_sum=max; + } deriv_norm_sum+=nrm; - Fdt_max_sum+=Fdt_max; + if ( Fdt_max > Fdt_max_sum ) { + Fdt_max_sum=Fdt_max; + } Fdt_norm_sum+=Fdt_nrm; deriv_num++; } - RealD deriv_max_average(void) { return deriv_max_sum/deriv_num; }; + RealD deriv_max_average(void) { return deriv_max_sum; }; RealD deriv_norm_average(void) { return deriv_norm_sum/deriv_num; }; - RealD Fdt_max_average(void) { return Fdt_max_sum/deriv_num; }; + RealD Fdt_max_average(void) { return Fdt_max_sum; }; RealD Fdt_norm_average(void) { return Fdt_norm_sum/deriv_num; }; RealD deriv_timer(void) { return deriv_us; }; RealD S_timer(void) { return S_us; }; diff --git a/Grid/qcd/action/ActionParams.h b/Grid/qcd/action/ActionParams.h index b2a06280..122dfb9c 100644 --- a/Grid/qcd/action/ActionParams.h +++ b/Grid/qcd/action/ActionParams.h @@ -34,7 +34,7 @@ directory NAMESPACE_BEGIN(Grid); -// These can move into a params header and be given MacroMagic serialisation + struct GparityWilsonImplParams { Coordinate twists; //mu=Nd-1 is assumed to be the time direction and a twist value of 1 indicates antiperiodic BCs diff --git a/Grid/qcd/action/fermion/WilsonCompressor.h b/Grid/qcd/action/fermion/WilsonCompressor.h index e2ced552..fd1bbe89 100644 --- a/Grid/qcd/action/fermion/WilsonCompressor.h +++ b/Grid/qcd/action/fermion/WilsonCompressor.h @@ -36,11 +36,16 @@ NAMESPACE_BEGIN(Grid); // Wilson compressor will need FaceGather policies for: // Periodic, Dirichlet, and partial Dirichlet for DWF /////////////////////////////////////////////////////////////// +const int dwf_compressor_depth=1; +#define DWF_COMPRESS class FaceGatherPartialDWF { public: - static int PartialCompressionFactor(GridBase *grid) {return grid->_fdimensions[0]/2;}; - // static int PartialCompressionFactor(GridBase *grid) { return 1;} +#ifdef DWF_COMPRESS + static int PartialCompressionFactor(GridBase *grid) {return grid->_fdimensions[0]/(2*dwf_compressor_depth);}; +#else + static int PartialCompressionFactor(GridBase *grid) { return 1;} +#endif template static void Gather_plane_simple (commVector >& table, const Lattice &rhs, @@ -52,20 +57,32 @@ public: // Shrinks local and remote comms buffers GridBase *Grid = rhs.Grid(); int Ls = Grid->_rdimensions[0]; +#ifdef DWF_COMPRESS + int depth=dwf_compressor_depth; +#else + int depth=Ls/2; +#endif std::pair *table_v = & table[0]; auto rhs_v = rhs.View(AcceleratorRead); int vol=table.size()/Ls; accelerator_forNB( idx,table.size(), vobj::Nsimd(), { Integer i=idx/Ls; Integer s=idx%Ls; - if(s==0) compress.Compress(buffer[off+i ],rhs_v[so+table_v[idx].second]); - if(s==Ls-1) compress.Compress(buffer[off+i+vol],rhs_v[so+table_v[idx].second]); + Integer sc=depth+s-(Ls-depth); + if(s=Ls-depth) compress.Compress(buffer[off+i+sc*vol],rhs_v[so+table_v[idx].second]); }); + rhs_v.ViewClose(); } template static void DecompressFace(decompressor decompress,Decompression &dd) { auto Ls = dd.dims[0]; +#ifdef DWF_COMPRESS + int depth=dwf_compressor_depth; +#else + int depth=Ls/2; +#endif // Just pass in the Grid auto kp = dd.kernel_p; auto mp = dd.mpi_p; @@ -74,11 +91,12 @@ public: accelerator_forNB(o,size,1,{ int idx=o/Ls; int s=o%Ls; - if ( s == 0 ) { - int oo=idx; + if ( s < depth ) { + int oo=s*vol+idx; kp[o]=mp[oo]; - } else if ( s == Ls-1 ) { - int oo=vol+idx; + } else if ( s >= Ls-depth ) { + int sc = depth + s - (Ls-depth); + int oo=sc*vol+idx; kp[o]=mp[oo]; } else { kp[o] = Zero();//fill rest with zero if partial dirichlet @@ -97,7 +115,12 @@ public: { GridBase *Grid = rhs.Grid(); int Ls = Grid->_rdimensions[0]; - +#ifdef DWF_COMPRESS + int depth=dwf_compressor_depth; +#else + int depth = Ls/2; +#endif + // insertion of zeroes... assert( (table.size()&0x1)==0); int num=table.size()/2; @@ -112,7 +135,7 @@ public: // Reorders both local and remote comms buffers // int s = j % Ls; - int sp1 = (s+1)%Ls; // peri incremented s slice + int sp1 = (s+depth)%Ls; // peri incremented s slice int hxyz= j/Ls; @@ -135,20 +158,25 @@ public: static void MergeFace(decompressor decompress,Merger &mm) { auto Ls = mm.dims[0]; +#ifdef DWF_COMPRESS + int depth=dwf_compressor_depth; +#else + int depth = Ls/2; +#endif int num= mm.buffer_size/2; // relate vol and Ls to buffer size auto mp = &mm.mpointer[0]; auto vp0= &mm.vpointers[0][0]; // First arg is exchange first auto vp1= &mm.vpointers[1][0]; auto type= mm.type; int nnum = num/Ls; - accelerator_forNB(o,num,vobj::Nsimd(),{ + accelerator_forNB(o,num,Merger::Nsimd,{ int s=o%Ls; int hxyz=o/Ls; // xyzt related component int xyz0=hxyz*2; int xyz1=hxyz*2+1; - int sp = (s+1)%Ls; + int sp = (s+depth)%Ls; int jj= hxyz + sp*nnum ; // 0,1,2,3 -> Ls-1 slice , 0-slice, 1-slice .... int oo0= s+xyz0*Ls; @@ -162,7 +190,11 @@ public: class FaceGatherDWFMixedBCs { public: - static int PartialCompressionFactor(GridBase *grid) {return grid->_fdimensions[0]/2;}; +#ifdef DWF_COMPRESS + static int PartialCompressionFactor(GridBase *grid) {return grid->_fdimensions[0]/(2*dwf_compressor_depth);}; +#else + static int PartialCompressionFactor(GridBase *grid) {return 1;} +#endif template static void Gather_plane_simple (commVector >& table, @@ -171,6 +203,7 @@ public: compressor &compress, int off,int so,int partial) { + // std::cout << " face gather simple DWF partial "< pointers,int dimension,int plane,int cbmask, compressor &compress,int type,int partial) { + // std::cout << " face gather exch DWF partial "<::WilsonFermion5D(GaugeField &_Umu, Coordinate block = p.dirichlet; if ( block[0] || block[1] || block[2] || block[3] || block[4] ){ Dirichlet = 1; + std::cout << GridLogMessage << " WilsonFermion: non-trivial Dirichlet condition "<< block << std::endl; + std::cout << GridLogMessage << " WilsonFermion: partial Dirichlet "<< p.partialDirichlet << std::endl; Block = block; } } else { @@ -137,9 +139,6 @@ WilsonFermion5D::WilsonFermion5D(GaugeField &_Umu, StencilEven.BuildSurfaceList(LLs,vol4); StencilOdd.BuildSurfaceList(LLs,vol4); - // std::cout << GridLogMessage << " SurfaceLists "<< Stencil.surface_list.size() - // <<" " << StencilEven.surface_list.size()< @@ -148,21 +147,29 @@ void WilsonFermion5D::ImportGauge(const GaugeField &_Umu) GaugeField HUmu(_Umu.Grid()); HUmu = _Umu*(-0.5); if ( Dirichlet ) { + + if ( this->Params.partialDirichlet ) { + std::cout << GridLogMessage << " partialDirichlet BCs " <LocalDimensions()[d]; if (GaugeBlock) assert( (GaugeBlock%ldim)==0); } - } - if ( Dirichlet && (!this->Params.partialDirichlet) ) { - std::cout << GridLogMessage << " Dirichlet filtering gauge field BCs block " < Filter(GaugeBlock); - Filter.applyFilter(HUmu); - } else { - std::cout << GridLogMessage << " Dirichlet "<< Dirichlet << " not filtered gauge field" <Params.partialDirichlet) { + std::cout << GridLogMessage << " Dirichlet filtering gauge field BCs block " < Filter(GaugeBlock); + Filter.applyFilter(HUmu); + } else { + std::cout << GridLogMessage << " Dirichlet "<< Dirichlet << " NOT filtered gauge field" < { public: INHERIT_IMPL_TYPES(Impl); - + private: FermionOperator & NumOp;// the basic operator FermionOperator & DenOp;// the basic operator @@ -112,28 +112,48 @@ NAMESPACE_BEGIN(Grid); // NumOp == V // DenOp == M // + AUDIT(); FermionField etaOdd (NumOp.FermionRedBlackGrid()); FermionField etaEven(NumOp.FermionRedBlackGrid()); FermionField tmp (NumOp.FermionRedBlackGrid()); + AUDIT(); pickCheckerboard(Even,etaEven,eta); + AUDIT(); pickCheckerboard(Odd,etaOdd,eta); + AUDIT(); NumOp.ImportGauge(U); + AUDIT(); DenOp.ImportGauge(U); + std::cout << " TwoFlavourRefresh: Imported gauge "< Mpc(DenOp); + AUDIT(); SchurDifferentiableOperator Vpc(NumOp); + AUDIT(); + std::cout << " TwoFlavourRefresh: Diff ops "< Stencil; + typedef CartesianStencil Stencil; SimpleCompressor compressor; int npoint = 2 * Ndim; @@ -82,7 +82,7 @@ public: virtual RealD S(const Field &p) { assert(p.Grid()->Nd() == Ndim); - static Stencil phiStencil(p.Grid(), npoint, 0, directions, displacements,0); + static Stencil phiStencil(p.Grid(), npoint, 0, directions, displacements); phiStencil.HaloExchange(p, compressor); Field action(p.Grid()), pshift(p.Grid()), phisquared(p.Grid()); phisquared = p * p; @@ -133,7 +133,7 @@ public: double interm_t = usecond(); // move this outside - static Stencil phiStencil(p.Grid(), npoint, 0, directions, displacements,0); + static Stencil phiStencil(p.Grid(), npoint, 0, directions, displacements); phiStencil.HaloExchange(p, compressor); double halo_t = usecond(); diff --git a/Grid/qcd/hmc/HMC.h b/Grid/qcd/hmc/HMC.h index 745e53c8..d4739fb0 100644 --- a/Grid/qcd/hmc/HMC.h +++ b/Grid/qcd/hmc/HMC.h @@ -143,6 +143,7 @@ private: GridBase *Grid = U.Grid(); if(Params.PerformRandomShift){ +#if 0 ////////////////////////////////////////////////////////////////////////////////////////////////////// // Mainly for DDHMC perform a random translation of U modulo volume ////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -167,11 +168,11 @@ private: //shift all fields together in a way that respects the gauge BCs for(int mu=0; mu < Grid->Nd(); mu++) Umu[mu] = FieldImplementation::CshiftLink(Umu[mu],d,shift); - } - for(int mu=0;muNd();mu++) PokeIndex(U,Umu[mu],mu); - + for(int mu=0;muNd();mu++) PokeIndex(U,Umu[mu],mu); + } std::cout << GridLogMessage << "--------------------------------------------------\n"; +#endif } TheIntegrator.reset_timer(); diff --git a/Grid/qcd/hmc/integrators/Integrator.h b/Grid/qcd/hmc/integrators/Integrator.h index e1f9e3f0..85a135ad 100644 --- a/Grid/qcd/hmc/integrators/Integrator.h +++ b/Grid/qcd/hmc/integrators/Integrator.h @@ -132,10 +132,17 @@ protected: Field& Us = Smearer.get_U(as[level].actions.at(a)->is_smeared); double start_force = usecond(); + + std::cout << GridLogMessage << "AuditForce["<deriv_timer_start(); as[level].actions.at(a)->deriv(Us, force); // deriv should NOT include Ta as[level].actions.at(a)->deriv_timer_stop(); + std::cout << GridLogMessage << "AuditForce["<is_smeared << std::endl; auto name = as[level].actions.at(a)->action_name(); if (as[level].actions.at(a)->is_smeared) Smearer.smeared_force(force); @@ -284,7 +291,7 @@ public: for (int actionID = 0; actionID < as[level].actions.size(); ++actionID) { std::cout << GridLogMessage << as[level].actions.at(actionID)->action_name() - <<"["<deriv_max_average() <<" norm " << as[level].actions.at(actionID)->deriv_norm_average() <<" Fdt max " << as[level].actions.at(actionID)->Fdt_max_average() @@ -364,9 +371,14 @@ public: std::cout << GridLogMessage << "refresh [" << level << "][" << actionID << "] "<is_smeared); + + std::cout << GridLogMessage << "AuditRefresh["<refresh_timer_start(); as[level].actions.at(actionID)->refresh(Us, sRNG, pRNG); as[level].actions.at(actionID)->refresh_timer_stop(); + std::cout << GridLogMessage << "AuditRefresh["<is_smeared); @@ -412,6 +425,7 @@ public: as[level].actions.at(actionID)->S_timer_stop(); std::cout << GridLogMessage << "S [" << level << "][" << actionID << "] H = " << Hterm << std::endl; H += Hterm; + AUDIT(); } as[level].apply(S_hireps, Representations, level, H); } @@ -424,7 +438,9 @@ public: void operator()(std::vector*> repr_set, Repr& Rep, int level, RealD& H) { for (int a = 0; a < repr_set.size(); ++a) { + AUDIT(); RealD Hterm = repr_set.at(a)->Sinitial(Rep.U); + AUDIT(); std::cout << GridLogMessage << "Sinitial Level " << level << " term " << a << " H Hirep = " << Hterm << std::endl; H += Hterm; @@ -449,8 +465,10 @@ public: Field& Us = Smearer.get_U(as[level].actions.at(actionID)->is_smeared); std::cout << GridLogMessage << "S [" << level << "][" << actionID << "] action eval " << std::endl; as[level].actions.at(actionID)->S_timer_start(); + AUDIT(); Hterm = as[level].actions.at(actionID)->Sinitial(Us); as[level].actions.at(actionID)->S_timer_stop(); + AUDIT(); std::cout << GridLogMessage << "S [" << level << "][" << actionID << "] H = " << Hterm << std::endl; H += Hterm; } @@ -463,6 +481,7 @@ public: void integrate(Field& U) { + AUDIT(); // reset the clocks t_U = 0; for (int level = 0; level < as.size(); ++level) { @@ -480,8 +499,10 @@ public: assert(fabs(t_U - t_P[level]) < 1.0e-6); // must be the same std::cout << GridLogIntegrator << " times[" << level << "]= " << t_P[level] << " " << t_U << std::endl; } + AUDIT(); FieldImplementation::Project(U); + AUDIT(); // and that we indeed got to the end of the trajectory assert(fabs(t_U - Params.trajL) < 1.0e-6); diff --git a/Grid/qcd/modules/Registration.h b/Grid/qcd/modules/Registration.h index 28a9fdae..db43abe1 100644 --- a/Grid/qcd/modules/Registration.h +++ b/Grid/qcd/modules/Registration.h @@ -78,13 +78,13 @@ static Registrar, // Now a specific registration with a fermion field // here must instantiate CG and CR for every new fermion field type (macro!!) -static Registrar< ConjugateGradientModule, - HMC_SolverModuleFactory > __CGWFmodXMLInit("ConjugateGradient"); +static Registrar< ConjugateGradientModule, + HMC_SolverModuleFactory > __CGWFmodXMLInit("ConjugateGradient"); -static Registrar< BiCGSTABModule, - HMC_SolverModuleFactory > __BiCGWFmodXMLInit("BiCGSTAB"); -static Registrar< ConjugateResidualModule, - HMC_SolverModuleFactory > __CRWFmodXMLInit("ConjugateResidual"); +static Registrar< BiCGSTABModule, + HMC_SolverModuleFactory > __BiCGWFmodXMLInit("BiCGSTAB"); +static Registrar< ConjugateResidualModule, + HMC_SolverModuleFactory > __CRWFmodXMLInit("ConjugateResidual"); // add the staggered, scalar versions here diff --git a/Grid/stencil/SimpleCompressor.h b/Grid/stencil/SimpleCompressor.h index ffbe752c..ccbfdb29 100644 --- a/Grid/stencil/SimpleCompressor.h +++ b/Grid/stencil/SimpleCompressor.h @@ -73,7 +73,7 @@ public: auto vp0= &mm.vpointers[0][0]; auto vp1= &mm.vpointers[1][0]; auto type= mm.type; - accelerator_forNB(o,mm.buffer_size/2,Merger::Nsimd(),{ + accelerator_forNB(o,mm.buffer_size/2,Merger::Nsimd,{ decompress.Exchange(mp[2*o],mp[2*o+1],vp0[o],vp1[o],type); }); } diff --git a/Grid/stencil/Stencil.h b/Grid/stencil/Stencil.h index 1e0b5028..cffede12 100644 --- a/Grid/stencil/Stencil.h +++ b/Grid/stencil/Stencil.h @@ -52,6 +52,16 @@ NAMESPACE_BEGIN(Grid); +// These can move into a params header and be given MacroMagic serialisation +struct DefaultImplParams { + Coordinate dirichlet; // Blocksize of dirichlet BCs + int partialDirichlet; + DefaultImplParams() { + dirichlet.resize(0); + partialDirichlet=0; + }; +}; + /////////////////////////////////////////////////////////////////// // Gather for when there *is* need to SIMD split with compression /////////////////////////////////////////////////////////////////// @@ -193,7 +203,7 @@ class CartesianStencilAccelerator { template class CartesianStencilView : public CartesianStencilAccelerator { - private: +public: int *closed; StencilEntry *cpu_ptr; ViewMode mode; @@ -666,6 +676,8 @@ public: int block = dirichlet_block[dimension]; this->_comms_send[ii] = comm_dim; this->_comms_recv[ii] = comm_dim; + this->_comms_partial_send[ii] = 0; + this->_comms_partial_recv[ii] = 0; if ( block && comm_dim ) { assert(abs(displacement) < ld ); // Quiesce communication across block boundaries @@ -698,7 +710,7 @@ public: int checkerboard, const std::vector &directions, const std::vector &distances, - Parameters p) + Parameters p=Parameters()) { face_table_computed=0; _grid = grid; @@ -1121,6 +1133,7 @@ public: send_buf = this->u_send_buf_p; // Gather locally, must send assert(send_buf!=NULL); + // std::cout << " GatherPlaneSimple partial send "<< comms_partial_send< struct GridTypeMapper > : public GridTypeMapper_Base { typedef std::complex scalar_type; typedef std::complex scalar_typeD; diff --git a/HMC/Mobius2p1f_DD_EOFA_96I_mshift.cc b/HMC/Mobius2p1f_DD_EOFA_96I_mshift.cc index f4ca8515..0a924486 100644 --- a/HMC/Mobius2p1f_DD_EOFA_96I_mshift.cc +++ b/HMC/Mobius2p1f_DD_EOFA_96I_mshift.cc @@ -179,8 +179,11 @@ int main(int argc, char **argv) { MD.name = std::string("Force Gradient"); //typedef GenericHMCRunner HMCWrapper; // MD.name = std::string("MinimumNorm2"); - // MD.MDsteps = 4; - MD.MDsteps = 4; + // TrajL = 2 + // 4/2 => 0.6 dH + // 3/3 => 0.8 dH .. depth 3, slower + //MD.MDsteps = 4; + MD.MDsteps = 3; MD.trajL = 0.5; HMCparameters HMCparams; @@ -220,13 +223,15 @@ int main(int argc, char **argv) { RealD c = 0.5; Real beta = 2.13; // Real light_mass = 5.4e-4; - Real light_mass = 7.8e-4; + Real light_mass = 7.8e-4; + Real light_mass_dir = 0.01; Real strange_mass = 0.0362; Real pv_mass = 1.0; - std::vector hasenbusch({ light_mass, 3.8e-3, 0.0145, 0.045, 0.108, 0.25, 0.51 , pv_mass }); + std::vector hasenbusch({ 0.01, 0.045, 0.108, 0.25, 0.51 , pv_mass }); + // std::vector hasenbusch({ light_mass, 0.01, 0.045, 0.108, 0.25, 0.51 , pv_mass }); + // std::vector hasenbusch({ light_mass, 0.005, 0.0145, 0.045, 0.108, 0.25, 0.51 , pv_mass }); // Updated // std::vector hasenbusch({ light_mass, 0.0145, 0.045, 0.108, 0.25, 0.51 , 0.75 , pv_mass }); - OneFlavourRationalParams OFRp; // Up/down OFRp.lo = 4.0e-5; OFRp.hi = 90.0; @@ -235,18 +240,24 @@ int main(int argc, char **argv) { OFRp.mdtolerance= 1.0e-3; // OFRp.degree = 20; converges // OFRp.degree = 16; - OFRp.degree = 12; + OFRp.degree = 18; OFRp.precision= 80; OFRp.BoundsCheckFreq=0; std::vector ActionTolByPole({ 1.0e-8,1.0e-8,1.0e-8,1.0e-8, 1.0e-8,1.0e-8,1.0e-8,1.0e-8, - 1.0e-8,1.0e-8,1.0e-8,1.0e-8 + 1.0e-8,1.0e-8,1.0e-8,1.0e-8, + 1.0e-8,1.0e-8,1.0e-8,1.0e-8, + 1.0e-8,1.0e-8 }); std::vector MDTolByPole({ - 1.0e-6,3.0e-7,1.0e-7,1.0e-7, + 1.0e-5,5.0e-6,1.0e-6,1.0e-7, // soften convergence more more + // 1.0e-6,3.0e-7,1.0e-7,1.0e-7, + // 3.0e-6,1.0e-6,1.0e-7,1.0e-7, // soften convergence 1.0e-8,1.0e-8,1.0e-8,1.0e-8, - 1.0e-8,1.0e-8,1.0e-8,1.0e-8 + 1.0e-8,1.0e-8,1.0e-8,1.0e-8, + 1.0e-8,1.0e-8,1.0e-8,1.0e-8, + 1.0e-8,1.0e-8 }); auto GridPtr = TheHMC.Resources.GetCartesian(); @@ -327,6 +338,8 @@ int main(int argc, char **argv) { ParamsF.dirichlet=NonDirichlet; ParamsDir.dirichlet=Dirichlet; ParamsDirF.dirichlet=Dirichlet; + ParamsDir.partialDirichlet=1; + ParamsDirF.partialDirichlet=1; // double StoppingCondition = 1e-14; // double MDStoppingCondition = 1e-9; @@ -342,8 +355,8 @@ int main(int argc, char **argv) { // Collect actions //////////////////////////////////// ActionLevel Level1(1); - ActionLevel Level2(2); - ActionLevel Level3(30); + ActionLevel Level2(3); + ActionLevel Level3(15); //////////////////////////////////// // Strange action @@ -474,13 +487,21 @@ int main(int argc, char **argv) { if ( dirichlet_den[h]==1) ParamsDen.dirichlet = Dirichlet; else ParamsDen.dirichlet = NonDirichlet; + if ( dirichlet_num[h]==1) ParamsNum.partialDirichlet = 1; + else ParamsNum.partialDirichlet = 0; + + if ( dirichlet_den[h]==1) ParamsDen.partialDirichlet = 1; + else ParamsDen.partialDirichlet = 0; + Numerators.push_back (new FermionAction(U,*FGrid,*FrbGrid,*GridPtr,*GridRBPtr,light_num[h],M5,b,c, ParamsNum)); Denominators.push_back(new FermionAction(U,*FGrid,*FrbGrid,*GridPtr,*GridRBPtr,light_den[h],M5,b,c, ParamsDen)); ParamsDenF.dirichlet = ParamsDen.dirichlet; + ParamsDenF.partialDirichlet = ParamsDen.partialDirichlet; DenominatorsF.push_back(new FermionActionF(UF,*FGridF,*FrbGridF,*GridPtrF,*GridRBPtrF,light_den[h],M5,b,c, ParamsDenF)); ParamsNumF.dirichlet = ParamsNum.dirichlet; + ParamsNumF.partialDirichlet = ParamsNum.partialDirichlet; NumeratorsF.push_back (new FermionActionF(UF,*FGridF,*FrbGridF,*GridPtrF,*GridRBPtrF,light_num[h],M5,b,c, ParamsNumF)); LinOpD.push_back(new LinearOperatorD(*Denominators[h])); @@ -516,21 +537,23 @@ int main(int argc, char **argv) { FermionActionD2::ImplParams ParamsNumD2(boundary); ParamsDenD2.dirichlet = ParamsDen.dirichlet; + ParamsDenD2.partialDirichlet = ParamsDen.partialDirichlet; DenominatorsD2.push_back(new FermionActionD2(UD2,*FGridF,*FrbGridF,*GridPtrF,*GridRBPtrF,light_den[h],M5,b,c, ParamsDenD2)); ParamsNumD2.dirichlet = ParamsNum.dirichlet; + ParamsNumD2.partialDirichlet = ParamsNum.partialDirichlet; NumeratorsD2.push_back (new FermionActionD2(UD2,*FGridF,*FrbGridF,*GridPtrF,*GridRBPtrF,light_num[h],M5,b,c, ParamsNumD2)); Bdys.push_back( new OneFlavourEvenOddRatioRationalMixedPrecPseudoFermionAction( *Numerators[h],*Denominators[h], *NumeratorsF[h],*DenominatorsF[h], *NumeratorsD2[h],*DenominatorsD2[h], - OFRp, 200) ); + OFRp, 400) ); Bdys.push_back( new OneFlavourEvenOddRatioRationalMixedPrecPseudoFermionAction( *Numerators[h],*Denominators[h], *NumeratorsF[h],*DenominatorsF[h], *NumeratorsD2[h],*DenominatorsD2[h], - OFRp, 200) ); + OFRp, 400) ); #else Bdys.push_back( new OneFlavourEvenOddRatioRationalPseudoFermionAction(*Numerators[h],*Denominators[h],OFRp)); Bdys.push_back( new OneFlavourEvenOddRatioRationalPseudoFermionAction(*Numerators[h],*Denominators[h],OFRp)); @@ -543,7 +566,8 @@ int main(int argc, char **argv) { int nquo=Quotients.size(); Level1.push_back(Bdys[0]); Level1.push_back(Bdys[1]); - for(int h=0;h +Author: Guido Cossu + +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); + +template + class MixedPrecisionConjugateGradientOperatorFunction : public OperatorFunction { + public: + typedef typename FermionOperatorD::FermionField FieldD; + typedef typename FermionOperatorF::FermionField FieldF; + + using OperatorFunction::operator(); + + RealD Tolerance; + RealD InnerTolerance; //Initial tolerance for inner CG. Defaults to Tolerance but can be changed + Integer MaxInnerIterations; + Integer MaxOuterIterations; + GridBase* SinglePrecGrid4; //Grid for single-precision fields + GridBase* SinglePrecGrid5; //Grid for single-precision fields + RealD OuterLoopNormMult; //Stop the outer loop and move to a final double prec solve when the residual is OuterLoopNormMult * Tolerance + + FermionOperatorF &FermOpF; + FermionOperatorD &FermOpD;; + SchurOperatorF &LinOpF; + SchurOperatorD &LinOpD; + + Integer TotalInnerIterations; //Number of inner CG iterations + Integer TotalOuterIterations; //Number of restarts + Integer TotalFinalStepIterations; //Number of CG iterations in final patch-up step + + MixedPrecisionConjugateGradientOperatorFunction(RealD tol, + Integer maxinnerit, + Integer maxouterit, + GridBase* _sp_grid4, + GridBase* _sp_grid5, + FermionOperatorF &_FermOpF, + FermionOperatorD &_FermOpD, + SchurOperatorF &_LinOpF, + SchurOperatorD &_LinOpD): + LinOpF(_LinOpF), + LinOpD(_LinOpD), + FermOpF(_FermOpF), + FermOpD(_FermOpD), + Tolerance(tol), + InnerTolerance(tol), + MaxInnerIterations(maxinnerit), + MaxOuterIterations(maxouterit), + SinglePrecGrid4(_sp_grid4), + SinglePrecGrid5(_sp_grid5), + OuterLoopNormMult(100.) + { + /* Debugging instances of objects; references are stored + std::cout << GridLogMessage << " Mixed precision CG wrapper LinOpF " < &LinOpU, const FieldD &src, FieldD &psi) { + + std::cout << GridLogMessage << " Mixed precision CG wrapper operator() "<(&LinOpU); + + // std::cout << GridLogMessage << " Mixed precision CG wrapper operator() FermOpU " <_Mat)<_Mat)==&(LinOpD._Mat)); + + //////////////////////////////////////////////////////////////////////////////////// + // Must snarf a single precision copy of the gauge field in Linop_d argument + //////////////////////////////////////////////////////////////////////////////////// + typedef typename FermionOperatorF::GaugeField GaugeFieldF; + typedef typename FermionOperatorF::GaugeLinkField GaugeLinkFieldF; + typedef typename FermionOperatorD::GaugeField GaugeFieldD; + typedef typename FermionOperatorD::GaugeLinkField GaugeLinkFieldD; + + GridBase * GridPtrF = SinglePrecGrid4; + GridBase * GridPtrD = FermOpD.Umu.Grid(); + GaugeFieldF U_f (GridPtrF); + GaugeLinkFieldF Umu_f(GridPtrF); + // std::cout << " Dim gauge field "<Nd()<Nd()<(FermOpD.Umu, mu); + precisionChange(Umu_f,Umu_d); + PokeIndex(FermOpF.Umu, Umu_f, mu); + } + pickCheckerboard(Even,FermOpF.UmuEven,FermOpF.Umu); + pickCheckerboard(Odd ,FermOpF.UmuOdd ,FermOpF.Umu); + + //////////////////////////////////////////////////////////////////////////////////// + // Make a mixed precision conjugate gradient + //////////////////////////////////////////////////////////////////////////////////// +#if 1 + RealD delta=1.e-4; + std::cout << GridLogMessage << "Calling reliable update Conjugate Gradient" < MPCG(Tolerance,MaxInnerIterations*MaxOuterIterations,delta,SinglePrecGrid5,LinOpF,LinOpD); +#else + std::cout << GridLogMessage << "Calling mixed precision Conjugate Gradient" < MPCG(Tolerance,MaxInnerIterations,MaxOuterIterations,SinglePrecGrid5,LinOpF,LinOpD); +#endif + MPCG(src,psi); + } + }; + +NAMESPACE_END(Grid); + + +int main(int argc, char **argv) { + using namespace Grid; + + Grid_init(&argc, &argv); + + CartesianCommunicator::BarrierWorld(); + std::cout << GridLogMessage << " Clock skew check" < HMCWrapper; + // MD.name = std::string("Leap Frog"); + typedef GenericHMCRunner HMCWrapper; + MD.name = std::string("Force Gradient"); + //typedef GenericHMCRunner HMCWrapper; + // MD.name = std::string("MinimumNorm2"); + // TrajL = 2 + // 4/2 => 0.6 dH + // 3/3 => 0.8 dH .. depth 3, slower + //MD.MDsteps = 4; + MD.MDsteps = 3; + MD.trajL = 0.5; + + HMCparameters HMCparams; + HMCparams.StartTrajectory = 1077; + HMCparams.Trajectories = 1; + HMCparams.NoMetropolisUntil= 0; + // "[HotStart, ColdStart, TepidStart, CheckpointStart]\n"; + // HMCparams.StartingType =std::string("ColdStart"); + HMCparams.StartingType =std::string("CheckpointStart"); + HMCparams.MD = MD; + HMCWrapper TheHMC(HMCparams); + + // Grid from the command line arguments --grid and --mpi + TheHMC.Resources.AddFourDimGrid("gauge"); // use default simd lanes decomposition + + CheckpointerParameters CPparams; + CPparams.config_prefix = "ckpoint_DDHMC_lat"; + CPparams.rng_prefix = "ckpoint_DDHMC_rng"; + CPparams.saveInterval = 1; + CPparams.format = "IEEE64BIG"; + TheHMC.Resources.LoadNerscCheckpointer(CPparams); + std::cout << "loaded NERSC checpointer"< PlaqObs; + TheHMC.Resources.AddObservable(); + ////////////////////////////////////////////// + + const int Ls = 12; + RealD M5 = 1.8; + RealD b = 1.5; + RealD c = 0.5; + Real beta = 2.13; + // Real light_mass = 5.4e-4; + Real light_mass = 7.8e-4; + Real strange_mass = 0.0362; + Real pv_mass = 1.0; + // std::vector hasenbusch({ 0.01, 0.045, 0.108, 0.25, 0.51 , pv_mass }); + // std::vector hasenbusch({ light_mass, 0.01, 0.045, 0.108, 0.25, 0.51 , pv_mass }); + std::vector hasenbusch({ light_mass, 0.005, 0.0145, 0.045, 0.108, 0.25, 0.51 , pv_mass }); // Updated + // std::vector hasenbusch({ light_mass, 0.0145, 0.045, 0.108, 0.25, 0.51 , 0.75 , pv_mass }); + + auto GridPtr = TheHMC.Resources.GetCartesian(); + auto GridRBPtr = TheHMC.Resources.GetRBCartesian(); + + typedef SchurDiagMooeeOperator LinearOperatorF; + typedef SchurDiagMooeeOperator LinearOperatorD; + typedef SchurDiagMooeeOperator LinearOperatorEOFAF; + typedef SchurDiagMooeeOperator LinearOperatorEOFAD; + typedef MixedPrecisionConjugateGradientOperatorFunction MxPCG; + typedef MixedPrecisionConjugateGradientOperatorFunction MxPCG_EOFA; + + //////////////////////////////////////////////////////////////// + // Domain decomposed + //////////////////////////////////////////////////////////////// + Coordinate latt4 = GridPtr->GlobalDimensions(); + Coordinate mpi = GridPtr->ProcessorGrid(); + Coordinate shm; + + GlobalSharedMemory::GetShmDims(mpi,shm); + + Coordinate CommDim(Nd); + for(int d=0;d1 ? 1 : 0; + + Coordinate NonDirichlet(Nd+1,0); + + ////////////////////////// + // Fermion Grids + ////////////////////////// + auto FGrid = SpaceTimeGrid::makeFiveDimGrid(Ls,GridPtr); + auto FrbGrid = SpaceTimeGrid::makeFiveDimRedBlackGrid(Ls,GridPtr); + + Coordinate simdF = GridDefaultSimd(Nd,vComplexF::Nsimd()); + auto GridPtrF = SpaceTimeGrid::makeFourDimGrid(latt4,simdF,mpi); + auto GridRBPtrF = SpaceTimeGrid::makeFourDimRedBlackGrid(GridPtrF); + auto FGridF = SpaceTimeGrid::makeFiveDimGrid(Ls,GridPtrF); + auto FrbGridF = SpaceTimeGrid::makeFiveDimRedBlackGrid(Ls,GridPtrF); + + IwasakiGaugeActionR GaugeAction(beta); + + // temporarily need a gauge field + LatticeGaugeFieldD U(GridPtr); U=Zero(); + LatticeGaugeFieldF UF(GridPtrF); UF=Zero(); + LatticeGaugeFieldD2 UD2(GridPtrF); UD2=Zero(); + + std::cout << GridLogMessage << " Running the HMC "<< std::endl; + TheHMC.ReadCommandLine(argc,argv); // params on CML or from param file + TheHMC.initializeGaugeFieldAndRNGs(U); + std::cout << "loaded NERSC gauge field"< boundary = {1,1,1,-1}; + FermionAction::ImplParams Params(boundary); + FermionActionF::ImplParams ParamsF(boundary); + Params.dirichlet=NonDirichlet; + ParamsF.dirichlet=NonDirichlet; + + // double StoppingCondition = 1e-14; + // double MDStoppingCondition = 1e-9; + double StoppingCondition = 1e-8; + double MDStoppingCondition = 1e-7; + double MDStoppingConditionLoose = 1e-7; + double MDStoppingConditionStrange = 1e-7; + double MaxCGIterations = 300000; + ConjugateGradient CG(StoppingCondition,MaxCGIterations); + ConjugateGradient MDCG(MDStoppingCondition,MaxCGIterations); + + //////////////////////////////////// + // Collect actions + //////////////////////////////////// + ActionLevel Level1(1); + ActionLevel Level2(3); + ActionLevel Level3(15); + + //////////////////////////////////// + // Strange action + //////////////////////////////////// + FermionAction StrangeOp (U,*FGrid,*FrbGrid,*GridPtr,*GridRBPtr,strange_mass,M5,b,c, Params); + FermionAction StrangePauliVillarsOp(U,*FGrid,*FrbGrid,*GridPtr,*GridRBPtr,pv_mass, M5,b,c, Params); + + // Probably dominates the force - back to EOFA. + OneFlavourRationalParams SFRp; + SFRp.lo = 0.25; + SFRp.hi = 25.0; + SFRp.MaxIter = 10000; + SFRp.tolerance= 1.0e-5; + SFRp.mdtolerance= 2.0e-4; + SFRp.degree = 8; + SFRp.precision= 50; + + MobiusEOFAFermionD Strange_Op_L (U , *FGrid , *FrbGrid , *GridPtr , *GridRBPtr , strange_mass, strange_mass, pv_mass, 0.0, -1, M5, b, c); + MobiusEOFAFermionF Strange_Op_LF(UF, *FGridF, *FrbGridF, *GridPtrF, *GridRBPtrF, strange_mass, strange_mass, pv_mass, 0.0, -1, M5, b, c); + MobiusEOFAFermionD Strange_Op_R (U , *FGrid , *FrbGrid , *GridPtr , *GridRBPtr , pv_mass, strange_mass, pv_mass, -1.0, 1, M5, b, c); + MobiusEOFAFermionF Strange_Op_RF(UF, *FGridF, *FrbGridF, *GridPtrF, *GridRBPtrF, pv_mass, strange_mass, pv_mass, -1.0, 1, M5, b, c); + ConjugateGradient ActionCG(StoppingCondition,MaxCGIterations); + ConjugateGradient DerivativeCG(MDStoppingCondition,MaxCGIterations); + LinearOperatorEOFAD Strange_LinOp_L (Strange_Op_L); + LinearOperatorEOFAD Strange_LinOp_R (Strange_Op_R); + LinearOperatorEOFAF Strange_LinOp_LF(Strange_Op_LF); + LinearOperatorEOFAF Strange_LinOp_RF(Strange_Op_RF); + + const int MX_inner = 1000; + MxPCG_EOFA ActionCGL(StoppingCondition, + MX_inner, + MaxCGIterations, + GridPtrF, + FrbGridF, + Strange_Op_LF,Strange_Op_L, + Strange_LinOp_LF,Strange_LinOp_L); + + MxPCG_EOFA DerivativeCGL(MDStoppingConditionStrange, + MX_inner, + MaxCGIterations, + GridPtrF, + FrbGridF, + Strange_Op_LF,Strange_Op_L, + Strange_LinOp_LF,Strange_LinOp_L); + + MxPCG_EOFA ActionCGR(StoppingCondition, + MX_inner, + MaxCGIterations, + GridPtrF, + FrbGridF, + Strange_Op_RF,Strange_Op_R, + Strange_LinOp_RF,Strange_LinOp_R); + + MxPCG_EOFA DerivativeCGR(MDStoppingConditionStrange, + MX_inner, + MaxCGIterations, + GridPtrF, + FrbGridF, + Strange_Op_RF,Strange_Op_R, + Strange_LinOp_RF,Strange_LinOp_R); + + ExactOneFlavourRatioPseudoFermionAction + EOFA(Strange_Op_L, Strange_Op_R, + ActionCG, + ActionCGL, ActionCGR, + DerivativeCGL, DerivativeCGR, + SFRp, true); + // Level2.push_back(&EOFA); + + //////////////////////////////////// + // up down action + //////////////////////////////////// + std::vector light_den; + std::vector light_num; + std::vector dirichlet_den; + std::vector dirichlet_num; + + int n_hasenbusch = hasenbusch.size(); + light_den.push_back(light_mass); dirichlet_den.push_back(0); + for(int h=0;h Numerators; + std::vector Denominators; + std::vector NumeratorsF; + std::vector DenominatorsF; + std::vector NumeratorsD2; + std::vector DenominatorsD2; + std::vector *> Quotients; + std::vector ActionMPCG; + std::vector MPCG; + +#define MIXED_PRECISION +#ifdef MIXED_PRECISION + std::vector *> Bdys; +#else + std::vector *> Bdys; +#endif + + typedef SchurDiagMooeeOperator LinearOperatorF; + typedef SchurDiagMooeeOperator LinearOperatorD; + std::vector LinOpD; + std::vector LinOpF; + + for(int h=0;h(*Numerators[h],*Denominators[h],*MPCG[h],*ActionMPCG[h],CG)); + } + int nquo=Quotients.size(); + for(int h=0;h HIP and SYCL GPU code + + ====== DDHMC ====== diff --git a/benchmarks/Benchmark_dwf_fp32_partial.cc b/benchmarks/Benchmark_dwf_fp32_partial.cc index 4db3022a..0cbd4a6c 100644 --- a/benchmarks/Benchmark_dwf_fp32_partial.cc +++ b/benchmarks/Benchmark_dwf_fp32_partial.cc @@ -88,6 +88,7 @@ int main (int argc, char ** argv) // Node level ////////////////////// for(int d=0;d1 ? 1 : 0; + // for(int d=0;doSites();ss++){ for(int s=0;s=Ls-depth)){ tmp_v[Ls*ss+s] = Ucopy_v[ss]*tmp_v[Ls*ss+s]; } else { tmp_v[Ls*ss+s] = U_v[ss]*tmp_v[Ls*ss+s]; @@ -246,7 +247,7 @@ void Benchmark(int Ls, Coordinate Dirichlet, int partial) autoView( src_v, src , CpuRead); for(int ss=0;ssoSites();ss++){ for(int s=0;s=Ls-depth)){ tmp_v[Ls*ss+s] = adj(Ucopy_v[ss])*src_v[Ls*ss+s]; } else { tmp_v[Ls*ss+s] = adj(U_v[ss])*src_v[Ls*ss+s]; @@ -342,6 +343,7 @@ void Benchmark(int Ls, Coordinate Dirichlet, int partial) ref = Zero(); for(int mu=0;muoSites();ss++){ for(int s=0;s=Ls-depth)){ tmp_v[Ls*ss+s] = Ucopy_v[ss]*tmp_v[Ls*ss+s]; } else { tmp_v[Ls*ss+s] = U_v[ss]*tmp_v[Ls*ss+s]; @@ -365,7 +367,7 @@ void Benchmark(int Ls, Coordinate Dirichlet, int partial) autoView( src_v, src , CpuRead); for(int ss=0;ssoSites();ss++){ for(int s=0;s=Ls-depth)){ tmp_v[Ls*ss+s] = adj(Ucopy_v[ss])*src_v[Ls*ss+s]; } else { tmp_v[Ls*ss+s] = adj(U_v[ss])*src_v[Ls*ss+s]; diff --git a/systems/Crusher/config-command b/systems/Crusher/config-command index 57b93e03..3965767f 100644 --- a/systems/Crusher/config-command +++ b/systems/Crusher/config-command @@ -1,14 +1,16 @@ +CLIME=`spack find --paths c-lime@2-3-9 | grep c-lime| cut -c 15-` ../../configure --enable-comms=mpi-auto \ +--with-lime=$CLIME \ --enable-unified=no \ --enable-shm=nvlink \ +--enable-tracing=timer \ --enable-accelerator=hip \ --enable-gen-simd-width=64 \ --enable-simd=GPU \ ---disable-fermion-reps \ --with-gmp=$OLCF_GMP_ROOT \ --with-fftw=$FFTW_DIR/.. \ --with-mpfr=/opt/cray/pe/gcc/mpfr/3.1.4/ \ ---enable-gparity \ +--disable-fermion-reps \ CXX=hipcc MPICXX=mpicxx \ CXXFLAGS="-fPIC -I{$ROCM_PATH}/include/ -std=c++14 -I${MPICH_DIR}/include -L/lib64 " \ LDFLAGS="-L/lib64 -L/opt/rocm-5.2.0/lib/ -L${MPICH_DIR}/lib -lmpi -L${CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_hsa -lamdhip64 " diff --git a/systems/Crusher/sourceme.sh b/systems/Crusher/sourceme.sh index 42e15fb1..ac248b93 100644 --- a/systems/Crusher/sourceme.sh +++ b/systems/Crusher/sourceme.sh @@ -1,3 +1,5 @@ +. /autofs/nccs-svm1_home1/paboyle/Crusher/Grid/spack/share/spack/setup-env.sh +spack load c-lime export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sw/crusher/spack-envs/base/opt/cray-sles15-zen3/gcc-11.2.0/gperftools-2.9.1-72ubwtuc5wcz2meqltbfdb76epufgzo2/lib module load emacs #module load gperftools diff --git a/tests/core/Test_cf_coarsen_support.cc b/tests/core/Test_cf_coarsen_support.cc index ad0309b9..0812ab7e 100644 --- a/tests/core/Test_cf_coarsen_support.cc +++ b/tests/core/Test_cf_coarsen_support.cc @@ -75,8 +75,8 @@ int main (int argc, char ** argv) RealD M5=1.8; { - OverlapWilsonContFracTanhFermionR Dcf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0); - HermitianLinearOperator HermIndefOp(Dcf); + OverlapWilsonContFracTanhFermionD Dcf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0); + HermitianLinearOperator HermIndefOp(Dcf); HermIndefOp.Op(src,ref); HermIndefOp.OpDiag(src,result); @@ -92,8 +92,8 @@ int main (int argc, char ** argv) } { - OverlapWilsonPartialFractionTanhFermionR Dpf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0); - HermitianLinearOperator HermIndefOp(Dpf); + OverlapWilsonPartialFractionTanhFermionD Dpf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0); + HermitianLinearOperator HermIndefOp(Dpf); HermIndefOp.Op(src,ref); HermIndefOp.OpDiag(src,result); diff --git a/tests/core/Test_checker.cc b/tests/core/Test_checker.cc index f87133e5..c2382e91 100644 --- a/tests/core/Test_checker.cc +++ b/tests/core/Test_checker.cc @@ -140,14 +140,14 @@ int main (int argc, char ** argv) // RealD mass=0.1; // RealD M5=1.8; - // DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); + // DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); // LatticeFermion src_o(FrbGrid); // LatticeFermion result_o(FrbGrid); // pickCheckerboard(Odd,src_o,src); // result_o=Zero(); - // SchurDiagMooeeOperator HermOpEO(Ddwf); + // SchurDiagMooeeOperator HermOpEO(Ddwf); // ConjugateGradient CG(1.0e-8,10000); // CG(HermOpEO,src_o,result_o); diff --git a/tests/core/Test_contfrac_even_odd.cc b/tests/core/Test_contfrac_even_odd.cc index 42bfe361..5731719a 100644 --- a/tests/core/Test_contfrac_even_odd.cc +++ b/tests/core/Test_contfrac_even_odd.cc @@ -76,20 +76,20 @@ int main (int argc, char ** argv) RealD M5 =1.8; std::cout<(Dcf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + OverlapWilsonContFracTanhFermionD Dcf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0); + TestWhat(Dcf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(Dcfz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + OverlapWilsonContFracZolotarevFermionD Dcfz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,6.0); + TestWhat(Dcfz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(Dpf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + OverlapWilsonPartialFractionTanhFermionD Dpf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0); + TestWhat(Dpf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(Dpfz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + OverlapWilsonPartialFractionZolotarevFermionD Dpfz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,6.0); + TestWhat(Dpfz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); Grid_finalize(); } diff --git a/tests/core/Test_dwf_eofa_even_odd.cc b/tests/core/Test_dwf_eofa_even_odd.cc index 7812ebb8..532c740a 100644 --- a/tests/core/Test_dwf_eofa_even_odd.cc +++ b/tests/core/Test_dwf_eofa_even_odd.cc @@ -90,7 +90,7 @@ int main (int argc, char ** argv) RealD shift = 0.1234; RealD M5 = 1.8; int pm = 1; - DomainWallEOFAFermionR Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mq1, mq2, mq3, shift, pm, M5); + DomainWallEOFAFermionD Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mq1, mq2, mq3, shift, pm, M5); LatticeFermion src_e (FrbGrid); LatticeFermion src_o (FrbGrid); @@ -216,7 +216,7 @@ int main (int argc, char ** argv) pickCheckerboard(Even, phi_e, phi); pickCheckerboard(Odd , phi_o, phi); - SchurDiagMooeeOperator HermOpEO(Ddwf); + SchurDiagMooeeOperator HermOpEO(Ddwf); HermOpEO.MpcDagMpc(chi_e, dchi_e); HermOpEO.MpcDagMpc(chi_o, dchi_o); diff --git a/tests/core/Test_dwf_even_odd.cc b/tests/core/Test_dwf_even_odd.cc index 924eb3b7..f915b439 100644 --- a/tests/core/Test_dwf_even_odd.cc +++ b/tests/core/Test_dwf_even_odd.cc @@ -86,7 +86,7 @@ int main (int argc, char ** argv) RealD mass=0.1; RealD M5 =1.8; - DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); + DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); LatticeFermion src_e (FrbGrid); LatticeFermion src_o (FrbGrid); @@ -213,7 +213,7 @@ int main (int argc, char ** argv) pickCheckerboard(Even,phi_e,phi); pickCheckerboard(Odd ,phi_o,phi); - SchurDiagMooeeOperator HermOpEO(Ddwf); + SchurDiagMooeeOperator HermOpEO(Ddwf); HermOpEO.MpcDagMpc(chi_e,dchi_e); HermOpEO.MpcDagMpc(chi_o,dchi_o); diff --git a/tests/core/Test_gpwilson_even_odd.cc b/tests/core/Test_gpwilson_even_odd.cc index d510657e..c8587435 100644 --- a/tests/core/Test_gpwilson_even_odd.cc +++ b/tests/core/Test_gpwilson_even_odd.cc @@ -52,7 +52,7 @@ int main (int argc, char ** argv) // pRNG.SeedFixedIntegers(seeds); pRNG.SeedFixedIntegers(std::vector({45,12,81,9})); - typedef typename GparityWilsonFermionR::FermionField FermionField; + typedef typename GparityWilsonFermionD::FermionField FermionField; FermionField src (&Grid); random(pRNG,src); FermionField phi (&Grid); random(pRNG,phi); @@ -80,10 +80,10 @@ int main (int argc, char ** argv) RealD mass=0.1; - GparityWilsonFermionR::ImplParams params; + GparityWilsonFermionD::ImplParams params; std::vector twists(Nd,0); twists[1] = 1; params.twists = twists; - GparityWilsonFermionR Dw(Umu,Grid,RBGrid,mass,params); + GparityWilsonFermionD Dw(Umu,Grid,RBGrid,mass,params); FermionField src_e (&RBGrid); FermionField src_o (&RBGrid); @@ -199,7 +199,7 @@ int main (int argc, char ** argv) pickCheckerboard(Even,phi_e,phi); pickCheckerboard(Odd ,phi_o,phi); - SchurDiagMooeeOperator HermOpEO(Dw); + SchurDiagMooeeOperator HermOpEO(Dw); HermOpEO.MpcDagMpc(chi_e,dchi_e); HermOpEO.MpcDagMpc(chi_o,dchi_o); diff --git a/tests/core/Test_mobius_eofa_even_odd.cc b/tests/core/Test_mobius_eofa_even_odd.cc index 68ffe624..65d55896 100644 --- a/tests/core/Test_mobius_eofa_even_odd.cc +++ b/tests/core/Test_mobius_eofa_even_odd.cc @@ -92,7 +92,7 @@ int main (int argc, char ** argv) RealD shift = 0.1234; RealD M5 = 1.8; int pm = 1; - MobiusEOFAFermionR Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mq1, mq2, mq3, shift, pm, M5, b, c); + MobiusEOFAFermionD Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mq1, mq2, mq3, shift, pm, M5, b, c); LatticeFermion src_e (FrbGrid); LatticeFermion src_o (FrbGrid); @@ -218,7 +218,7 @@ int main (int argc, char ** argv) pickCheckerboard(Even, phi_e, phi); pickCheckerboard(Odd , phi_o, phi); - SchurDiagMooeeOperator HermOpEO(Ddwf); + SchurDiagMooeeOperator HermOpEO(Ddwf); HermOpEO.MpcDagMpc(chi_e, dchi_e); HermOpEO.MpcDagMpc(chi_o, dchi_o); diff --git a/tests/core/Test_mobius_even_odd.cc b/tests/core/Test_mobius_even_odd.cc index e210f236..91125ac6 100644 --- a/tests/core/Test_mobius_even_odd.cc +++ b/tests/core/Test_mobius_even_odd.cc @@ -108,8 +108,8 @@ int main (int argc, char ** argv) omegas.push_back( std::complex(0.0686324988446592,-0.0550658530827402) ); #endif - MobiusFermionR Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, 0.5,0.5); - // DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); + MobiusFermionD Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, 0.5,0.5); + // DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); LatticeFermion src_e (FrbGrid); LatticeFermion src_o (FrbGrid); @@ -264,7 +264,7 @@ int main (int argc, char ** argv) pickCheckerboard(Odd ,phi_o,phi); - SchurDiagMooeeOperator HermOpEO(Ddwf); + SchurDiagMooeeOperator HermOpEO(Ddwf); HermOpEO.MpcDagMpc(chi_e,dchi_e); HermOpEO.MpcDagMpc(chi_o,dchi_o); diff --git a/tests/core/Test_staggered.cc b/tests/core/Test_staggered.cc index ba615ad2..f38815ae 100644 --- a/tests/core/Test_staggered.cc +++ b/tests/core/Test_staggered.cc @@ -53,9 +53,9 @@ int main (int argc, char ** argv) pRNG.SeedFixedIntegers(seeds); // pRNG.SeedFixedIntegers(std::vector({45,12,81,9}); - typedef typename ImprovedStaggeredFermionR::FermionField FermionField; - typedef typename ImprovedStaggeredFermionR::ComplexField ComplexField; - typename ImprovedStaggeredFermionR::ImplParams params; + typedef typename ImprovedStaggeredFermionD::FermionField FermionField; + typedef typename ImprovedStaggeredFermionD::ComplexField ComplexField; + typename ImprovedStaggeredFermionD::ImplParams params; FermionField src (&Grid); random(pRNG,src); FermionField result(&Grid); result=Zero(); @@ -130,7 +130,7 @@ int main (int argc, char ** argv) // ref = ref + mass * src; } - ImprovedStaggeredFermionR Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0,params); + ImprovedStaggeredFermionD Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0,params); std::cout< HermOpEO(Ds); + SchurDiagMooeeOperator HermOpEO(Ds); HermOpEO.MpcDagMpc(chi_e,dchi_e); HermOpEO.MpcDagMpc(chi_o,dchi_o); diff --git a/tests/core/Test_staggered5D.cc b/tests/core/Test_staggered5D.cc index b1b3be1d..32ad0d17 100644 --- a/tests/core/Test_staggered5D.cc +++ b/tests/core/Test_staggered5D.cc @@ -60,9 +60,9 @@ int main (int argc, char ** argv) pRNG4.SeedFixedIntegers(seeds); pRNG5.SeedFixedIntegers(seeds); - typedef typename ImprovedStaggeredFermion5DR::FermionField FermionField; - typedef typename ImprovedStaggeredFermion5DR::ComplexField ComplexField; - typename ImprovedStaggeredFermion5DR::ImplParams params; + typedef typename ImprovedStaggeredFermion5DD::FermionField FermionField; + typedef typename ImprovedStaggeredFermion5DD::ComplexField ComplexField; + typename ImprovedStaggeredFermion5DD::ImplParams params; FermionField src (FGrid); @@ -148,7 +148,7 @@ int main (int argc, char ** argv) } } - ImprovedStaggeredFermion5DR Ds(Umu,Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,c1,c2,u0,params); + ImprovedStaggeredFermion5DD Ds(Umu,Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,c1,c2,u0,params); std::cout< HermOpEO(Ds); + SchurDiagMooeeOperator HermOpEO(Ds); HermOpEO.MpcDagMpc(chi_e,dchi_e); HermOpEO.MpcDagMpc(chi_o,dchi_o); diff --git a/tests/core/Test_staggered_naive.cc b/tests/core/Test_staggered_naive.cc index d8ca9d5f..9d32ad46 100644 --- a/tests/core/Test_staggered_naive.cc +++ b/tests/core/Test_staggered_naive.cc @@ -52,9 +52,9 @@ int main (int argc, char ** argv) pRNG.SeedFixedIntegers(seeds); // pRNG.SeedFixedIntegers(std::vector({45,12,81,9}); - typedef typename NaiveStaggeredFermionR::FermionField FermionField; - typedef typename NaiveStaggeredFermionR::ComplexField ComplexField; - typename NaiveStaggeredFermionR::ImplParams params; + typedef typename NaiveStaggeredFermionD::FermionField FermionField; + typedef typename NaiveStaggeredFermionD::ComplexField ComplexField; + typename NaiveStaggeredFermionD::ImplParams params; FermionField src (&Grid); random(pRNG,src); FermionField result(&Grid); result=Zero(); @@ -120,7 +120,7 @@ int main (int argc, char ** argv) // ref = ref + mass * src; } - NaiveStaggeredFermionR Ds(Umu,Grid,RBGrid,mass,c1,u0,params); + NaiveStaggeredFermionD Ds(Umu,Grid,RBGrid,mass,c1,u0,params); std::cout< HermOpEO(Ds); + SchurDiagMooeeOperator HermOpEO(Ds); HermOpEO.MpcDagMpc(chi_e,dchi_e); HermOpEO.MpcDagMpc(chi_o,dchi_o); diff --git a/tests/core/Test_wilson_clover.cc b/tests/core/Test_wilson_clover.cc index 8f143070..0ce0513f 100644 --- a/tests/core/Test_wilson_clover.cc +++ b/tests/core/Test_wilson_clover.cc @@ -52,8 +52,8 @@ int main(int argc, char **argv) pRNG.SeedFixedIntegers(seeds); // pRNG.SeedFixedIntegers(std::vector({45,12,81,9}); - typedef typename WilsonCloverFermionR::FermionField FermionField; - typename WilsonCloverFermionR::ImplParams params; + typedef typename WilsonCloverFermionD::FermionField FermionField; + typename WilsonCloverFermionD::ImplParams params; WilsonAnisotropyCoefficients anis; FermionField src(&Grid); @@ -88,8 +88,8 @@ int main(int argc, char **argv) RealD csw_r = 1.0; RealD csw_t = 1.0; - WilsonCloverFermionR Dwc(Umu, Grid, RBGrid, mass, csw_r, csw_t, anis, params); - CompactWilsonCloverFermionR Dwc_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 1.0, anis, params); + WilsonCloverFermionD Dwc(Umu, Grid, RBGrid, mass, csw_r, csw_t, anis, params); + CompactWilsonCloverFermionD Dwc_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 1.0, anis, params); std::cout << GridLogMessage << "==========================================================" << std::endl; std::cout << GridLogMessage << "= Testing that Deo + Doe = Dunprec " << std::endl; @@ -324,8 +324,8 @@ int main(int argc, char **argv) } ///////////////// - WilsonCloverFermionR Dwc_prime(U_prime, Grid, RBGrid, mass, csw_r, csw_t, anis, params); - CompactWilsonCloverFermionR Dwc_compact_prime(U_prime, Grid, RBGrid, mass, csw_r, csw_t, 1.0, anis, params); + WilsonCloverFermionD Dwc_prime(U_prime, Grid, RBGrid, mass, csw_r, csw_t, anis, params); + CompactWilsonCloverFermionD Dwc_compact_prime(U_prime, Grid, RBGrid, mass, csw_r, csw_t, 1.0, anis, params); tmp = Omega * src; pickCheckerboard(Even, src_e, tmp); @@ -377,14 +377,14 @@ int main(int argc, char **argv) chi = Zero(); phi = Zero(); - WilsonFermionR Dw(Umu, Grid, RBGrid, mass, params); + WilsonFermionD Dw(Umu, Grid, RBGrid, mass, params); Dw.M(src, result); Dwc.M(src, chi); Dwc_prime.M(Omega * src, phi); - WilsonFermionR Dw_prime(U_prime, Grid, RBGrid, mass, params); + WilsonFermionD Dw_prime(U_prime, Grid, RBGrid, mass, params); Dw_prime.M(Omega * src, result2); err = result - adj(Omega) * result2; @@ -411,7 +411,7 @@ int main(int argc, char **argv) chi = Zero(); phi = Zero(); err = Zero(); - WilsonCloverFermionR Dwc_csw0(Umu, Grid, RBGrid, mass, 0.0, 0.0, anis, params); // <-- Notice: csw=0 + WilsonCloverFermionD Dwc_csw0(Umu, Grid, RBGrid, mass, 0.0, 0.0, anis, params); // <-- Notice: csw=0 pickCheckerboard(Even, phi_e, phi); pickCheckerboard(Odd, phi_o, phi); @@ -437,7 +437,7 @@ int main(int argc, char **argv) chi = Zero(); phi = Zero(); err = Zero(); - CompactWilsonCloverFermionR Dwc_compact_csw0(Umu, Grid, RBGrid, mass, 0.0, 0.0, 1.0, anis, params); // <-- Notice: csw=0 + CompactWilsonCloverFermionD Dwc_compact_csw0(Umu, Grid, RBGrid, mass, 0.0, 0.0, 1.0, anis, params); // <-- Notice: csw=0 pickCheckerboard(Even, phi_e, phi); pickCheckerboard(Odd, phi_o, phi); diff --git a/tests/core/Test_wilson_conserved_current.cc b/tests/core/Test_wilson_conserved_current.cc index 3ee1a271..c66bf940 100644 --- a/tests/core/Test_wilson_conserved_current.cc +++ b/tests/core/Test_wilson_conserved_current.cc @@ -74,7 +74,7 @@ int main (int argc, char ** argv) SU::HotConfiguration(RNG4,Umu); } - typename WilsonCloverFermionR::ImplParams params; + typename WilsonCloverFermionD::ImplParams params; WilsonAnisotropyCoefficients anis; RealD mass = 0.1; RealD csw_r = 1.0; @@ -83,32 +83,32 @@ int main (int argc, char ** argv) std::cout<(Dw,Umu,UGrid,UrbGrid,&RNG4); + WilsonFermionD Dw(Umu,*UGrid,*UrbGrid,mass,params); + TestConserved(Dw,Umu,UGrid,UrbGrid,&RNG4); std::cout<(Dwc,Umu,UGrid,UrbGrid,&RNG4); + WilsonCloverFermionD Dwc(Umu, *UGrid, *UrbGrid, mass, csw_r, csw_t, anis, params); + TestConserved(Dwc,Umu,UGrid,UrbGrid,&RNG4); std::cout<(Dwcc,Umu,UGrid,UrbGrid,&RNG4); + CompactWilsonCloverFermionD Dwcc(Umu, *UGrid, *UrbGrid, mass, csw_r, csw_t, 1.0, anis, params); + TestConserved(Dwcc,Umu,UGrid,UrbGrid,&RNG4); std::cout<(Dewc,Umu,UGrid,UrbGrid,&RNG4); + WilsonExpCloverFermionD Dewc(Umu, *UGrid, *UrbGrid, mass, csw_r, csw_t, anis, params); + TestConserved(Dewc,Umu,UGrid,UrbGrid,&RNG4); std::cout<(Dewcc,Umu,UGrid,UrbGrid,&RNG4); + CompactWilsonExpCloverFermionD Dewcc(Umu, *UGrid, *UrbGrid, mass, csw_r, csw_t, 1.0, anis, params); + TestConserved(Dewcc,Umu,UGrid,UrbGrid,&RNG4); Grid_finalize(); } diff --git a/tests/core/Test_wilson_even_odd.cc b/tests/core/Test_wilson_even_odd.cc index 4d240b80..81081bd0 100644 --- a/tests/core/Test_wilson_even_odd.cc +++ b/tests/core/Test_wilson_even_odd.cc @@ -89,7 +89,7 @@ int main (int argc, char ** argv) RealD mass=0.1; - WilsonFermionR Dw(Umu,Grid,RBGrid,mass); + WilsonFermionD Dw(Umu,Grid,RBGrid,mass); LatticeFermion src_e (&RBGrid); LatticeFermion src_o (&RBGrid); @@ -205,7 +205,7 @@ int main (int argc, char ** argv) pickCheckerboard(Even,phi_e,phi); pickCheckerboard(Odd ,phi_o,phi); - SchurDiagMooeeOperator HermOpEO(Dw); + SchurDiagMooeeOperator HermOpEO(Dw); HermOpEO.MpcDagMpc(chi_e,dchi_e); HermOpEO.MpcDagMpc(chi_o,dchi_o); diff --git a/tests/core/Test_wilson_exp_clover.cc b/tests/core/Test_wilson_exp_clover.cc index 8516d0dc..017d8823 100644 --- a/tests/core/Test_wilson_exp_clover.cc +++ b/tests/core/Test_wilson_exp_clover.cc @@ -52,8 +52,8 @@ int main(int argc, char **argv) pRNG.SeedFixedIntegers(seeds); // pRNG.SeedFixedIntegers(std::vector({45,12,81,9}); - typedef typename WilsonExpCloverFermionR::FermionField FermionField; - typename WilsonExpCloverFermionR::ImplParams params; + typedef typename WilsonExpCloverFermionD::FermionField FermionField; + typename WilsonExpCloverFermionD::ImplParams params; WilsonAnisotropyCoefficients anis; FermionField src(&Grid); @@ -88,8 +88,8 @@ int main(int argc, char **argv) RealD csw_r = 1.0; RealD csw_t = 1.0; - WilsonExpCloverFermionR Dwc(Umu, Grid, RBGrid, mass, csw_r, csw_t, anis, params); - CompactWilsonExpCloverFermionR Dwc_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 1.0, anis, params); + WilsonExpCloverFermionD Dwc(Umu, Grid, RBGrid, mass, csw_r, csw_t, anis, params); + CompactWilsonExpCloverFermionD Dwc_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 1.0, anis, params); std::cout << GridLogMessage << "==========================================================" << std::endl; std::cout << GridLogMessage << "= Testing that Deo + Doe = Dunprec " << std::endl; @@ -324,8 +324,8 @@ int main(int argc, char **argv) } ///////////////// - WilsonExpCloverFermionR Dwc_prime(U_prime, Grid, RBGrid, mass, csw_r, csw_t, anis, params); - CompactWilsonExpCloverFermionR Dwc_compact_prime(U_prime, Grid, RBGrid, mass, csw_r, csw_t, 1.0, anis, params); + WilsonExpCloverFermionD Dwc_prime(U_prime, Grid, RBGrid, mass, csw_r, csw_t, anis, params); + CompactWilsonExpCloverFermionD Dwc_compact_prime(U_prime, Grid, RBGrid, mass, csw_r, csw_t, 1.0, anis, params); tmp = Omega * src; pickCheckerboard(Even, src_e, tmp); @@ -377,14 +377,14 @@ int main(int argc, char **argv) chi = Zero(); phi = Zero(); - WilsonFermionR Dw(Umu, Grid, RBGrid, mass, params); + WilsonFermionD Dw(Umu, Grid, RBGrid, mass, params); Dw.M(src, result); Dwc.M(src, chi); Dwc_prime.M(Omega * src, phi); - WilsonFermionR Dw_prime(U_prime, Grid, RBGrid, mass, params); + WilsonFermionD Dw_prime(U_prime, Grid, RBGrid, mass, params); Dw_prime.M(Omega * src, result2); err = result - adj(Omega) * result2; @@ -411,7 +411,7 @@ int main(int argc, char **argv) chi = Zero(); phi = Zero(); err = Zero(); - WilsonExpCloverFermionR Dwc_csw0(Umu, Grid, RBGrid, mass, 0.0, 0.0, anis, params); // <-- Notice: csw=0 + WilsonExpCloverFermionD Dwc_csw0(Umu, Grid, RBGrid, mass, 0.0, 0.0, anis, params); // <-- Notice: csw=0 pickCheckerboard(Even, phi_e, phi); pickCheckerboard(Odd, phi_o, phi); @@ -437,7 +437,7 @@ int main(int argc, char **argv) chi = Zero(); phi = Zero(); err = Zero(); - CompactWilsonExpCloverFermionR Dwc_compact_csw0(Umu, Grid, RBGrid, mass, 0.0, 0.0, 1.0, anis, params); // <-- Notice: csw=0 + CompactWilsonExpCloverFermionD Dwc_compact_csw0(Umu, Grid, RBGrid, mass, 0.0, 0.0, 1.0, anis, params); // <-- Notice: csw=0 pickCheckerboard(Even, phi_e, phi); pickCheckerboard(Odd, phi_o, phi); diff --git a/tests/core/Test_wilson_twisted_mass_even_odd.cc b/tests/core/Test_wilson_twisted_mass_even_odd.cc index d9e798c3..0351f7cd 100644 --- a/tests/core/Test_wilson_twisted_mass_even_odd.cc +++ b/tests/core/Test_wilson_twisted_mass_even_odd.cc @@ -90,7 +90,7 @@ int main (int argc, char ** argv) RealD mass=0.1; RealD mu = 0.1; - WilsonTMFermionR Dw(Umu,Grid,RBGrid,mass,mu); + WilsonTMFermionD Dw(Umu,Grid,RBGrid,mass,mu); LatticeFermion src_e (&RBGrid); LatticeFermion src_o (&RBGrid); @@ -206,7 +206,7 @@ int main (int argc, char ** argv) pickCheckerboard(Even,phi_e,phi); pickCheckerboard(Odd ,phi_o,phi); - SchurDiagMooeeOperator HermOpEO(Dw); + SchurDiagMooeeOperator HermOpEO(Dw); HermOpEO.MpcDagMpc(chi_e,dchi_e); HermOpEO.MpcDagMpc(chi_o,dchi_o); diff --git a/tests/core/Test_zmobius_even_odd.cc b/tests/core/Test_zmobius_even_odd.cc index f6e18934..ee6fe860 100644 --- a/tests/core/Test_zmobius_even_odd.cc +++ b/tests/core/Test_zmobius_even_odd.cc @@ -123,7 +123,7 @@ int main (int argc, char ** argv) RealD _mass,RealD _M5, std::vector &gamma, RealD b,RealD c,const ImplParams &p= ImplParams()) : */ - ZMobiusFermionR Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, omegas,RealD(1.),RealD(0.)); + ZMobiusFermionD Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, omegas,RealD(1.),RealD(0.)); LatticeFermion src_e (FrbGrid); LatticeFermion src_o (FrbGrid); @@ -278,7 +278,7 @@ int main (int argc, char ** argv) pickCheckerboard(Odd ,phi_o,phi); - SchurDiagMooeeOperator HermOpEO(Ddwf); + SchurDiagMooeeOperator HermOpEO(Ddwf); HermOpEO.MpcDagMpc(chi_e,dchi_e); HermOpEO.MpcDagMpc(chi_o,dchi_o); diff --git a/tests/debug/Test_cayley_cg.cc b/tests/debug/Test_cayley_cg.cc index 5418a8af..74492fd9 100644 --- a/tests/debug/Test_cayley_cg.cc +++ b/tests/debug/Test_cayley_cg.cc @@ -125,10 +125,10 @@ int main (int argc, char ** argv) std::cout<(Ddwf,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); - TestReconstruct5DFA(Ddwf,DdwfF,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + TestCGinversions(Ddwf,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + TestReconstruct5DFA(Ddwf,DdwfF,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); RealD b=1.5;// Scale factor b+c=2, b-c=1 RealD c=0.5; @@ -137,54 +137,54 @@ int main (int argc, char ** argv) std::cout<(Dmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); - TestReconstruct5DFA(Dmob,DmobF,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + TestCGinversions(Dmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + TestReconstruct5DFA(Dmob,DmobF,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(ZDmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); - TestReconstruct5D(ZDmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + ZMobiusFermionD ZDmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,gamma,b,c); + TestCGinversions(ZDmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + TestReconstruct5D(ZDmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(Dzolo,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); - TestReconstruct5D(Dzolo,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + MobiusZolotarevFermionD Dzolo(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,0.1,2.0); + TestCGinversions(Dzolo,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + TestReconstruct5D(Dzolo,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(Dsham,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); - TestReconstruct5DFA(Dsham,DshamF,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + TestCGinversions(Dsham,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + TestReconstruct5DFA(Dsham,DshamF,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(Dshamz,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); - TestReconstruct5D(Dshamz,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + ShamirZolotarevFermionD Dshamz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0); + TestCGinversions(Dshamz,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + TestReconstruct5D(Dshamz,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(Dov,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); - TestReconstruct5DFA(Dov,DovF,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + TestCGinversions(Dov,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + TestReconstruct5DFA(Dov,DovF,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(Dovz,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); - TestReconstruct5D(Dovz,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + OverlapWilsonCayleyZolotarevFermionD Dovz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0); + TestCGinversions(Dovz,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + TestReconstruct5D(Dovz,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); Grid_finalize(); } diff --git a/tests/debug/Test_cayley_coarsen_support.cc b/tests/debug/Test_cayley_coarsen_support.cc index b2f691d7..2190a9b0 100644 --- a/tests/debug/Test_cayley_coarsen_support.cc +++ b/tests/debug/Test_cayley_coarsen_support.cc @@ -95,8 +95,8 @@ int main (int argc, char ** argv) RealD mass=0.5; RealD M5=1.8; - DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); - Gamma5R5HermitianLinearOperator HermIndefOp(Ddwf); + DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); + Gamma5R5HermitianLinearOperator HermIndefOp(Ddwf); HermIndefOp.Op(src,ref); HermIndefOp.OpDiag(src,result); @@ -118,7 +118,7 @@ int main (int argc, char ** argv) std::cout< HermDefOp(Ddwf); + MdagMLinearOperator HermDefOp(Ddwf); typedef Aggregation Subspace; Subspace Aggregates(Coarse5d,FGrid,cb); diff --git a/tests/debug/Test_cayley_even_odd.cc b/tests/debug/Test_cayley_even_odd.cc index 5e800b26..b6eecc0f 100644 --- a/tests/debug/Test_cayley_even_odd.cc +++ b/tests/debug/Test_cayley_even_odd.cc @@ -76,41 +76,41 @@ int main (int argc, char ** argv) RealD mass=0.1; RealD M5 =1.8; std::cout<(Ddwf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); + TestWhat(Ddwf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); RealD b=1.5;// Scale factor b+c=2, b-c=1 RealD c=0.5; std::vector gamma(Ls,ComplexD(1.0,0.1)); std::cout<(Dmob,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + MobiusFermionD Dmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c); + TestWhat(Dmob,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(ZDmob,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + ZMobiusFermionD ZDmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,gamma,b,c); + TestWhat(ZDmob,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(Dzolo,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + MobiusZolotarevFermionD Dzolo(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,0.1,2.0); + TestWhat(Dzolo,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(Dsham,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + ScaledShamirFermionD Dsham(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,2.0); + TestWhat(Dsham,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(Dshamz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + ShamirZolotarevFermionD Dshamz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0); + TestWhat(Dshamz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(Dov,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + OverlapWilsonCayleyTanhFermionD Dov(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0); + TestWhat(Dov,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(Dovz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + OverlapWilsonCayleyZolotarevFermionD Dovz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,2.0); + TestWhat(Dovz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); Grid_finalize(); } diff --git a/tests/debug/Test_cayley_ldop_cr.cc b/tests/debug/Test_cayley_ldop_cr.cc index 416017e5..997b8df5 100644 --- a/tests/debug/Test_cayley_ldop_cr.cc +++ b/tests/debug/Test_cayley_ldop_cr.cc @@ -83,8 +83,8 @@ int main (int argc, char ** argv) std::cout< HermIndefOp(Ddwf); + DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); + Gamma5R5HermitianLinearOperator HermIndefOp(Ddwf); const int nbasis = 8; @@ -95,7 +95,7 @@ int main (int argc, char ** argv) std::cout< HermDefOp(Ddwf); + MdagMLinearOperator HermDefOp(Ddwf); Subspace Aggregates(Coarse5d,FGrid,cb); Aggregates.CreateSubspace(RNG5,HermDefOp); diff --git a/tests/debug/Test_cayley_mres.cc b/tests/debug/Test_cayley_mres.cc index bfbc3cf7..26d3dc60 100644 --- a/tests/debug/Test_cayley_mres.cc +++ b/tests/debug/Test_cayley_mres.cc @@ -128,8 +128,8 @@ int main (int argc, char ** argv) std::cout<(Ddwf,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); + TestConserved(Ddwf,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); RealD b=1.5;// Scale factor b+c=2, b-c=1 RealD c=0.5; @@ -138,23 +138,23 @@ int main (int argc, char ** argv) std::cout<(Dmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + MobiusFermionD Dmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c); + TestConserved(Dmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(Dsham,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + ScaledShamirFermionD Dsham(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,2.0); + TestConserved(Dsham,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(ZDmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5,&ZDmobrev); + ZMobiusFermionD ZDmob(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,omegas,b,c); + ZMobiusFermionD ZDmobrev(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,omegasrev,b,c); + TestConserved(ZDmob,Umu,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5,&ZDmobrev); Grid_finalize(); } @@ -290,7 +290,7 @@ void TestConserved(Action & Ddwf, const RealD DmuPAmu{real(TensorRemove(sumPA[t]-sumPA[(t-1+Nt)%Nt]))}; std::cout< sumPAref; @@ -565,8 +565,8 @@ void TestConserved1(Action & Ddwf, Action & Ddwfrev, std::cout <<" PAc action "<oSites(),{ diff --git a/tests/debug/Test_heatbath_dwf_eofa.cc b/tests/debug/Test_heatbath_dwf_eofa.cc index e1c18021..5920054d 100644 --- a/tests/debug/Test_heatbath_dwf_eofa.cc +++ b/tests/debug/Test_heatbath_dwf_eofa.cc @@ -77,8 +77,8 @@ int main(int argc, char** argv) LatticeGaugeField Umu(UGrid); SU::HotConfiguration(RNG4, Umu); - DomainWallEOFAFermionR Lop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mpv, 0.0, -1, M5); - DomainWallEOFAFermionR Rop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mpv, mf, mpv, -1.0, 1, M5); + DomainWallEOFAFermionD Lop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mpv, 0.0, -1, M5); + DomainWallEOFAFermionD Rop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mpv, mf, mpv, -1.0, 1, M5); // Construct the action and test the heatbath (zero initial guess) { diff --git a/tests/debug/Test_heatbath_dwf_eofa_gparity.cc b/tests/debug/Test_heatbath_dwf_eofa_gparity.cc index 7eabfc65..982f35db 100644 --- a/tests/debug/Test_heatbath_dwf_eofa_gparity.cc +++ b/tests/debug/Test_heatbath_dwf_eofa_gparity.cc @@ -41,7 +41,7 @@ using namespace Grid; ; typedef GparityWilsonImplR FermionImplPolicy; -typedef GparityDomainWallEOFAFermionR FermionAction; +typedef GparityDomainWallEOFAFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; // Parameters for test @@ -82,7 +82,7 @@ int main(int argc, char** argv) LatticeGaugeField Umu(UGrid); SU::HotConfiguration(RNG4, Umu); - // GparityDomainWallFermionR::ImplParams params; + // GparityDomainWallFermionD::ImplParams params; FermionAction::ImplParams params; FermionAction Lop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mpv, 0.0, -1, M5, params); FermionAction Rop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mpv, mf, mpv, -1.0, 1, M5, params); diff --git a/tests/debug/Test_heatbath_mobius_eofa.cc b/tests/debug/Test_heatbath_mobius_eofa.cc index 48806642..3824daab 100644 --- a/tests/debug/Test_heatbath_mobius_eofa.cc +++ b/tests/debug/Test_heatbath_mobius_eofa.cc @@ -79,8 +79,8 @@ int main(int argc, char** argv) LatticeGaugeField Umu(UGrid); SU::HotConfiguration(RNG4, Umu); - MobiusEOFAFermionR Lop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mpv, 0.0, -1, M5, b, c); - MobiusEOFAFermionR Rop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mpv, mf, mpv, -1.0, 1, M5, b, c); + MobiusEOFAFermionD Lop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mpv, 0.0, -1, M5, b, c); + MobiusEOFAFermionD Rop(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mpv, mf, mpv, -1.0, 1, M5, b, c); // Construct the action and test the heatbath (zero initial guess) { diff --git a/tests/debug/Test_heatbath_mobius_eofa_gparity.cc b/tests/debug/Test_heatbath_mobius_eofa_gparity.cc index 52447e5e..fd3d96f8 100644 --- a/tests/debug/Test_heatbath_mobius_eofa_gparity.cc +++ b/tests/debug/Test_heatbath_mobius_eofa_gparity.cc @@ -41,7 +41,7 @@ using namespace Grid; ; typedef GparityWilsonImplR FermionImplPolicy; -typedef GparityMobiusEOFAFermionR FermionAction; +typedef GparityMobiusEOFAFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; // Parameters for test diff --git a/tests/debug/Test_reweight_dwf_eofa.cc b/tests/debug/Test_reweight_dwf_eofa.cc index a150b18f..6a5452c7 100644 --- a/tests/debug/Test_reweight_dwf_eofa.cc +++ b/tests/debug/Test_reweight_dwf_eofa.cc @@ -105,10 +105,10 @@ int main(int argc, char **argv) SU::HotConfiguration(RNG4, Umu); // Initialize RHMC fermion operators - DomainWallFermionR Ddwf_f(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, M5); - DomainWallFermionR Ddwf_b(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, M5); - SchurDiagMooeeOperator MdagM(Ddwf_f); - SchurDiagMooeeOperator VdagV(Ddwf_b); + DomainWallFermionD Ddwf_f(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, M5); + DomainWallFermionD Ddwf_b(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, M5); + SchurDiagMooeeOperator MdagM(Ddwf_f); + SchurDiagMooeeOperator VdagV(Ddwf_b); // Degree 12 rational approximations to x^(1/4) and x^(-1/4) double lo = 0.0001; @@ -153,10 +153,10 @@ int main(int argc, char **argv) RealD shift_L = 0.0; RealD shift_R = -1.0; int pm = 1; - DomainWallEOFAFermionR Deofa_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5); - DomainWallEOFAFermionR Deofa_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5); - MdagMLinearOperator LdagL(Deofa_L); - MdagMLinearOperator RdagR(Deofa_R); + DomainWallEOFAFermionD Deofa_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5); + DomainWallEOFAFermionD Deofa_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5); + MdagMLinearOperator LdagL(Deofa_L); + MdagMLinearOperator RdagR(Deofa_R); // Stochastically estimate reweighting factor via EOFA RealD k = Deofa_L.k; diff --git a/tests/debug/Test_reweight_dwf_eofa_gparity.cc b/tests/debug/Test_reweight_dwf_eofa_gparity.cc index df2d95a0..70ae94aa 100644 --- a/tests/debug/Test_reweight_dwf_eofa_gparity.cc +++ b/tests/debug/Test_reweight_dwf_eofa_gparity.cc @@ -33,7 +33,7 @@ using namespace std; using namespace Grid; ; -typedef typename GparityDomainWallFermionR::FermionField FermionField; +typedef typename GparityDomainWallFermionD::FermionField FermionField; // parameters for test const std::vector grid_dim = { 8, 8, 8, 8 }; @@ -107,11 +107,11 @@ int main(int argc, char **argv) SU::HotConfiguration(RNG4, Umu); // Initialize RHMC fermion operators - GparityDomainWallFermionR::ImplParams params; - GparityDomainWallFermionR Ddwf_f(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, M5, params); - GparityDomainWallFermionR Ddwf_b(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, M5, params); - SchurDiagMooeeOperator MdagM(Ddwf_f); - SchurDiagMooeeOperator VdagV(Ddwf_b); + GparityDomainWallFermionD::ImplParams params; + GparityDomainWallFermionD Ddwf_f(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, M5, params); + GparityDomainWallFermionD Ddwf_b(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, M5, params); + SchurDiagMooeeOperator MdagM(Ddwf_f); + SchurDiagMooeeOperator VdagV(Ddwf_b); // Degree 12 rational approximations to x^(1/4) and x^(-1/4) double lo = 0.0001; @@ -156,10 +156,10 @@ int main(int argc, char **argv) RealD shift_L = 0.0; RealD shift_R = -1.0; int pm = 1; - GparityDomainWallEOFAFermionR Deofa_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5, params); - GparityDomainWallEOFAFermionR Deofa_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5, params); - MdagMLinearOperator LdagL(Deofa_L); - MdagMLinearOperator RdagR(Deofa_R); + GparityDomainWallEOFAFermionD Deofa_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5, params); + GparityDomainWallEOFAFermionD Deofa_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5, params); + MdagMLinearOperator LdagL(Deofa_L); + MdagMLinearOperator RdagR(Deofa_R); // Stochastically estimate reweighting factor via EOFA RealD k = Deofa_L.k; diff --git a/tests/debug/Test_reweight_mobius_eofa.cc b/tests/debug/Test_reweight_mobius_eofa.cc index 88ecab7d..744dd302 100644 --- a/tests/debug/Test_reweight_mobius_eofa.cc +++ b/tests/debug/Test_reweight_mobius_eofa.cc @@ -107,10 +107,10 @@ int main(int argc, char **argv) SU::HotConfiguration(RNG4, Umu); // Initialize RHMC fermion operators - MobiusFermionR Ddwf_f(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, M5, b, c); - MobiusFermionR Ddwf_b(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, M5, b, c); - SchurDiagMooeeOperator MdagM(Ddwf_f); - SchurDiagMooeeOperator VdagV(Ddwf_b); + MobiusFermionD Ddwf_f(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, M5, b, c); + MobiusFermionD Ddwf_b(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, M5, b, c); + SchurDiagMooeeOperator MdagM(Ddwf_f); + SchurDiagMooeeOperator VdagV(Ddwf_b); // Degree 12 rational approximations to x^(1/4) and x^(-1/4) double lo = 0.0001; @@ -155,10 +155,10 @@ int main(int argc, char **argv) RealD shift_L = 0.0; RealD shift_R = -1.0; int pm = 1; - MobiusEOFAFermionR Deofa_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5, b, c); - MobiusEOFAFermionR Deofa_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5, b, c); - MdagMLinearOperator LdagL(Deofa_L); - MdagMLinearOperator RdagR(Deofa_R); + MobiusEOFAFermionD Deofa_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5, b, c); + MobiusEOFAFermionD Deofa_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5, b, c); + MdagMLinearOperator LdagL(Deofa_L); + MdagMLinearOperator RdagR(Deofa_R); // Stochastically estimate reweighting factor via EOFA RealD k = Deofa_L.k; diff --git a/tests/debug/Test_reweight_mobius_eofa_gparity.cc b/tests/debug/Test_reweight_mobius_eofa_gparity.cc index 31708265..e2a4fb47 100644 --- a/tests/debug/Test_reweight_mobius_eofa_gparity.cc +++ b/tests/debug/Test_reweight_mobius_eofa_gparity.cc @@ -33,7 +33,7 @@ using namespace std; using namespace Grid; ; -typedef typename GparityDomainWallFermionR::FermionField FermionField; +typedef typename GparityDomainWallFermionD::FermionField FermionField; // parameters for test const std::vector grid_dim = { 8, 8, 8, 8 }; @@ -109,11 +109,11 @@ int main(int argc, char **argv) SU::HotConfiguration(RNG4, Umu); // Initialize RHMC fermion operators - GparityDomainWallFermionR::ImplParams params; - GparityMobiusFermionR Ddwf_f(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, M5, b, c, params); - GparityMobiusFermionR Ddwf_b(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, M5, b, c, params); - SchurDiagMooeeOperator MdagM(Ddwf_f); - SchurDiagMooeeOperator VdagV(Ddwf_b); + GparityDomainWallFermionD::ImplParams params; + GparityMobiusFermionD Ddwf_f(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, M5, b, c, params); + GparityMobiusFermionD Ddwf_b(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, M5, b, c, params); + SchurDiagMooeeOperator MdagM(Ddwf_f); + SchurDiagMooeeOperator VdagV(Ddwf_b); // Degree 12 rational approximations to x^(1/4) and x^(-1/4) double lo = 0.0001; @@ -158,10 +158,10 @@ int main(int argc, char **argv) RealD shift_L = 0.0; RealD shift_R = -1.0; int pm = 1; - GparityMobiusEOFAFermionR Deofa_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5, b, c, params); - GparityMobiusEOFAFermionR Deofa_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5, b, c, params); - MdagMLinearOperator LdagL(Deofa_L); - MdagMLinearOperator RdagR(Deofa_R); + GparityMobiusEOFAFermionD Deofa_L(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, shift_L, pm, M5, b, c, params); + GparityMobiusEOFAFermionD Deofa_R(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, shift_R, pm, M5, b, c, params); + MdagMLinearOperator LdagL(Deofa_L); + MdagMLinearOperator RdagR(Deofa_R); // Stochastically estimate reweighting factor via EOFA RealD k = Deofa_L.k; diff --git a/tests/forces/Test_contfrac_force.cc b/tests/forces/Test_contfrac_force.cc index dc9eedce..526cde12 100644 --- a/tests/forces/Test_contfrac_force.cc +++ b/tests/forces/Test_contfrac_force.cc @@ -66,7 +66,7 @@ int main (int argc, char ** argv) //////////////////////////////////// RealD mass=0.01; RealD M5=1.8; - OverlapWilsonContFracTanhFermionR Dcf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0); + OverlapWilsonContFracTanhFermionD Dcf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0); Dcf.M (phi,Mphi); ComplexD S = innerProduct(Mphi,Mphi); // pdag MdagM p diff --git a/tests/forces/Test_double_ratio.cc b/tests/forces/Test_double_ratio.cc new file mode 100644 index 00000000..0a350692 --- /dev/null +++ b/tests/forces/Test_double_ratio.cc @@ -0,0 +1,510 @@ +/* + 2f Full det MdagM 10^6 force ~ 1.3e7 +rid : Message : 1767.283471 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +Grid : Message : 1767.283476 s : S1 : 1.52885e+09 +Grid : Message : 1767.283480 s : S2 : 1.52886e+09 +Grid : Message : 1767.283482 s : dS : 8877.34 +Grid : Message : 1767.283483 s : dSpred : 8877.7 +Grid : Message : 1767.283484 s : diff : -0.360484 +Grid : Message : 1767.283485 s : ********************************************************* + + 2f Full det MpcdagMpc 10^6 force ~ 1.8e6 +Grid : Message : 2399.576962 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +Grid : Message : 2399.576968 s : S1 : 1.52885e+09 +Grid : Message : 2399.576972 s : S2 : 1.52886e+09 +Grid : Message : 2399.576974 s : dS : 9728.49 +Grid : Message : 2399.576975 s : dSpred : 9726.58 +Grid : Message : 2399.576976 s : diff : 1.90683 +Grid : Message : 2399.576977 s : ********************************************************* + + 2f bdy MdagM 1500 force Force ~ 2800 +Grid : Message : 4622.385061 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +Grid : Message : 4622.385067 s : S1 : 1.52885e+09 +Grid : Message : 4622.385071 s : S2 : 1.52885e+09 +Grid : Message : 4622.385072 s : dS : 25.4944 +Grid : Message : 4622.385073 s : dSpred : 25.4672 +Grid : Message : 4622.385074 s : diff : 0.0271414 +Grid : Message : 4622.385075 s : ********************************************************* + + 2f bdy MpcdagMpc 10^6 force Force ~ 2200 +Grid : Message : 4622.385061 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +Grid : Message : 4622.385067 s : S1 : 1.52885e+09 +Grid : Message : 4622.385071 s : S2 : 1.52885e+09 +Grid : Message : 4622.385072 s : dS : 25.4944 +Grid : Message : 4622.385073 s : dSpred : 25.4672 +Grid : Message : 4622.385074 s : diff : 0.0271414 +Grid : Message : 4622.385075 s : ********************************************************* + + 1f Bdy Det +// +// These all had tol set by OFRp, not through MDpoles +// So assumptions it was Remez might be wrong. +// +Optimisation log: looser rational AND MD tolerances sloppy +MobiusForce.221179 -- same as HMC. dS is mispredicted Forece ~2.8 +Grid : Message : 6582.258991 s : dS : 0.024478 +Grid : Message : 6582.258992 s : dSpred : 0.00791876 +Grid : Message : 6582.258994 s : diff : 0.0165592 + +MobiusForce.221193 -- tight rational AND MD tolerances to 1e-8 ~ 2.8 same +Grid : Message : 1964.939209 s : S1 : 7.64404e+08 +Grid : Message : 1964.939213 s : S2 : 7.64404e+08 +Grid : Message : 1964.939215 s : dS : -0.00775838 <--- too loose even on action +Grid : Message : 1964.939216 s : dSpred : -0.00416793 +Grid : Message : 1964.939217 s : diff : -0.00359045 + +MobiusForce.221394 -- tight rational, MD tol sloppy Force ~ 2.8 +Grid : Message : 2376.921950 s : S1 : 764404436.44069 +Grid : Message : 2376.921954 s : S2 : 764404436.43299 +Grid : Message : 2376.921956 s : dS : -0.0076971054077148 +Grid : Message : 2376.921958 s : dSpred : -0.0041610472282526 +Grid : Message : 2376.921959 s : diff : -0.0035360581794623 + + +MobiusForce.221587 -- slightly sloppier action, coming from tol array + -- much sloppier force + -- degree 18 + 1.0e-8,1.0e-8,1.0e-8,1.0e-8, + 1.0e-6,3.0e-7,1.0e-7,1.0e-7, // Orig sloppy +Grid : Message : 2438.875507 s : S1 : 764404436.42251 +Grid : Message : 2438.875512 s : S2 : 764404436.4148 +Grid : Message : 2438.875514 s : dS : -0.0077102184295654 +Grid : Message : 2438.875516 s : dSpred : -0.0075684496959103 +Grid : Message : 2438.875517 s : diff : -0.00014176873365508 + +MobiusForce.221639 3.0e-6,1.0e-6,1.0e-7,1.0e-7, // soften convergence more + +Grid : Message : 2373.927550 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +Grid : Message : 2373.927600 s : S1 : 764404436.42251 +Grid : Message : 2373.927640 s : S2 : 764404436.4148 +Grid : Message : 2373.927660 s : dS : -0.0077102184295654 +Grid : Message : 2373.927680 s : dSpred : -0.0075993463919849 +Grid : Message : 2373.927690 s : diff : -0.00011087203758051 +Grid : Message : 2373.927700 s : ********************************************************* + + +Grid : Message : 69.269319 s : ApproxPowerMD shift[0] pole 9.5166866092503e-06 residue -2.0047722631555e-08 tol 3e-06 +Grid : Message : 69.269321 s : ApproxPowerMD shift[1] pole 4.7123486192778e-05 residue -1.316766030683e-07 tol 1e-06 +Grid : Message : 69.269323 s : ApproxPowerMD shift[2] pole 0.00014860967743736 residue -6.109883117444e-07 tol 1e-07 +Grid : Message : 69.269325 s : ApproxPowerMD shift[3] pole 0.00041055696132763 residue -2.6088717433891e-06 tol 1e-07 +Grid : Message : 69.269327 s : ApproxPowerMD shift[4] pole 0.0010822555692906 residue -1.0853799412802e-05 tol 1e-08 +Grid : Message : 69.269329 s : ApproxPowerMD shift[5] pole 0.0028029613512087 residue -4.4741734470158e-05 tol 1e-08 +Grid : Message : 69.269331 s : ApproxPowerMD shift[6] pole 0.0072103567378527 residue -0.00018380499193253 tol 1e-08 + +rusher 96I]$ more MobiusForce.221887 + 1.0e-5,3.0e-6,3.0e-7,1.0e-7, // soften convergence more more +// <-- this is the dirichlet solve, why poorer conditioned??? +Grid : Message : 1627.226206 s : ConjugateGradientMultiShift k=3643 Shift 3 has converged +Grid : Message : 1667.373045 s : ConjugateGradientMultiShift k=5381 Shift 2 has converged +Grid : Message : 1705.236992 s : ConjugateGradientMultiShift k=7063 Shift 1 has converged +Grid : Message : 1752.493182 s : ConjugateGradientMultiShift k=9220 Shift 0 has converged +// +//Grid : Message : 1414.837250 s : OneFlavourEvenOddRatioRationalPseudoFermionAction deriv: doing (M^dag M)^{-1/2} ( (V^dag V)^{1/4} Phi) +Grid : Message : 1523.416680 s : ConjugateGradientMultiShift k=3846 Shift 2 has converged +Grid : Message : 1530.798503 s : ConjugateGradientMultiShift k=4143 Shift 1 has converged +Grid : Message : 1536.153421 s : ConjugateGradientMultiShift k=4353 Shift 0 has converged <-- this is the non-dirichlet solve + +Grid : Message : 2339.927565 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +Grid : Message : 2339.927571 s : S1 : 764404436.42251 +Grid : Message : 2339.927575 s : S2 : 764404436.4148 +Grid : Message : 2339.927577 s : dS : -0.0077102184295654 +Grid : Message : 2339.927579 s : dSpred : -0.0068752425267964 +Grid : Message : 2339.927580 s : diff : -0.00083497590276901 +Grid : Message : 2339.927581 s : ********************************************************* +Grid : Message : 2339.927582 s : Done +Grid : Message : 2339.927582 s : ********************************************************* + +Force 76 S {S {S {(9.0175185326468,-3.5764415623768e-36)}}} +Force 77 S {S {S {(4.1289977678493,-4.3364721285803e-37)}}} +Force 78 S {S {S {(3.2299269465841,6.0391022273495e-37)}}} +Force 79 S {S {S {(3.0051199649288,-9.6243599973575e-37)}}} +Force 80 S {S {S {(2.8924316727872,-1.3371248240604e-37)}}} +Force 81 S {S {S {(2.8270868791781,1.792628885004e-37)}}} +Force 82 S {S {S {(2.8676819960087,-1.3518185034456e-36)}}} +Force 83 S {S {S {(2.7724152154523,1.4950818774521e-37)}}} +Force 84 S {S {S {(3.0204624534964,-9.6475025423893e-36)}}} +Force 85 S {S {S {(2.8631304063459,2.2426228161781e-37)}}} +Force 86 S {S {S {(2.9025673908905,-1.3942465026706e-36)}}} +Force 87 S {S {S {(2.8553405232646,-2.0938493124022e-38)}}} +Force 88 S {S {S {(3.2820184381375,-1.422348164495e-36)}}} +Force 89 S {S {S {(3.8974980085791,1.1682209795266e-35)}}} +Force 90 S {S {S {(4.660053618223,-1.4399805797573e-37)}}} +Force 91 S {S {S {(6.7993872372366,1.4524702072348e-36)}}} +Full +Grid : Message : 1523.416680 s : ConjugateGradientMultiShift k=3846 Shift 2 has converged +Grid : Message : 1530.798503 s : ConjugateGradientMultiShift k=4143 Shift 1 has converged +Grid : Message : 1536.153421 s : ConjugateGradientMultiShift k=4353 Shift 0 has converged +PV solve depth 3 +Grid : Message : 1667.373045 s : ConjugateGradientMultiShift k=5381 Shift 2 has converged +Grid : Message : 1705.236992 s : ConjugateGradientMultiShift k=7063 Shift 1 has converged +Grid : Message : 1752.493182 s : ConjugateGradientMultiShift k=9220 Shift 0 has converged + +MobiusForce.222490 depth 1 +Grid : Message : 2155.595070 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +Grid : Message : 2155.595076 s : S1 : 764404436.37475 +Grid : Message : 2155.595080 s : S2 : 764404436.21131 +Grid : Message : 2155.595082 s : dS : -0.16344606876373 +Grid : Message : 2155.595084 s : dSpred : -0.16235663327375 +Grid : Message : 2155.595085 s : diff : -0.0010894354899788 + +Force 4 S {S {S {(24.512489110423,-7.4203080895657e-36)}}} +Force 5 S {S {S {(14.442663101577,7.3909207307951e-37)}}} +Force 6 S {S {S {(12.298567945213,2.1989091200069e-36)}}} +Force 7 S {S {S {(11.582362859271,-2.2540104177017e-36)}}} +Force 8 S {S {S {(11.465725500906,-2.9512255045332e-36)}}} +Force 9 S {S {S {(10.869067954412,-2.8388188572358e-36)}}} +Force 10 S {S {S {(10.937111429576,-3.3530976357206e-36)}}} +Force 11 S {S {S {(11.23500117508,-1.4487967873885e-36)}}} +Force 12 S {S {S {(10.900736551834,5.1427877848475e-36)}}} Force is bigger +Force 13 S {S {S {(10.951921323651,-1.2098775605838e-35)}}} +Force 14 S {S {S {(10.676529230575,-2.50527233519e-36)}}} +Force 15 S {S {S {(10.98568474467,3.2193851533145e-36)}}} +Force 16 S {S {S {(11.931707726568,-8.5223340434616e-37)}}} +Force 17 S {S {S {(13.751904678482,7.6337337826369e-36)}}} +Force 18 S {S {S {(17.518955473833,1.8073225643893e-36)}}} +Force 19 S {S {S {(20.36519304598,-2.5184966466368e-36)}}} +Full solve +Grid : Message : 1441.297575 s : ConjugateGradientMultiShift k=3846 Shift 2 has converged +Grid : Message : 1449.206520 s : ConjugateGradientMultiShift k=4143 Shift 1 has converged +Grid : Message : 1454.352909 s : ConjugateGradientMultiShift k=4353 Shift 0 has converged + +Dirichlet solve -- why so expensive?? +Spectral radius worse? +Grid : Message : 1571.887003 s : ConjugateGradientMultiShift k=5195 Shift 2 has converged +Grid : Message : 1599.543760 s : ConjugateGradientMultiShift k=6508 Shift 1 has converged +Grid : Message : 1625.368198 s : ConjugateGradientMultiShift k=7819 Shift 0 has converged + + +dS is much bigger. + + +MobiusForce.223606 +Grid : Message : 1123.276405 s : ConjugateGradientMultiShift k=3273 Shift 0 has converged +Grid : Message : 1125.945359 s : ConjugateGradientMultiShift k=3407 Shift 1 has converged +Grid : Message : 1127.896580 s : ConjugateGradientMultiShift k=3508 Shift 2 has converged <-- 2 takes longer +first (bdy) hasenbusch mass raised to 0.005 -- reduces Dirchlet solve cost +Force looks ok still +Grid : Message : 1510.884960 s : OneFlavourEvenOddRatioRationalPseudoFermionAction compute action: complete +Grid : Message : 1510.969380 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +Grid : Message : 1510.969440 s : S1 : 764404436.37475 +Grid : Message : 1510.969480 s : S2 : 764404436.17379 +Grid : Message : 1510.969500 s : dS : -0.20095825195312 +Grid : Message : 1510.969520 s : dSpred : -0.20025674631954 +Grid : Message : 1510.969530 s : diff : -0.00070150563358654 +Force 76 S {S {S {(24.161229317675,2.0147973173094e-35)}}} +Force 77 S {S {S {(15.841085162729,3.983456481349e-36)}}} +Force 78 S {S {S {(11.031761776856,9.0394046210295e-35)}}} +Force 79 S {S {S {(12.177830066719,1.583978637733e-36)}}} +Force 80 S {S {S {(9.8372072482222,6.4284847310594e-37)}}} +Force 81 S {S {S {(9.6588863493149,1.0501572656659e-35)}}} +Force 82 S {S {S {(10.623076227724,-4.4161853392455e-35)}}} +Force 83 S {S {S {(8.9477003784221,-7.067659784319e-37)}}} +Force 84 S {S {S {(9.7663166497594,-2.1014900256825e-35)}}} +Force 85 S {S {S {(8.9992648919057,-4.7107936109203e-36)}}} +Force 86 S {S {S {(9.0399987268337,6.4652189295226e-37)}}} +Force 87 S {S {S {(9.1319052497073,7.9566273871284e-37)}}} +Force 88 S {S {S {(10.094569606113,-1.263656427134e-37)}}} +Force 89 S {S {S {(11.563679905523,-1.2777623593438e-35)}}} +Force 90 S {S {S {(13.653150474463,2.9093485182852e-37)}}} +Force 91 S {S {S {(16.303719912019,2.9857556510886e-36)}}} + +MobiusForce.223749 +first (bdy) hasenbusch mass raised to 0.01 -- reduces Dirchlet solve cost +Grid : Message : 1374.472462 s : OneFlavourEvenOddRatioRationalPseudoFermionAction compute action: complete +Grid : Message : 1374.479206 s : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +Grid : Message : 1374.479211 s : S1 : 764404436.37428 +Grid : Message : 1374.479215 s : S2 : 764404436.20009 +Grid : Message : 1374.479217 s : dS : -0.17418932914734 +Grid : Message : 1374.479219 s : dSpred : -0.17358090105485 +Grid : Message : 1374.479220 s : diff : -0.00060842809248995 +Force 76 S {S {S {(27.006858541753,4.2141472476979e-36)}}} +Force 77 S {S {S {(19.388701462694,-5.1620365048422e-35)}}} +Force 78 S {S {S {(13.502424539662,-2.4038859474316e-35)}}} +Force 79 S {S {S {(15.555776987064,6.0567346426118e-36)}}} +Force 80 S {S {S {(12.752116522904,-2.3720006631655e-35)}}} +Force 81 S {S {S {(12.656857824233,1.6912424972456e-35)}}} +Force 82 S {S {S {(15.159284452724,5.0898905390605e-36)}}} +Force 83 S {S {S {(12.222695136014,-2.2061824913027e-35)}}} +Force 84 S {S {S {(12.92077598466,9.6287681011731e-36)}}} +Force 85 S {S {S {(11.884630495484,2.822655809912e-36)}}} +Force 86 S {S {S {(11.896353116174,1.0926219990893e-35)}}} +Force 87 S {S {S {(11.557019282287,2.1532117771187e-35)}}} +Force 88 S {S {S {(11.945108384613,-3.0210204816133e-36)}}} +Force 89 S {S {S {(13.295373801078,7.3115748621146e-36)}}} +Force 90 S {S {S {(15.373728471417,-7.4923071185536e-36)}}} +Force 91 S {S {S {(17.348173714234,1.0344350287236e-36)}}} + +MobiusForce.223829 + 1.0e-5,5.0e-6,1.0e-6,1.0e-7, // soften convergence more more +Grid : Message : 1000.951387 s : ConjugateGradientMultiShift k=1881 Shift 0 has converged +Grid : Message : 1002.619542 s : ConjugateGradientMultiShift k=1960 Shift 1 has converged +Grid : Message : 1003.726982 s : ConjugateGradientMultiShift k=2014 Shift 4 has converged +Grid : Message : 1005.698741 s : ConjugateGradientMultiShift k=2113 Shift 2 has converged +Grid : Message : 1007.320875 s : ConjugateGradientMultiShift k=2197 Shift 3 has converged +Grid : Message : 1351.171259 s : S1 : 764404436.37428 +Grid : Message : 1351.171263 s : S2 : 764404436.20009 +Grid : Message : 1351.171265 s : dS : -0.17418932914734 +Grid : Message : 1351.171266 s : dSpred : -0.1743248065338 +Grid : Message : 1351.171267 s : diff : 0.00013547738646566 +Force 76 S {S {S {(27.004288088317,6.035575744297e-35)}}} +Force 77 S {S {S {(19.388023720604,-6.9736202362532e-36)}}} +Force 78 S {S {S {(13.502663916173,6.4067380855692e-35)}}} +Force 79 S {S {S {(15.55135748152,1.7219522871608e-35)}}} +Force 80 S {S {S {(12.75135802213,-1.1303847551095e-35)}}} +Force 81 S {S {S {(12.655732786276,1.689773129307e-36)}}} +Force 82 S {S {S {(15.158469055699,-6.7205950772387e-35)}}} +Force 83 S {S {S {(12.222907191126,-1.6775773754173e-35)}}} +Force 84 S {S {S {(12.916025368247,-1.9641041234302e-35)}}} +Force 85 S {S {S {(11.881879452577,-2.3054382955502e-36)}}} +Force 86 S {S {S {(11.897253557199,-3.3617669065579e-35)}}} +Force 87 S {S {S {(11.55717723524,-1.8690360178074e-36)}}} +Force 88 S {S {S {(11.945590605851,-6.7208889508264e-36)}}} +Force 89 S {S {S {(13.298173932749,-1.0322309768158e-35)}}} +Force 90 S {S {S {(15.373845416836,7.4158999857501e-36)}}} +Force 91 S {S {S {(17.348058307158,-1.8514036025451e-36)}}} +-- could make the stopping condition mandatory if shift 0 is converged. +-- Save 20% of iterations and single tunable +*/ + +// +/************************************************************************************* + + Grid physics library, www.github.com/paboyle/Grid + + Source file: ./tests/Test_double_ratio.cc + + Copyright (C) 2022 + +Author: Peter Boyle + + 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 + +using namespace std; +using namespace Grid; + +typedef MobiusFermionD FermionAction; +typedef WilsonImplD FimplD; +typedef WilsonImplD FermionImplPolicy; + +template +void ForceTest(Action &action,LatticeGaugeField & U,MomentumFilterBase &Filter) +{ + GridBase *UGrid = U.Grid(); + + std::vector seeds({1,2,3,5}); + GridSerialRNG sRNG; sRNG.SeedFixedIntegers(seeds); + GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds); + + LatticeColourMatrix Pmu(UGrid); + LatticeGaugeField P(UGrid); + LatticeGaugeField UdSdU(UGrid); + + std::cout << GridLogMessage << "*********************************************************"<(UdSdU,mu); + Pmu= PeekIndex(P,mu); + dS = dS - trace(Pmu*UdSdUmu)*eps*2.0*2.0; + } + ComplexD dSpred = sum(dS); + RealD diff = S2-S1-dSpred.real(); + + std::cout<< GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<1 ? 1 : 0; + + Coordinate NonDirichlet(Nd+1,0); + Coordinate Dirichlet(Nd+1,0); + Dirichlet[1] = CommDim[0]*latt_size[0]/mpi_layout[0] * shm[0]; + Dirichlet[2] = CommDim[1]*latt_size[1]/mpi_layout[1] * shm[1]; + Dirichlet[3] = CommDim[2]*latt_size[2]/mpi_layout[2] * shm[2]; + Dirichlet[4] = CommDim[3]*latt_size[3]/mpi_layout[3] * shm[3]; + + Coordinate Block4(Nd); + Block4[0] = Dirichlet[1]; + Block4[1] = Dirichlet[2]; + Block4[2] = Dirichlet[3]; + Block4[3] = Dirichlet[4]; + + std::vector boundary = {1,1,1,-1}; + FermionAction::ImplParams Params(boundary); + FermionAction::ImplParams ParamsDir(boundary); + Params.dirichlet=NonDirichlet; + ParamsDir.dirichlet=Dirichlet; + ParamsDir.partialDirichlet=1; + + ///////////////////// Gauge Field and Gauge Forces //////////////////////////// + LatticeGaugeField U(UGrid); + + RealD beta=6.0; + WilsonGaugeActionR PlaqAction(beta); + IwasakiGaugeActionR RectAction(beta); + + MomentumFilterNone FilterNone; + ForceTest(PlaqAction,U,FilterNone); + ForceTest(RectAction,U,FilterNone); + + //////////////////////////////////// + // Action + //////////////////////////////////// + RealD mass=0.00078; + RealD dmass=0.01; + RealD pvmass=1.0; + RealD M5=1.8; + RealD b=1.5; + RealD c=0.5; + + // Double versions + FermionAction DdwfPeriodic(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,Params); + FermionAction PVPeriodic (U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,pvmass,M5,b,c,Params); + FermionAction DdwfDirichlet(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,dmass,M5,b,c,ParamsDir); + + double StoppingCondition = 1.0e-8; + double MaxCGIterations = 50000; + ConjugateGradient CG(StoppingCondition,MaxCGIterations); + + //////////////////// Two Flavour Determinant Ratio /////////////////////////////// + TwoFlavourRatioPseudoFermionAction Nf2(PVPeriodic, DdwfPeriodic,CG,CG); + // ForceTest(Nf2,U,FilterNone); + + //////////////////// Two Flavour Determinant force test Even Odd /////////////////////////////// + TwoFlavourEvenOddRatioPseudoFermionAction Nf2eo(PVPeriodic, DdwfPeriodic,CG,CG); + // ForceTest(Nf2eo,U,FilterNone); + + //////////////////// Domain forces //////////////////// + int Width=4; + DDHMCFilter DDHMCFilter(Block4,Width); + + //////////////////// Two flavour boundary det //////////////////// + TwoFlavourRatioPseudoFermionAction BdyNf2(DdwfDirichlet, DdwfPeriodic,CG,CG); + // ForceTest(BdyNf2,U,DDHMCFilter); + + //////////////////// Two flavour eo boundary det //////////////////// + TwoFlavourEvenOddRatioPseudoFermionAction BdyNf2eo(DdwfDirichlet, DdwfPeriodic,CG,CG); + // ForceTest(BdyNf2eo,U,DDHMCFilter); + + //////////////////// One flavour boundary det //////////////////// + OneFlavourRationalParams OFRp; // Up/down + OFRp.lo = 4.0e-5; + OFRp.hi = 90.0; + OFRp.MaxIter = 60000; + OFRp.tolerance= 1.0e-9; + OFRp.mdtolerance= 1.0e-8; + OFRp.degree = 18; + OFRp.precision= 80; + OFRp.BoundsCheckFreq=0; + std::vector ActionTolByPole({ + 1.0e-8,1.0e-8,1.0e-8,1.0e-8, + 1.0e-8,1.0e-8,1.0e-8,1.0e-8, + 1.0e-8,1.0e-8,1.0e-8,1.0e-8, + 1.0e-8,1.0e-8,1.0e-8,1.0e-8, + 1.0e-8,1.0e-8 + }); + std::vector MDTolByPole({ + 1.0e-5,5.0e-6,1.0e-6,1.0e-7, // soften convergence more more + // 3.0e-6,1.0e-6,1.0e-7,1.0e-7, // soften convergence more + // 1.0e-6,3.0e-7,1.0e-7,1.0e-7, // Orig sloppy + // 1.0e-8,1.0e-8,1.0e-8,1.0e-8, + 1.0e-8,1.0e-8,1.0e-8,1.0e-8, + 1.0e-8,1.0e-8,1.0e-8,1.0e-8, + 1.0e-8,1.0e-8,1.0e-8,1.0e-8, + 1.0e-8,1.0e-8 + }); + OneFlavourEvenOddRatioRationalPseudoFermionAction BdySqrt(DdwfDirichlet,DdwfPeriodic,OFRp); + BdySqrt.SetTolerances(ActionTolByPole,MDTolByPole); + ForceTest(BdySqrt,U,DDHMCFilter); + + Grid_finalize(); +} diff --git a/tests/forces/Test_dwf_force.cc b/tests/forces/Test_dwf_force.cc index e7d17347..1ae28bb2 100644 --- a/tests/forces/Test_dwf_force.cc +++ b/tests/forces/Test_dwf_force.cc @@ -67,7 +67,7 @@ int main (int argc, char ** argv) //////////////////////////////////// RealD mass=0.01; RealD M5=1.8; - DomainWallFermionR Ddwf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); + DomainWallFermionD Ddwf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); Ddwf.M (phi,Mphi); ComplexD S = innerProduct(Mphi,Mphi); // pdag MdagM p diff --git a/tests/forces/Test_dwf_force_eofa.cc b/tests/forces/Test_dwf_force_eofa.cc index 525178d0..d820573b 100644 --- a/tests/forces/Test_dwf_force_eofa.cc +++ b/tests/forces/Test_dwf_force_eofa.cc @@ -80,8 +80,8 @@ int main (int argc, char** argv) RealD mf = 0.01; RealD mb = 1.0; RealD M5 = 1.8; - DomainWallEOFAFermionR Lop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, 0.0, -1, M5); - DomainWallEOFAFermionR Rop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, -1.0, 1, M5); + DomainWallEOFAFermionD Lop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, 0.0, -1, M5); + DomainWallEOFAFermionD Rop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, -1.0, 1, M5); OneFlavourRationalParams Params(0.95, 100.0, 5000, 1.0e-12, 12); ConjugateGradient CG(1.0e-12, 5000); ExactOneFlavourRatioPseudoFermionAction Meofa(Lop, Rop, CG, CG, CG, CG, CG, Params, true); diff --git a/tests/forces/Test_dwf_gpforce.cc b/tests/forces/Test_dwf_gpforce.cc index 9db2c563..72d30369 100644 --- a/tests/forces/Test_dwf_gpforce.cc +++ b/tests/forces/Test_dwf_gpforce.cc @@ -47,7 +47,7 @@ int main (int argc, char ** argv) GridCartesian * FGrid = SpaceTimeGrid::makeFiveDimGrid(Ls,UGrid); GridRedBlackCartesian * FrbGrid = SpaceTimeGrid::makeFiveDimRedBlackGrid(Ls,UGrid); - typedef typename GparityDomainWallFermionR::FermionField FermionField; + typedef typename GparityDomainWallFermionD::FermionField FermionField; int threads = GridThread::GetThreads(); std::cout< twists(Nd,0); twists[nu] = 1; twists[Nd-1] = 1; //antiperiodic in time - GparityDomainWallFermionR::ImplParams params; + GparityDomainWallFermionD::ImplParams params; params.twists = twists; - GparityDomainWallFermionR Dw(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,params); + GparityDomainWallFermionD Dw(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,params); Dw.M (phi,Mphi); diff --git a/tests/forces/Test_dwf_gpforce_eofa.cc b/tests/forces/Test_dwf_gpforce_eofa.cc index fd47d33c..08923faa 100644 --- a/tests/forces/Test_dwf_gpforce_eofa.cc +++ b/tests/forces/Test_dwf_gpforce_eofa.cc @@ -33,7 +33,7 @@ using namespace std; using namespace Grid; typedef GparityWilsonImplR FermionImplPolicy; -typedef GparityDomainWallEOFAFermionR FermionAction; +typedef GparityDomainWallEOFAFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; int main (int argc, char** argv) diff --git a/tests/forces/Test_gpdwf_force.cc b/tests/forces/Test_gpdwf_force.cc index af1ce82b..58dbfc47 100644 --- a/tests/forces/Test_gpdwf_force.cc +++ b/tests/forces/Test_gpdwf_force.cc @@ -56,7 +56,7 @@ int main (int argc, char ** argv) int threads = GridThread::GetThreads(); std::cout< twists(Nd,0); twists[nu] = 1; twists[3] = 1; - GparityDomainWallFermionR::ImplParams params; params.twists = twists; - GparityDomainWallFermionR Ddwf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,params); + GparityDomainWallFermionD::ImplParams params; params.twists = twists; + GparityDomainWallFermionD Ddwf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,params); Ddwf.M (phi,Mphi); ComplexD S = innerProduct(Mphi,Mphi); // pdag MdagM p diff --git a/tests/forces/Test_gpdwf_force_1f_2f.cc b/tests/forces/Test_gpdwf_force_1f_2f.cc index 7e14eb08..c343b7ac 100644 --- a/tests/forces/Test_gpdwf_force_1f_2f.cc +++ b/tests/forces/Test_gpdwf_force_1f_2f.cc @@ -70,8 +70,8 @@ void convertFermion1f_from_2f(FermionField1f &out_1f, const FermionField2f &in_2 int nuoff = is_4d ? 0 : 1; //s in 0 direction - int L_2f = FGrid_2f->FullDimensions()[nu+nuoff]; - int L_1f = FGrid_1f->FullDimensions()[nu+nuoff]; + Integer L_2f = FGrid_2f->FullDimensions()[nu+nuoff]; + Integer L_1f = FGrid_1f->FullDimensions()[nu+nuoff]; assert(L_1f == 2 * L_2f); auto in_f0_2fgrid = PeekIndex(in_2f,0); //flavor 0 on 2f Grid diff --git a/tests/forces/Test_gpwilson_force.cc b/tests/forces/Test_gpwilson_force.cc index 7ab2ddeb..4c3380fe 100644 --- a/tests/forces/Test_gpwilson_force.cc +++ b/tests/forces/Test_gpwilson_force.cc @@ -50,7 +50,7 @@ int main (int argc, char ** argv) int threads = GridThread::GetThreads(); std::cout< twists(Nd,0); twists[nu] = 1; twists[3]=1; - GparityWilsonFermionR::ImplParams params; params.twists = twists; - GparityWilsonFermionR Wil(U,*UGrid,*UrbGrid,mass,params); + GparityWilsonFermionD::ImplParams params; params.twists = twists; + GparityWilsonFermionD Wil(U,*UGrid,*UrbGrid,mass,params); Wil.M (phi,Mphi); ComplexD S = innerProduct(Mphi,Mphi); // pdag MdagM p diff --git a/tests/forces/Test_mobius_force.cc b/tests/forces/Test_mobius_force.cc index d2326a81..3518007c 100644 --- a/tests/forces/Test_mobius_force.cc +++ b/tests/forces/Test_mobius_force.cc @@ -76,7 +76,7 @@ int main (int argc, char ** argv) p.boundary_phases[2] = 1.0; p.boundary_phases[3] =- 1.0; - MobiusFermionR Ddwf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,p); + MobiusFermionD Ddwf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,b,c,p); Ddwf.M (phi,Mphi); ComplexD S = innerProduct(Mphi,Mphi); // pdag MdagM p diff --git a/tests/forces/Test_mobius_force_eofa.cc b/tests/forces/Test_mobius_force_eofa.cc index 1d25771a..a8871faa 100644 --- a/tests/forces/Test_mobius_force_eofa.cc +++ b/tests/forces/Test_mobius_force_eofa.cc @@ -82,8 +82,8 @@ int main (int argc, char** argv) RealD mf = 0.01; RealD mb = 1.0; RealD M5 = 1.8; - MobiusEOFAFermionR Lop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, 0.0, -1, M5, b, c); - MobiusEOFAFermionR Rop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, -1.0, 1, M5, b, c); + MobiusEOFAFermionD Lop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, 0.0, -1, M5, b, c); + MobiusEOFAFermionD Rop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, -1.0, 1, M5, b, c); OneFlavourRationalParams Params(0.95, 100.0, 5000, 1.0e-12, 12); ConjugateGradient CG(1.0e-12, 5000); ExactOneFlavourRatioPseudoFermionAction Meofa(Lop, Rop, CG, CG, CG, CG, CG, Params, false); diff --git a/tests/forces/Test_mobius_gpforce_eofa.cc b/tests/forces/Test_mobius_gpforce_eofa.cc index 7f114615..dd71b565 100644 --- a/tests/forces/Test_mobius_gpforce_eofa.cc +++ b/tests/forces/Test_mobius_gpforce_eofa.cc @@ -34,7 +34,7 @@ using namespace Grid; ; typedef GparityWilsonImplR FermionImplPolicy; -typedef GparityMobiusEOFAFermionR FermionAction; +typedef GparityMobiusEOFAFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; int main (int argc, char** argv) diff --git a/tests/forces/Test_partfrac_force.cc b/tests/forces/Test_partfrac_force.cc index 33f7b5fd..173f7626 100644 --- a/tests/forces/Test_partfrac_force.cc +++ b/tests/forces/Test_partfrac_force.cc @@ -69,7 +69,7 @@ int main (int argc, char ** argv) //////////////////////////////////// RealD mass=0.01; RealD M5=1.8; - OverlapWilsonPartialFractionTanhFermionR Dpf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0); + OverlapWilsonPartialFractionTanhFermionD Dpf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0); Dpf.M (phi,Mphi); ComplexD S = innerProduct(Mphi,Mphi); // pdag MdagM p diff --git a/tests/forces/Test_wilson_force.cc b/tests/forces/Test_wilson_force.cc index b7bf1268..f4bf8ed3 100644 --- a/tests/forces/Test_wilson_force.cc +++ b/tests/forces/Test_wilson_force.cc @@ -67,7 +67,7 @@ int main (int argc, char ** argv) // Unmodified matrix element //////////////////////////////////// RealD mass=-4.0; //kills the diagonal term - WilsonFermionR Dw (U, Grid,RBGrid,mass); + WilsonFermionD Dw (U, Grid,RBGrid,mass); Dw.M (phi,Mphi); ComplexD S = innerProduct(Mphi,Mphi); // pdag MdagM p diff --git a/tests/forces/Test_wilsonclover_force.cc b/tests/forces/Test_wilsonclover_force.cc index 6a28e4e2..8aa5eb9d 100644 --- a/tests/forces/Test_wilsonclover_force.cc +++ b/tests/forces/Test_wilsonclover_force.cc @@ -70,7 +70,7 @@ int main(int argc, char **argv) //////////////////////////////////// RealD mass = 0.1; Real csw = 1.0; - WilsonCloverFermionR Dw(U, Grid, RBGrid, mass, csw, csw); + WilsonCloverFermionD Dw(U, Grid, RBGrid, mass, csw, csw); Dw.ImportGauge(U); Dw.M(phi, Mphi); ComplexD S = innerProduct(Mphi, Mphi); // Action : pdag MdagM p diff --git a/tests/forces/Test_zmobius_force.cc b/tests/forces/Test_zmobius_force.cc index 89673bc7..5d3a86f4 100644 --- a/tests/forces/Test_zmobius_force.cc +++ b/tests/forces/Test_zmobius_force.cc @@ -81,7 +81,7 @@ int main (int argc, char ** argv) omegas.push_back( std::complex(0.0686324988446592,0.0550658530827402) ); omegas.push_back( std::complex(0.0686324988446592,-0.0550658530827402) ); - ZMobiusFermionR Ddwf(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, omegas,b,c); + ZMobiusFermionD Ddwf(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, omegas,b,c); Ddwf.M (phi,Mphi); diff --git a/tests/hmc/Test_action_dwf_gparity2fvs1f.cc b/tests/hmc/Test_action_dwf_gparity2fvs1f.cc index 830bcead..46f87d93 100644 --- a/tests/hmc/Test_action_dwf_gparity2fvs1f.cc +++ b/tests/hmc/Test_action_dwf_gparity2fvs1f.cc @@ -59,7 +59,7 @@ void copy2fTo1fFermionField(FermionField1f &out, const FermionField2f &in, int g LatticeInteger xcoor_1f(out.Grid()); //5d lattice integer LatticeCoordinate(xcoor_1f,gpdir); - int L = dim_2f[gpdir]; + Integer L = dim_2f[gpdir]; out = where(xcoor_1f < L, f0_fullgrid_dbl, f1_fullgrid_dbl); } @@ -76,7 +76,7 @@ void copy2fTo1fGaugeField(LatticeGaugeField &out, const LatticeGaugeField &in, i LatticeInteger xcoor_1f(out.Grid()); LatticeCoordinate(xcoor_1f,gpdir); - int L = dim_2f[gpdir]; + Integer L = dim_2f[gpdir]; out = where(xcoor_1f < L, U_dbl, Uconj_dbl); } @@ -140,11 +140,11 @@ int main(int argc, char **argv) { copy2fTo1fGaugeField(Umu_1f, Umu_2f, mu); typedef GparityWilsonImplR FermionImplPolicy2f; - typedef GparityDomainWallFermionR FermionAction2f; + typedef GparityDomainWallFermionD FermionAction2f; typedef typename FermionAction2f::FermionField FermionField2f; typedef WilsonImplR FermionImplPolicy1f; - typedef DomainWallFermionR FermionAction1f; + typedef DomainWallFermionD FermionAction1f; typedef typename FermionAction1f::FermionField FermionField1f; std::cout << "Generating eta 2f" << std::endl; diff --git a/tests/hmc/Test_hmc_EODWFRatio.cc b/tests/hmc/Test_hmc_EODWFRatio.cc index 93469ffe..ff8521cb 100644 --- a/tests/hmc/Test_hmc_EODWFRatio.cc +++ b/tests/hmc/Test_hmc_EODWFRatio.cc @@ -43,7 +43,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef GenericHMCRunner HMCWrapper; // Uses the default minimum norm typedef WilsonImplR FermionImplPolicy; - typedef DomainWallFermionR FermionAction; + typedef DomainWallFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; @@ -136,16 +136,9 @@ int main(int argc, char **argv) { TheHMC.ReadCommandLine(argc, argv); // these can be parameters from file // Reset performance counters - NumOp.ZeroCounters(); - DenOp.ZeroCounters(); TheHMC.Run(); // no smearing // TheHMC.Run(SmearingPolicy); // for smearing - std::cout << GridLogMessage << "Numerator report, Pauli-Villars term : " << std::endl; - NumOp.Report(); - std::cout << GridLogMessage << "Denominator report, Dw(m) term (includes CG) : " << std::endl; - DenOp.Report(); - Grid_finalize(); } // main diff --git a/tests/hmc/Test_hmc_EODWFRatio_Gparity.cc b/tests/hmc/Test_hmc_EODWFRatio_Gparity.cc index 9ca0b0a0..f98d0edc 100644 --- a/tests/hmc/Test_hmc_EODWFRatio_Gparity.cc +++ b/tests/hmc/Test_hmc_EODWFRatio_Gparity.cc @@ -42,7 +42,7 @@ int main(int argc, char **argv) { typedef ConjugateHMCRunner HMCWrapper; // Uses the default minimum norm typedef GparityWilsonImplR FermionImplPolicy; - typedef GparityDomainWallFermionR FermionAction; + typedef GparityDomainWallFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; @@ -132,15 +132,9 @@ int main(int argc, char **argv) { TheHMC.ReadCommandLine(argc, argv); // these can be parameters from file // Reset performance counters - NumOp.ZeroCounters(); - DenOp.ZeroCounters(); TheHMC.Run(); // no smearing // TheHMC.Run(SmearingPolicy); // for smearing - std::cout << GridLogMessage << "Numerator report, Pauli-Villars term : " << std::endl; - NumOp.Report(); - std::cout << GridLogMessage << "Denominator report, Dw(m) term (includes CG) : " << std::endl; - DenOp.Report(); Grid_finalize(); diff --git a/tests/hmc/Test_hmc_EOMobiusRatio.cc b/tests/hmc/Test_hmc_EOMobiusRatio.cc index 63b4d4fa..0e0a6611 100644 --- a/tests/hmc/Test_hmc_EOMobiusRatio.cc +++ b/tests/hmc/Test_hmc_EOMobiusRatio.cc @@ -83,7 +83,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef GenericHMCRunner HMCWrapper; // Uses the default minimum norm typedef WilsonImplR FermionImplPolicy; - typedef MobiusFermionR FermionAction; + typedef MobiusFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; // Serialiser typedef Grid::XmlReader Serialiser; @@ -211,8 +211,6 @@ int main(int argc, char **argv) { */ // Reset performance counters - NumOp.ZeroCounters(); - DenOp.ZeroCounters(); if (ApplySmearing){ SmearingParameters SmPar(Reader); @@ -225,11 +223,6 @@ int main(int argc, char **argv) { TheHMC.Run(); // no smearing } - std::cout << GridLogMessage << "Numerator report, Pauli-Villars term : " << std::endl; - NumOp.Report(); - std::cout << GridLogMessage << "Denominator report, Dw(m) term (includes CG) : " << std::endl; - DenOp.Report(); - Grid_finalize(); } // main diff --git a/tests/hmc/Test_hmc_EOMobiusRatioManyFlavour.cc b/tests/hmc/Test_hmc_EOMobiusRatioManyFlavour.cc index 790433f2..3f29ae62 100644 --- a/tests/hmc/Test_hmc_EOMobiusRatioManyFlavour.cc +++ b/tests/hmc/Test_hmc_EOMobiusRatioManyFlavour.cc @@ -89,7 +89,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef GenericHMCRunner HMCWrapper; // Uses the default minimum norm typedef WilsonImplR FermionImplPolicy; - typedef MobiusFermionR FermionAction; + typedef MobiusFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; // Serialiser typedef Grid::XmlReader Serialiser; @@ -226,8 +226,6 @@ int main(int argc, char **argv) { */ // Reset performance counters - NumOp.ZeroCounters(); - DenOp.ZeroCounters(); if (ApplySmearing){ SmearingParameters SmPar(Reader); @@ -240,10 +238,6 @@ int main(int argc, char **argv) { TheHMC.Run(); // no smearing } - std::cout << GridLogMessage << "Numerator report, Pauli-Villars term : " << std::endl; - NumOp.Report(); - std::cout << GridLogMessage << "Denominator report, Dw(m) term (includes CG) : " << std::endl; - DenOp.Report(); Grid_finalize(); } // main diff --git a/tests/hmc/Test_hmc_EOWilsonCloverFermionGauge.cc b/tests/hmc/Test_hmc_EOWilsonCloverFermionGauge.cc index 6b9b70b5..f6485f20 100644 --- a/tests/hmc/Test_hmc_EOWilsonCloverFermionGauge.cc +++ b/tests/hmc/Test_hmc_EOWilsonCloverFermionGauge.cc @@ -39,7 +39,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef GenericHMCRunner HMCWrapper; // Uses the default minimum norm typedef WilsonImplR FermionImplPolicy; - typedef WilsonCloverFermionR FermionAction; + typedef WilsonCloverFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; diff --git a/tests/hmc/Test_hmc_EOWilsonFermionGauge.cc b/tests/hmc/Test_hmc_EOWilsonFermionGauge.cc index 3643c0ad..092e66d1 100644 --- a/tests/hmc/Test_hmc_EOWilsonFermionGauge.cc +++ b/tests/hmc/Test_hmc_EOWilsonFermionGauge.cc @@ -40,7 +40,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef GenericHMCRunner HMCWrapper; // Uses the default minimum norm typedef WilsonImplR FermionImplPolicy; - typedef WilsonFermionR FermionAction; + typedef WilsonFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; diff --git a/tests/hmc/Test_hmc_EOWilsonRatio.cc b/tests/hmc/Test_hmc_EOWilsonRatio.cc index 675bc605..406aa34d 100644 --- a/tests/hmc/Test_hmc_EOWilsonRatio.cc +++ b/tests/hmc/Test_hmc_EOWilsonRatio.cc @@ -42,7 +42,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef GenericHMCRunner HMCWrapper; // Uses the default minimum norm typedef WilsonImplR FermionImplPolicy; - typedef WilsonFermionR FermionAction; + typedef WilsonFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; diff --git a/tests/hmc/Test_hmc_GparityIwasakiGauge.cc b/tests/hmc/Test_hmc_GparityIwasakiGauge.cc index d4bfa0a5..d79404a0 100644 --- a/tests/hmc/Test_hmc_GparityIwasakiGauge.cc +++ b/tests/hmc/Test_hmc_GparityIwasakiGauge.cc @@ -41,7 +41,7 @@ int main(int argc, char **argv) { typedef ConjugateHMCRunner HMCWrapper; // Uses the default minimum norm typedef GparityWilsonImplR FermionImplPolicy; - typedef GparityDomainWallFermionR FermionAction; + typedef GparityDomainWallFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; diff --git a/tests/hmc/Test_hmc_GparityWilsonGauge.cc b/tests/hmc/Test_hmc_GparityWilsonGauge.cc index b8c078fe..76901235 100644 --- a/tests/hmc/Test_hmc_GparityWilsonGauge.cc +++ b/tests/hmc/Test_hmc_GparityWilsonGauge.cc @@ -42,7 +42,7 @@ int main(int argc, char **argv) { typedef ConjugateHMCRunner HMCWrapper; // Uses the default minimum norm typedef GparityWilsonImplR FermionImplPolicy; - typedef GparityDomainWallFermionR FermionAction; + typedef GparityDomainWallFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; diff --git a/tests/hmc/Test_hmc_Mobius2p1f.cc b/tests/hmc/Test_hmc_Mobius2p1f.cc index 508f5b5e..8c97fbb5 100644 --- a/tests/hmc/Test_hmc_Mobius2p1f.cc +++ b/tests/hmc/Test_hmc_Mobius2p1f.cc @@ -39,7 +39,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef WilsonImplR FermionImplPolicy; - typedef MobiusFermionR FermionAction; + typedef MobiusFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; typedef Grid::XmlReader Serialiser; @@ -148,14 +148,14 @@ int main(int argc, char **argv) { // Level1.push_back(&StrangePseudoFermion); // DJM: setup for EOFA ratio (Shamir) - // DomainWallEOFAFermionR Strange_Op_L(U, *FGrid, *FrbGrid, *GridPtr, *GridRBPtr, strange_mass, strange_mass, pv_mass, 0.0, -1, M5); - // DomainWallEOFAFermionR Strange_Op_R(U, *FGrid, *FrbGrid, *GridPtr, *GridRBPtr, pv_mass, strange_mass, pv_mass, -1.0, 1, M5); + // DomainWallEOFAFermionD Strange_Op_L(U, *FGrid, *FrbGrid, *GridPtr, *GridRBPtr, strange_mass, strange_mass, pv_mass, 0.0, -1, M5); + // DomainWallEOFAFermionD Strange_Op_R(U, *FGrid, *FrbGrid, *GridPtr, *GridRBPtr, pv_mass, strange_mass, pv_mass, -1.0, 1, M5); // ExactOneFlavourRatioPseudoFermionAction EOFA(Strange_Op_L, Strange_Op_R, CG, OFRp, true); // Level1.push_back(&EOFA); // DJM: setup for EOFA ratio (Mobius) - MobiusEOFAFermionR Strange_Op_L(U, *FGrid, *FrbGrid, *GridPtr, *GridRBPtr, strange_mass, strange_mass, pv_mass, 0.0, -1, M5, b, c); - MobiusEOFAFermionR Strange_Op_R(U, *FGrid, *FrbGrid, *GridPtr, *GridRBPtr, pv_mass, strange_mass, pv_mass, -1.0, 1, M5, b, c); + MobiusEOFAFermionD Strange_Op_L(U, *FGrid, *FrbGrid, *GridPtr, *GridRBPtr, strange_mass, strange_mass, pv_mass, 0.0, -1, M5, b, c); + MobiusEOFAFermionD Strange_Op_R(U, *FGrid, *FrbGrid, *GridPtr, *GridRBPtr, pv_mass, strange_mass, pv_mass, -1.0, 1, M5, b, c); ExactOneFlavourRatioPseudoFermionAction EOFA(Strange_Op_L, Strange_Op_R, CG, OFRp, true); Level1.push_back(&EOFA); diff --git a/tests/hmc/Test_hmc_ScalarActionNxN.cc b/tests/hmc/Test_hmc_ScalarActionNxN.cc index 726ecd4a..119a39dc 100644 --- a/tests/hmc/Test_hmc_ScalarActionNxN.cc +++ b/tests/hmc/Test_hmc_ScalarActionNxN.cc @@ -34,7 +34,7 @@ class ScalarActionParameters : Serializable { double, lambda, double, g); - ScalarActionParameters() = default; + ScalarActionParameters() {}; template ScalarActionParameters(Reader& Reader){ @@ -45,7 +45,6 @@ class ScalarActionParameters : Serializable { } using namespace Grid; - ; template class MagMeas : public HmcObservable { diff --git a/tests/hmc/Test_hmc_WC2ASFG_Production.cc b/tests/hmc/Test_hmc_WC2ASFG_Production.cc index 0bbf4ece..90f43ede 100644 --- a/tests/hmc/Test_hmc_WC2ASFG_Production.cc +++ b/tests/hmc/Test_hmc_WC2ASFG_Production.cc @@ -28,7 +28,7 @@ directory /* END LEGAL */ #include - +#ifdef ENABLE_FERMION_REPS namespace Grid{ struct FermionParameters: Serializable { GRID_SERIALIZABLE_CLASS_MEMBERS(FermionParameters, @@ -80,7 +80,7 @@ int main(int argc, char **argv) // Typedefs to simplify notation typedef GenericHMCRunnerHirep HMCWrapper; // Uses the default minimum norm typedef WilsonTwoIndexAntiSymmetricImplR FermionImplPolicy; // gauge field implemetation for the pseudofermions - typedef WilsonCloverTwoIndexAntiSymmetricFermionR FermionAction; // type of lattice fermions (Wilson, DW, ...) + typedef WilsonCloverTwoIndexAntiSymmetricFermionD FermionAction; // type of lattice fermions (Wilson, DW, ...) typedef typename FermionAction::FermionField FermionField; //typedef Grid::JSONReader Serialiser; typedef Grid::XmlReader Serialiser; @@ -210,4 +210,6 @@ int main(int argc, char **argv) Grid_finalize(); } // main - +#else +int main(int argc, char **argv){} +#endif diff --git a/tests/hmc/Test_hmc_WC2SFG_Production.cc b/tests/hmc/Test_hmc_WC2SFG_Production.cc index 64a3f1cb..16ca05a0 100644 --- a/tests/hmc/Test_hmc_WC2SFG_Production.cc +++ b/tests/hmc/Test_hmc_WC2SFG_Production.cc @@ -29,6 +29,7 @@ directory #include +#ifdef ENABLE_FERMION_REPS namespace Grid{ struct FermionParameters: Serializable { GRID_SERIALIZABLE_CLASS_MEMBERS(FermionParameters, @@ -81,7 +82,7 @@ int main(int argc, char **argv) // Typedefs to simplify notation typedef GenericHMCRunnerHirep HMCWrapper; // Uses the default minimum norm typedef WilsonTwoIndexSymmetricImplR FermionImplPolicy; // gauge field implemetation for the pseudofermions - typedef WilsonCloverTwoIndexSymmetricFermionR FermionAction; // type of lattice fermions (Wilson, DW, ...) + typedef WilsonCloverTwoIndexSymmetricFermionD FermionAction; // type of lattice fermions (Wilson, DW, ...) typedef typename FermionAction::FermionField FermionField; //typedef Grid::JSONReader Serialiser; typedef Grid::XmlReader Serialiser; @@ -211,3 +212,6 @@ int main(int argc, char **argv) Grid_finalize(); } // main +#else +int main(int argc, char **argv){} +#endif diff --git a/tests/hmc/Test_hmc_WCFG_Production.cc b/tests/hmc/Test_hmc_WCFG_Production.cc index cebe3791..bd02886d 100644 --- a/tests/hmc/Test_hmc_WCFG_Production.cc +++ b/tests/hmc/Test_hmc_WCFG_Production.cc @@ -79,7 +79,7 @@ int main(int argc, char **argv) // Typedefs to simplify notation typedef GenericHMCRunner HMCWrapper; // Uses the default minimum norm typedef WilsonImplR FermionImplPolicy; - typedef WilsonCloverFermionR FermionAction; + typedef WilsonCloverFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; typedef Grid::XmlReader Serialiser; diff --git a/tests/hmc/Test_hmc_WCMixedRepFG_Production.cc b/tests/hmc/Test_hmc_WCMixedRepFG_Production.cc index 211900be..3be63a15 100644 --- a/tests/hmc/Test_hmc_WCMixedRepFG_Production.cc +++ b/tests/hmc/Test_hmc_WCMixedRepFG_Production.cc @@ -32,6 +32,7 @@ directory #include "Grid/Grid.h" +#ifdef ENABLE_FERMION_REPS namespace Grid{ struct FermionParameters: Serializable { GRID_SERIALIZABLE_CLASS_MEMBERS(FermionParameters, @@ -84,11 +85,11 @@ int main(int argc, char **argv) { typedef GenericHMCRunnerHirep HMCWrapper; typedef WilsonImplR FundImplPolicy; - typedef WilsonCloverFermionR FundFermionAction; + typedef WilsonCloverFermionD FundFermionAction; typedef typename FundFermionAction::FermionField FundFermionField; typedef WilsonTwoIndexAntiSymmetricImplR ASymmImplPolicy; - typedef WilsonCloverTwoIndexAntiSymmetricFermionR ASymmFermionAction; + typedef WilsonCloverTwoIndexAntiSymmetricFermionD ASymmFermionAction; typedef typename ASymmFermionAction::FermionField ASymmFermionField; typedef Grid::XmlReader Serialiser; @@ -222,3 +223,6 @@ int main(int argc, char **argv) { Grid_finalize(); } // main +#else +int main(int argc, char **argv){} +#endif diff --git a/tests/hmc/Test_hmc_WCadjFG_Production.cc b/tests/hmc/Test_hmc_WCadjFG_Production.cc index 5cf4bac1..f0e2742d 100644 --- a/tests/hmc/Test_hmc_WCadjFG_Production.cc +++ b/tests/hmc/Test_hmc_WCadjFG_Production.cc @@ -29,6 +29,7 @@ directory #include +#ifdef ENABLE_FERMION_REPS namespace Grid{ struct FermionParameters: Serializable { GRID_SERIALIZABLE_CLASS_MEMBERS(FermionParameters, @@ -81,7 +82,7 @@ int main(int argc, char **argv) // Typedefs to simplify notation typedef GenericHMCRunnerHirep HMCWrapper; // Uses the default minimum norm typedef WilsonAdjImplR FermionImplPolicy; // gauge field implemetation for the pseudofermions - typedef WilsonCloverAdjFermionR FermionAction; // type of lattice fermions (Wilson, DW, ...) + typedef WilsonCloverAdjFermionD FermionAction; // type of lattice fermions (Wilson, DW, ...) typedef typename FermionAction::FermionField FermionField; typedef Grid::XmlReader Serialiser; @@ -211,3 +212,6 @@ int main(int argc, char **argv) } // main +#else +int main(int argc, char **argv){} +#endif diff --git a/tests/hmc/Test_hmc_WilsonAdjointFermionGauge.cc b/tests/hmc/Test_hmc_WilsonAdjointFermionGauge.cc index cc56cae3..3d601d25 100644 --- a/tests/hmc/Test_hmc_WilsonAdjointFermionGauge.cc +++ b/tests/hmc/Test_hmc_WilsonAdjointFermionGauge.cc @@ -31,9 +31,10 @@ directory /* END LEGAL */ #include "Grid/Grid.h" +#ifdef ENABLE_FERMION_REPS + int main(int argc, char **argv) { using namespace Grid; - ; // Here change the allowed (higher) representations typedef Representations< FundamentalRepresentation, AdjointRepresentation > TheRepresentations; @@ -46,7 +47,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef GenericHMCRunnerHirep HMCWrapper; typedef WilsonAdjImplR FermionImplPolicy; // gauge field implemetation for the pseudofermions - typedef WilsonAdjFermionR FermionAction; // type of lattice fermions (Wilson, DW, ...) + typedef WilsonAdjFermionD FermionAction; // type of lattice fermions (Wilson, DW, ...) typedef typename FermionAction::FermionField FermionField; //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -127,3 +128,6 @@ int main(int argc, char **argv) { } // main +#else +int main(int argc, char **argv){} +#endif diff --git a/tests/hmc/Test_hmc_WilsonCloverFermionGauge.cc b/tests/hmc/Test_hmc_WilsonCloverFermionGauge.cc index 9e27e3ec..149e6c5c 100644 --- a/tests/hmc/Test_hmc_WilsonCloverFermionGauge.cc +++ b/tests/hmc/Test_hmc_WilsonCloverFermionGauge.cc @@ -41,7 +41,7 @@ int main(int argc, char **argv) // Typedefs to simplify notation typedef GenericHMCRunner HMCWrapper; // Uses the default minimum norm typedef WilsonImplR FermionImplPolicy; - typedef WilsonCloverFermionR FermionAction; + typedef WilsonCloverFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: diff --git a/tests/hmc/Test_hmc_WilsonFermionGauge.cc b/tests/hmc/Test_hmc_WilsonFermionGauge.cc index cc1f2474..a0c43c51 100644 --- a/tests/hmc/Test_hmc_WilsonFermionGauge.cc +++ b/tests/hmc/Test_hmc_WilsonFermionGauge.cc @@ -42,7 +42,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef GenericHMCRunner HMCWrapper; // Uses the default minimum norm typedef WilsonImplR FermionImplPolicy; - typedef WilsonFermionR FermionAction; + typedef WilsonFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; diff --git a/tests/hmc/Test_hmc_WilsonGauge.cc b/tests/hmc/Test_hmc_WilsonGauge.cc index 4ef0e658..28feadf3 100644 --- a/tests/hmc/Test_hmc_WilsonGauge.cc +++ b/tests/hmc/Test_hmc_WilsonGauge.cc @@ -69,8 +69,10 @@ int main(int argc, char **argv) TopologyObsParameters TopParams; TopParams.interval = 5; TopParams.do_smearing = true; - TopParams.Smearing.steps = 200; - TopParams.Smearing.step_size = 0.01; + TopParams.Smearing.init_step_size = 0.01; + TopParams.Smearing.tolerance = 1e-5; + // TopParams.Smearing.steps = 200; + // TopParams.Smearing.step_size = 0.01; TopParams.Smearing.meas_interval = 50; TopParams.Smearing.maxTau = 2.0; TheHMC.Resources.AddObservable(TopParams); diff --git a/tests/hmc/Test_hmc_WilsonMixedRepresentationsFermionGauge.cc b/tests/hmc/Test_hmc_WilsonMixedRepresentationsFermionGauge.cc index 3b8cdda6..66a325f2 100644 --- a/tests/hmc/Test_hmc_WilsonMixedRepresentationsFermionGauge.cc +++ b/tests/hmc/Test_hmc_WilsonMixedRepresentationsFermionGauge.cc @@ -33,6 +33,7 @@ directory +#ifdef ENABLE_FERMION_REPS int main(int argc, char **argv) { #ifndef GRID_CUDA @@ -51,9 +52,9 @@ int main(int argc, char **argv) { typedef GenericHMCRunnerHirep HMCWrapper; typedef WilsonAdjImplR AdjImplPolicy; // gauge field implemetation for the pseudofermions - typedef WilsonAdjFermionR AdjFermionAction; // type of lattice fermions (Wilson, DW, ...) + typedef WilsonAdjFermionD AdjFermionAction; // type of lattice fermions (Wilson, DW, ...) typedef WilsonTwoIndexSymmetricImplR SymmImplPolicy; - typedef WilsonTwoIndexSymmetricFermionR SymmFermionAction; + typedef WilsonTwoIndexSymmetricFermionD SymmFermionAction; typedef typename AdjFermionAction::FermionField AdjFermionField; @@ -138,3 +139,6 @@ int main(int argc, char **argv) { } // main +#else +int main(int argc, char **argv){} +#endif diff --git a/tests/hmc/Test_hmc_WilsonRatio.cc b/tests/hmc/Test_hmc_WilsonRatio.cc index 3e3cac7e..e134dd83 100644 --- a/tests/hmc/Test_hmc_WilsonRatio.cc +++ b/tests/hmc/Test_hmc_WilsonRatio.cc @@ -41,7 +41,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef GenericHMCRunner HMCWrapper; // Uses the default minimum norm typedef WilsonImplR FermionImplPolicy; - typedef WilsonFermionR FermionAction; + typedef WilsonFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; diff --git a/tests/hmc/Test_hmc_WilsonTMFermionGauge.cc b/tests/hmc/Test_hmc_WilsonTMFermionGauge.cc index 5928efbe..9916580e 100644 --- a/tests/hmc/Test_hmc_WilsonTMFermionGauge.cc +++ b/tests/hmc/Test_hmc_WilsonTMFermionGauge.cc @@ -42,7 +42,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef GenericHMCRunner HMCWrapper; // Uses the default minimum norm typedef WilsonImplR FermionImplPolicy; - typedef WilsonTMFermionR FermionAction; + typedef WilsonTMFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; diff --git a/tests/hmc/Test_hmc_WilsonTwoIndexSymmetricFermionGauge.cc b/tests/hmc/Test_hmc_WilsonTwoIndexSymmetricFermionGauge.cc index 387842f7..4769e396 100644 --- a/tests/hmc/Test_hmc_WilsonTwoIndexSymmetricFermionGauge.cc +++ b/tests/hmc/Test_hmc_WilsonTwoIndexSymmetricFermionGauge.cc @@ -29,6 +29,7 @@ directory /* END LEGAL */ #include "Grid/Grid.h" +#ifdef ENABLE_FERMION_REPS int main(int argc, char **argv) { using namespace Grid; ; @@ -45,7 +46,7 @@ int main(int argc, char **argv) { typedef GenericHMCRunnerHirep HMCWrapper; typedef WilsonTwoIndexSymmetricImplR FermionImplPolicy; // gauge field implemetation for the pseudofermions - typedef WilsonTwoIndexSymmetricFermionR FermionAction; // type of lattice fermions (Wilson, DW, ...) + typedef WilsonTwoIndexSymmetricFermionD FermionAction; // type of lattice fermions (Wilson, DW, ...) typedef typename FermionAction::FermionField FermionField; //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -127,3 +128,6 @@ int main(int argc, char **argv) { } // main +#else +int main(int argc, char **argv){} +#endif diff --git a/tests/hmc/Test_rhmc_EOWilson1p1.cc b/tests/hmc/Test_rhmc_EOWilson1p1.cc index 51a966b1..1e0975ca 100644 --- a/tests/hmc/Test_rhmc_EOWilson1p1.cc +++ b/tests/hmc/Test_rhmc_EOWilson1p1.cc @@ -41,7 +41,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef GenericHMCRunner HMCWrapper; // Uses the default minimum norm typedef WilsonImplR FermionImplPolicy; - typedef WilsonFermionR FermionAction; + typedef WilsonFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; diff --git a/tests/hmc/Test_rhmc_EOWilsonRatio.cc b/tests/hmc/Test_rhmc_EOWilsonRatio.cc index 44fb6d47..06d54215 100644 --- a/tests/hmc/Test_rhmc_EOWilsonRatio.cc +++ b/tests/hmc/Test_rhmc_EOWilsonRatio.cc @@ -42,7 +42,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef GenericHMCRunner HMCWrapper; // Uses the default minimum norm typedef WilsonImplR FermionImplPolicy; - typedef WilsonFermionR FermionAction; + typedef WilsonFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; diff --git a/tests/hmc/Test_rhmc_Wilson1p1.cc b/tests/hmc/Test_rhmc_Wilson1p1.cc index 93b748d2..2935092c 100644 --- a/tests/hmc/Test_rhmc_Wilson1p1.cc +++ b/tests/hmc/Test_rhmc_Wilson1p1.cc @@ -42,7 +42,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef GenericHMCRunner HMCWrapper; // Uses the default minimum norm typedef WilsonImplR FermionImplPolicy; - typedef WilsonFermionR FermionAction; + typedef WilsonFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; diff --git a/tests/hmc/Test_rhmc_WilsonRatio.cc b/tests/hmc/Test_rhmc_WilsonRatio.cc index 4896d329..60bb7641 100644 --- a/tests/hmc/Test_rhmc_WilsonRatio.cc +++ b/tests/hmc/Test_rhmc_WilsonRatio.cc @@ -41,7 +41,7 @@ int main(int argc, char **argv) { // Typedefs to simplify notation typedef GenericHMCRunner HMCWrapper; // Uses the default minimum norm typedef WilsonImplR FermionImplPolicy; - typedef WilsonFermionR FermionAction; + typedef WilsonFermionD FermionAction; typedef typename FermionAction::FermionField FermionField; diff --git a/tests/lanczos/Test_WCMultiRep_lanczos.cc b/tests/lanczos/Test_WCMultiRep_lanczos.cc index 58759c96..0bfc75be 100644 --- a/tests/lanczos/Test_WCMultiRep_lanczos.cc +++ b/tests/lanczos/Test_WCMultiRep_lanczos.cc @@ -28,19 +28,21 @@ directory /* END LEGAL */ #include +#ifdef ENABLE_FERMION_REPS + using namespace std; using namespace Grid; -//typedef WilsonCloverFermionR FermionOp; -//typedef typename WilsonFermionR::FermionField FermionField; +//typedef WilsonCloverFermionD FermionOp; +//typedef typename WilsonFermionD::FermionField FermionField; typedef WilsonImplR FundImplPolicy; -typedef WilsonCloverFermionR FundFermionAction; +typedef WilsonCloverFermionD FundFermionAction; typedef typename FundFermionAction::FermionField FundFermionField; typedef WilsonTwoIndexAntiSymmetricImplR ASymmImplPolicy; -typedef WilsonCloverTwoIndexAntiSymmetricFermionR ASymmFermionAction; +typedef WilsonCloverTwoIndexAntiSymmetricFermionD ASymmFermionAction; typedef typename ASymmFermionAction::FermionField ASymmFermionField; @@ -175,3 +177,6 @@ NerscHmcCheckpointer Checkpoint(CPparams); Grid_finalize(); } +#else +int main(int argc,char **argv){ return 0;}; +#endif diff --git a/tests/lanczos/Test_compressed_lanczos.cc b/tests/lanczos/Test_compressed_lanczos.cc index d7d0d52d..28df3f99 100644 --- a/tests/lanczos/Test_compressed_lanczos.cc +++ b/tests/lanczos/Test_compressed_lanczos.cc @@ -188,8 +188,8 @@ int main (int argc, char ** argv) { std::cout << GridLogMessage << "Lattice dimensions: " << GridDefaultLatt() << " Ls: " << Ls << std::endl; // ZMobius EO Operator - ZMobiusFermionR Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, Params.omega,1.,0.); - SchurDiagTwoOperator HermOp(Ddwf); + ZMobiusFermionD Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, Params.omega,1.,0.); + SchurDiagTwoOperator HermOp(Ddwf); // Eigenvector storage LanczosParams fine =Params.FineParams; diff --git a/tests/lanczos/Test_dwf_compressed_lanczos_reorg.cc b/tests/lanczos/Test_dwf_compressed_lanczos_reorg.cc index 669a7b6d..7a84a465 100644 --- a/tests/lanczos/Test_dwf_compressed_lanczos_reorg.cc +++ b/tests/lanczos/Test_dwf_compressed_lanczos_reorg.cc @@ -188,8 +188,8 @@ int main (int argc, char ** argv) { std::cout << GridLogMessage << "Lattice dimensions: " << GridDefaultLatt() << " Ls: " << Ls << std::endl; // ZMobius EO Operator - ZMobiusFermionR Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, Params.omega,1.,0.); - SchurDiagTwoOperator HermOp(Ddwf); + ZMobiusFermionD Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, Params.omega,1.,0.); + SchurDiagTwoOperator HermOp(Ddwf); // Eigenvector storage LanczosParams fine =Params.FineParams; diff --git a/tests/lanczos/Test_dwf_compressed_lanczos_reorg_synthetic.cc b/tests/lanczos/Test_dwf_compressed_lanczos_reorg_synthetic.cc index f3cb567c..e82a9741 100644 --- a/tests/lanczos/Test_dwf_compressed_lanczos_reorg_synthetic.cc +++ b/tests/lanczos/Test_dwf_compressed_lanczos_reorg_synthetic.cc @@ -301,8 +301,8 @@ int main (int argc, char ** argv) { std::cout << GridLogMessage << "Lattice dimensions: " << GridDefaultLatt() << " Ls: " << Ls << std::endl; // ZMobius EO Operator - ZMobiusFermionR Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, Params.omega,1.,0.); - SchurDiagTwoOperator HermOp(Ddwf); + ZMobiusFermionD Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, Params.omega,1.,0.); + SchurDiagTwoOperator HermOp(Ddwf); // Eigenvector storage LanczosParams fine =Params.FineParams; diff --git a/tests/lanczos/Test_dwf_lanczos.cc b/tests/lanczos/Test_dwf_lanczos.cc index 1fe29bb2..1723e756 100644 --- a/tests/lanczos/Test_dwf_lanczos.cc +++ b/tests/lanczos/Test_dwf_lanczos.cc @@ -35,8 +35,8 @@ template struct Setup{}; template<> -struct Setup{ - static GparityMobiusFermionR* getAction(LatticeGaugeField &Umu, +struct Setup{ + static GparityMobiusFermionD* getAction(LatticeGaugeField &Umu, GridCartesian* FGrid, GridRedBlackCartesian* FrbGrid, GridCartesian* UGrid, GridRedBlackCartesian* UrbGrid){ RealD mass=0.01; RealD M5=1.8; @@ -44,17 +44,17 @@ struct Setup{ GparityMobiusFermionD ::ImplParams params; std::vector twists({1,1,1,0}); params.twists = twists; - return new GparityMobiusFermionR(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,mob_b,mob_b-1.,params); + return new GparityMobiusFermionD(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,mob_b,mob_b-1.,params); } }; template<> -struct Setup{ - static DomainWallFermionR* getAction(LatticeGaugeField &Umu, +struct Setup{ + static DomainWallFermionD* getAction(LatticeGaugeField &Umu, GridCartesian* FGrid, GridRedBlackCartesian* FrbGrid, GridCartesian* UGrid, GridRedBlackCartesian* UrbGrid){ RealD mass=0.01; RealD M5=1.8; - return new DomainWallFermionR(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); + return new DomainWallFermionD(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); } }; @@ -127,9 +127,9 @@ int main (int argc, char ** argv) } if(action == "GparityMobius"){ - run(); + run(); }else if(action == "DWF"){ - run(); + run(); }else{ std::cout << "Unknown action" << std::endl; exit(1); diff --git a/tests/lanczos/Test_wilson_lanczos.cc b/tests/lanczos/Test_wilson_lanczos.cc index af21fb1d..4814e8c6 100644 --- a/tests/lanczos/Test_wilson_lanczos.cc +++ b/tests/lanczos/Test_wilson_lanczos.cc @@ -32,8 +32,8 @@ using namespace std; using namespace Grid; ; -typedef WilsonFermionR FermionOp; -typedef typename WilsonFermionR::FermionField FermionField; +typedef WilsonFermionD FermionOp; +typedef typename WilsonFermionD::FermionField FermionField; RealD AllZero(RealD x) { return 0.; } diff --git a/tests/smearing/Test_WilsonFlow.cc b/tests/smearing/Test_WilsonFlow.cc index f339959a..e0726f87 100644 --- a/tests/smearing/Test_WilsonFlow.cc +++ b/tests/smearing/Test_WilsonFlow.cc @@ -96,13 +96,16 @@ int main(int argc, char **argv) { std::cout << GridLogMessage << "Initial plaquette: " << WilsonLoops::avgPlaquette(Umu) << std::endl; - WilsonFlow WF(WFPar.steps, WFPar.step_size, WFPar.meas_interval); + int t=WFPar.maxTau; + WilsonFlowAdaptive WF(WFPar.step_size, WFPar.maxTau, + 1.0e-4, + WFPar.meas_interval); - WF.smear_adaptive(Uflow, Umu, WFPar.maxTau); + WF.smear(Uflow, Umu); RealD WFlow_plaq = WilsonLoops::avgPlaquette(Uflow); RealD WFlow_TC = WilsonLoops::TopologicalCharge(Uflow); - RealD WFlow_T0 = WF.energyDensityPlaquette(Uflow); + RealD WFlow_T0 = WF.energyDensityPlaquette(t,Uflow); std::cout << GridLogMessage << "Plaquette "<< conf << " " << WFlow_plaq << std::endl; std::cout << GridLogMessage << "T0 "<< conf << " " << WFlow_T0 << std::endl; std::cout << GridLogMessage << "TopologicalCharge "<< conf << " " << WFlow_TC << std::endl; diff --git a/tests/solver/Test_cf_cr_unprec.cc b/tests/solver/Test_cf_cr_unprec.cc index aa750175..3addcb62 100644 --- a/tests/solver/Test_cf_cr_unprec.cc +++ b/tests/solver/Test_cf_cr_unprec.cc @@ -71,14 +71,14 @@ int main (int argc, char ** argv) RealD mass=0.1; RealD M5=1.8; - OverlapWilsonContFracTanhFermionR Dcf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0); + OverlapWilsonContFracTanhFermionD Dcf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0); ConjugateResidual MCR(1.0e-8,10000); - MdagMLinearOperator HermPosDefOp(Dcf); + MdagMLinearOperator HermPosDefOp(Dcf); MCR(HermPosDefOp,src,result); - HermitianLinearOperator HermIndefOp(Dcf); + HermitianLinearOperator HermIndefOp(Dcf); MCR(HermIndefOp,src,result); Grid_finalize(); diff --git a/tests/solver/Test_coarse_even_odd.cc b/tests/solver/Test_coarse_even_odd.cc index c7127121..9d2f8c22 100644 --- a/tests/solver/Test_coarse_even_odd.cc +++ b/tests/solver/Test_coarse_even_odd.cc @@ -108,8 +108,8 @@ int main(int argc, char** argv) { RealD mass = -0.30; RealD csw = 1.9192; - WilsonCloverFermionR Dwc(Umu, *Grid_f, *RBGrid_f, mass, csw, csw); - MdagMLinearOperator MdagMOp_Dwc(Dwc); + WilsonCloverFermionD Dwc(Umu, *Grid_f, *RBGrid_f, mass, csw, csw); + MdagMLinearOperator MdagMOp_Dwc(Dwc); ///////////////////////////////////////////////////////////////////////////// // Type definitions // diff --git a/tests/solver/Test_contfrac_cg.cc b/tests/solver/Test_contfrac_cg.cc index afabae4c..52599d07 100644 --- a/tests/solver/Test_contfrac_cg.cc +++ b/tests/solver/Test_contfrac_cg.cc @@ -102,21 +102,21 @@ int main (int argc, char ** argv) std::cout<(Dcf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + OverlapWilsonContFracTanhFermionD Dcf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0); + TestCGinversions(Dcf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(Dcfz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + OverlapWilsonContFracZolotarevFermionD Dcfz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,6.0); + TestCGinversions(Dcfz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(Dpf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + OverlapWilsonPartialFractionTanhFermionD Dpf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,1.0); + TestCGinversions(Dpf,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); std::cout<(Dpfz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); + OverlapWilsonPartialFractionZolotarevFermionD Dpfz(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,0.1,6.0); + TestCGinversions(Dpfz,FGrid,FrbGrid,UGrid,UrbGrid,mass,M5,&RNG4,&RNG5); Grid_finalize(); diff --git a/tests/solver/Test_dwf_cg_prec.cc b/tests/solver/Test_dwf_cg_prec.cc index debb736a..f4e346bf 100644 --- a/tests/solver/Test_dwf_cg_prec.cc +++ b/tests/solver/Test_dwf_cg_prec.cc @@ -79,7 +79,7 @@ int main(int argc, char** argv) { RealD mass = 0.01; RealD M5 = 1.8; - DomainWallFermionR Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5); + DomainWallFermionD Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5); LatticeFermion src_o(FrbGrid); LatticeFermion result_o(FrbGrid); @@ -88,7 +88,7 @@ int main(int argc, char** argv) { GridStopWatch CGTimer; - SchurDiagMooeeOperator HermOpEO(Ddwf); + SchurDiagMooeeOperator HermOpEO(Ddwf); ConjugateGradient CG(1.0e-5, 10000, 0);// switch off the assert CGTimer.Start(); @@ -98,8 +98,5 @@ int main(int argc, char** argv) { std::cout << GridLogMessage << "Total CG time : " << CGTimer.Elapsed() << std::endl; - std::cout << GridLogMessage << "######## Dhop calls summary" << std::endl; - Ddwf.Report(); - Grid_finalize(); } diff --git a/tests/solver/Test_dwf_cg_schur.cc b/tests/solver/Test_dwf_cg_schur.cc index 6541e73d..bcc0cc40 100644 --- a/tests/solver/Test_dwf_cg_schur.cc +++ b/tests/solver/Test_dwf_cg_schur.cc @@ -70,7 +70,7 @@ int main (int argc, char ** argv) RealD mass=0.1; RealD M5=1.8; - DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); + DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); ConjugateGradient CG(1.0e-8,10000); SchurRedBlackDiagMooeeSolve SchurSolver(CG); diff --git a/tests/solver/Test_dwf_cg_unprec.cc b/tests/solver/Test_dwf_cg_unprec.cc index c867ccf3..58614c49 100644 --- a/tests/solver/Test_dwf_cg_unprec.cc +++ b/tests/solver/Test_dwf_cg_unprec.cc @@ -70,9 +70,9 @@ int main (int argc, char ** argv) RealD mass=0.1; RealD M5=1.8; - DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); + DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); - MdagMLinearOperator HermOp(Ddwf); + MdagMLinearOperator HermOp(Ddwf); ConjugateGradient CG(1.0e-6,10000); CG(HermOp,src,result); diff --git a/tests/solver/Test_dwf_cr_unprec.cc b/tests/solver/Test_dwf_cr_unprec.cc index 8c8583ba..4d67231d 100644 --- a/tests/solver/Test_dwf_cr_unprec.cc +++ b/tests/solver/Test_dwf_cr_unprec.cc @@ -77,12 +77,12 @@ int main (int argc, char ** argv) RealD mass=0.5; RealD M5=1.8; - DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); + DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); - MdagMLinearOperator HermOp(Ddwf); + MdagMLinearOperator HermOp(Ddwf); MCR(HermOp,src,result); - Gamma5R5HermitianLinearOperator g5HermOp(Ddwf); + Gamma5R5HermitianLinearOperator g5HermOp(Ddwf); MCR(g5HermOp,src,result); diff --git a/tests/solver/Test_dwf_fpgcr.cc b/tests/solver/Test_dwf_fpgcr.cc index 42cc8de1..3d779474 100644 --- a/tests/solver/Test_dwf_fpgcr.cc +++ b/tests/solver/Test_dwf_fpgcr.cc @@ -77,12 +77,12 @@ int main (int argc, char ** argv) RealD mass=0.5; RealD M5=1.8; - DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); + DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); std::cout< HermOp(Ddwf); + MdagMLinearOperator HermOp(Ddwf); TrivialPrecon simple; PrecGeneralisedConjugateResidual PGCR(1.0e-6,10000,HermOp,simple,4,160); @@ -92,7 +92,7 @@ int main (int argc, char ** argv) std::cout< g5HermOp(Ddwf); + Gamma5R5HermitianLinearOperator g5HermOp(Ddwf); PrecGeneralisedConjugateResidual PGCR5(1.0e-6,10000,g5HermOp,simple,4,160); result=Zero(); PGCR5(src,result); diff --git a/tests/solver/Test_dwf_hdcr.cc b/tests/solver/Test_dwf_hdcr.cc index ba77dffa..31b58284 100644 --- a/tests/solver/Test_dwf_hdcr.cc +++ b/tests/solver/Test_dwf_hdcr.cc @@ -254,7 +254,7 @@ int main (int argc, char ** argv) std::cout< Subspace; typedef CoarsenedMatrix CoarseOperator; @@ -263,7 +263,7 @@ int main (int argc, char ** argv) std::cout< HermDefOp(Ddwf); + MdagMLinearOperator HermDefOp(Ddwf); Subspace Aggregates(Coarse5d,FGrid,0); @@ -290,7 +290,7 @@ int main (int argc, char ** argv) typedef CoarsenedMatrix Level1Op; typedef CoarsenedMatrix,nbasisc> Level2Op; - Gamma5R5HermitianLinearOperator HermIndefOp(Ddwf); + Gamma5R5HermitianLinearOperator HermIndefOp(Ddwf); Level1Op LDOp(*Coarse5d,*Coarse5dRB,1); LDOp.CoarsenOperator(FGrid,HermIndefOp,Aggregates); @@ -351,16 +351,16 @@ int main (int argc, char ** argv) std::cout< , NormalEquations > TwoLevelMG; + typedef MultiGridPreconditioner , NormalEquations > TwoLevelMG; typedef MultiGridPreconditioner,nbasisc,Level1Op, DeflatedGuesser, NormalEquations > CoarseMG; - typedef MultiGridPreconditioner, LinearFunction > ThreeLevelMG; + typedef MultiGridPreconditioner, LinearFunction > ThreeLevelMG; // MultiGrid preconditioner acting on the coarse space <-> coarsecoarse space ChebyshevSmoother CoarseSmoother(0.1,12.0,3,L1LinOp,LDOp); - ChebyshevSmoother FineSmoother(0.5,60.0,10,HermIndefOp,Ddwf); + ChebyshevSmoother FineSmoother(0.5,60.0,10,HermIndefOp,Ddwf); // MirsSmoother CoarseCGSmoother(0.1,0.1,4,L1LinOp,LDOp); - // MirsSmoother FineCGSmoother(0.0,0.01,8,HermIndefOp,Ddwf); + // MirsSmoother FineCGSmoother(0.0,0.01,8,HermIndefOp,Ddwf); CoarseMG Level2Precon (CoarseAggregates, L2Op, L1LinOp,LDOp, diff --git a/tests/solver/Test_dwf_hdcr_16_rb.cc b/tests/solver/Test_dwf_hdcr_16_rb.cc index 4682272d..ae8e7ae5 100644 --- a/tests/solver/Test_dwf_hdcr_16_rb.cc +++ b/tests/solver/Test_dwf_hdcr_16_rb.cc @@ -268,7 +268,7 @@ int main (int argc, char ** argv) std::cout< Subspace; typedef CoarsenedMatrix CoarseOperator; @@ -277,7 +277,7 @@ int main (int argc, char ** argv) std::cout< HermDefOp(Ddwf); + MdagMLinearOperator HermDefOp(Ddwf); Subspace Aggregates(Coarse5d,FGrid,0); @@ -311,7 +311,7 @@ int main (int argc, char ** argv) typedef CoarsenedMatrix Level1Op; typedef CoarsenedMatrix,nbasisc> Level2Op; - Gamma5R5HermitianLinearOperator HermIndefOp(Ddwf); + Gamma5R5HermitianLinearOperator HermIndefOp(Ddwf); GridRedBlackCartesian * Coarse4dRB = SpaceTimeGrid::makeFourDimRedBlackGrid(Coarse4d); @@ -338,11 +338,11 @@ int main (int argc, char ** argv) std::cout< , SolverWrapper > TwoLevelMG; + typedef MultiGridPreconditioner , SolverWrapper > TwoLevelMG; typedef MultiGridPreconditioner,nbasisc,Level1Op, DeflatedGuesser, NormalEquations > CoarseMG; - typedef MultiGridPreconditioner, LinearFunction > ThreeLevelMG; + typedef MultiGridPreconditioner, LinearFunction > ThreeLevelMG; - ChebyshevSmoother FineSmoother(0.5,60.0,12,HermIndefOp,Ddwf); + ChebyshevSmoother FineSmoother(0.5,60.0,12,HermIndefOp,Ddwf); std::cout< HermOpEO(Ddwf); + SchurDiagMooeeOperator HermOpEO(Ddwf); // pCG(HermOpEO,src_o,result_o); std::cout< Subspace; typedef CoarsenedMatrix CoarseOperator; @@ -259,7 +259,7 @@ int main (int argc, char ** argv) std::cout< HermDefOp(Ddwf); + MdagMLinearOperator HermDefOp(Ddwf); Subspace Aggregates(Coarse5d,FGrid,0); @@ -292,7 +292,7 @@ int main (int argc, char ** argv) typedef CoarsenedMatrix Level1Op; typedef CoarsenedMatrix,nbasisc> Level2Op; - Gamma5R5HermitianLinearOperator HermIndefOp(Ddwf); + Gamma5R5HermitianLinearOperator HermIndefOp(Ddwf); GridRedBlackCartesian * Coarse4dRB = SpaceTimeGrid::makeFourDimRedBlackGrid(Coarse4d); @@ -391,18 +391,18 @@ int main (int argc, char ** argv) std::cout< , NormalEquations > TwoLevelMG; - typedef MultiGridPreconditioner , NormalEquations > TwoLevelMG; + // typedef MultiGridPreconditioner , NormalEquations > TwoLevelMG; + typedef MultiGridPreconditioner , NormalEquations > TwoLevelMG; typedef MultiGridPreconditioner,nbasisc,Level1Op, DeflatedGuesser, NormalEquations > CoarseMG; - typedef MultiGridPreconditioner, LinearFunction > ThreeLevelMG; + typedef MultiGridPreconditioner, LinearFunction > ThreeLevelMG; - ChebyshevSmoother FineSmoother(0.25,60.0,12,HermIndefOp,Ddwf); + ChebyshevSmoother FineSmoother(0.25,60.0,12,HermIndefOp,Ddwf); /* // MultiGrid preconditioner acting on the coarse space <-> coarsecoarse space ChebyshevSmoother CoarseSmoother(0.1,15.0,3,L1LinOp,LDOp); // MirsSmoother CoarseCGSmoother(0.1,0.1,4,L1LinOp,LDOp); - // MirsSmoother FineCGSmoother(0.0,0.01,8,HermIndefOp,Ddwf); + // MirsSmoother FineCGSmoother(0.0,0.01,8,HermIndefOp,Ddwf); CoarseMG Level2Precon (CoarseAggregates, L2Op, L1LinOp,LDOp, @@ -463,7 +463,7 @@ int main (int argc, char ** argv) LatticeFermion result_o(FrbGrid); pickCheckerboard(Odd,src_o,src); result_o=Zero(); - SchurDiagMooeeOperator HermOpEO(Ddwf); + SchurDiagMooeeOperator HermOpEO(Ddwf); // pCG(HermOpEO,src_o,result_o); std::cout< Subspace; typedef CoarsenedMatrix CoarseOperator; @@ -297,7 +297,7 @@ int main (int argc, char ** argv) std::cout< HermDefOp(Ddwf); + MdagMLinearOperator HermDefOp(Ddwf); Subspace Aggregates(Coarse5d,FGrid,0); @@ -332,7 +332,7 @@ int main (int argc, char ** argv) std::cout< Level1Op; - Gamma5R5HermitianLinearOperator HermIndefOp(Ddwf); + Gamma5R5HermitianLinearOperator HermIndefOp(Ddwf); Level1Op LDOp(*Coarse5d,*Coarse5dRB,1); LDOp.CoarsenOperator(FGrid,HermIndefOp,Aggregates); @@ -375,21 +375,21 @@ int main (int argc, char ** argv) std::cout< , NormalEquations > TwoLevelMG; + typedef MultiGridPreconditioner , NormalEquations > TwoLevelMG; // MultiGrid preconditioner acting on the coarse space <-> coarsecoarse space - // ChebyshevSmoother FineSmoother(0.5,60.0,14,HermIndefOp,Ddwf); // 72 iter 63s - // ChebyshevSmoother FineSmoother(0.1,60.0,20,HermIndefOp,Ddwf); // 66 iter 69s - // ChebyshevSmoother FineSmoother(0.5,60.0,20,HermIndefOp,Ddwf); // 63 iter 65 s - // ChebyshevSmoother FineSmoother(1.0,60.0,20,HermIndefOp,Ddwf); // 69, 70 - // ChebyshevSmoother FineSmoother(1.0,60.0,14,HermIndefOp,Ddwf); // 77 + // ChebyshevSmoother FineSmoother(0.5,60.0,14,HermIndefOp,Ddwf); // 72 iter 63s + // ChebyshevSmoother FineSmoother(0.1,60.0,20,HermIndefOp,Ddwf); // 66 iter 69s + // ChebyshevSmoother FineSmoother(0.5,60.0,20,HermIndefOp,Ddwf); // 63 iter 65 s + // ChebyshevSmoother FineSmoother(1.0,60.0,20,HermIndefOp,Ddwf); // 69, 70 + // ChebyshevSmoother FineSmoother(1.0,60.0,14,HermIndefOp,Ddwf); // 77 - // ChebyshevSmoother FineSmoother(0.5,60.0,10,HermIndefOp,Ddwf); // 23 iter 15.9s - // ChebyshevSmoother FineSmoother(0.5,60.0,14,HermIndefOp,Ddwf); // 20, 16.9s - ChebyshevSmoother FineSmoother(0.5,60.0,12,HermIndefOp,Ddwf); // 21, 15.6s + // ChebyshevSmoother FineSmoother(0.5,60.0,10,HermIndefOp,Ddwf); // 23 iter 15.9s + // ChebyshevSmoother FineSmoother(0.5,60.0,14,HermIndefOp,Ddwf); // 20, 16.9s + ChebyshevSmoother FineSmoother(0.5,60.0,12,HermIndefOp,Ddwf); // 21, 15.6s - // MirsSmoother FineCGSmoother(0.05,0.01,20,HermIndefOp,Ddwf); - // RedBlackSmoother FineRBSmoother(0.00,0.001,100,Ddwf); + // MirsSmoother FineCGSmoother(0.05,0.01,20,HermIndefOp,Ddwf); + // RedBlackSmoother FineRBSmoother(0.00,0.001,100,Ddwf); // Wrap the 2nd level solver in a MultiGrid preconditioner acting on the fine space // ZeroGuesser CoarseZeroGuesser; @@ -416,7 +416,7 @@ int main (int argc, char ** argv) ConjugateGradient FineCG(1.0e-8,10000); - SchurDiagMooeeOperator FineDiagMooee(Ddwf); // M_ee - Meo Moo^-1 Moe + SchurDiagMooeeOperator FineDiagMooee(Ddwf); // M_ee - Meo Moo^-1 Moe LatticeFermion f_src_e(FrbGrid); f_src_e=1.0; LatticeFermion f_res_e(FrbGrid); f_res_e=Zero(); FineCG(FineDiagMooee,f_src_e,f_res_e); diff --git a/tests/solver/Test_dwf_hdcr_48_rb.cc b/tests/solver/Test_dwf_hdcr_48_rb.cc index 2b76681e..25ac1dac 100644 --- a/tests/solver/Test_dwf_hdcr_48_rb.cc +++ b/tests/solver/Test_dwf_hdcr_48_rb.cc @@ -264,7 +264,7 @@ int main (int argc, char ** argv) std::cout< Subspace; typedef CoarsenedMatrix CoarseOperator; @@ -273,7 +273,7 @@ int main (int argc, char ** argv) std::cout< HermDefOp(Ddwf); + MdagMLinearOperator HermDefOp(Ddwf); Subspace Aggregates(Coarse5d,FGrid,0); @@ -306,7 +306,7 @@ int main (int argc, char ** argv) typedef CoarsenedMatrix Level1Op; typedef CoarsenedMatrix,nbasisc> Level2Op; - Gamma5R5HermitianLinearOperator HermIndefOp(Ddwf); + Gamma5R5HermitianLinearOperator HermIndefOp(Ddwf); GridRedBlackCartesian * Coarse4dRB = SpaceTimeGrid::makeFourDimRedBlackGrid(Coarse4d); @@ -332,9 +332,9 @@ int main (int argc, char ** argv) std::cout< , SolverWrapper > TwoLevelMG; + typedef MultiGridPreconditioner , SolverWrapper > TwoLevelMG; typedef MultiGridPreconditioner,nbasisc,Level1Op, DeflatedGuesser, NormalEquations > CoarseMG; - typedef MultiGridPreconditioner, LinearFunction > ThreeLevelMG; + typedef MultiGridPreconditioner, LinearFunction > ThreeLevelMG; std::cout< FineSmoother(los[l],60.0,ords[o],HermIndefOp,Ddwf); + ChebyshevSmoother FineSmoother(los[l],60.0,ords[o],HermIndefOp,Ddwf); ZeroGuesser CoarseZeroGuesser; ConjugateGradient CoarseCG(tols[t],10000); SchurRedBlackDiagMooeeSolve CoarseRBCG(CoarseCG); @@ -376,7 +376,7 @@ int main (int argc, char ** argv) LatticeFermion result_o(FrbGrid); pickCheckerboard(Odd,src_o,src); result_o=Zero(); - SchurDiagMooeeOperator HermOpEO(Ddwf); + SchurDiagMooeeOperator HermOpEO(Ddwf); pCG(HermOpEO,src_o,result_o); std::cout< Subspace; typedef CoarsenedMatrix CoarseOperator; @@ -257,7 +257,7 @@ int main (int argc, char ** argv) std::cout< HermDefOp(Ddwf); + MdagMLinearOperator HermDefOp(Ddwf); Subspace Aggregates(Coarse5d,FGrid,0); @@ -290,7 +290,7 @@ int main (int argc, char ** argv) typedef CoarsenedMatrix Level1Op; typedef CoarsenedMatrix,nbasisc> Level2Op; - Gamma5R5HermitianLinearOperator HermIndefOp(Ddwf); + Gamma5R5HermitianLinearOperator HermIndefOp(Ddwf); GridRedBlackCartesian * Coarse4dRB = SpaceTimeGrid::makeFourDimRedBlackGrid(Coarse4d); @@ -386,18 +386,18 @@ int main (int argc, char ** argv) std::cout< , NormalEquations > TwoLevelMG; - typedef MultiGridPreconditioner , NormalEquations > TwoLevelMG; + // typedef MultiGridPreconditioner , NormalEquations > TwoLevelMG; + typedef MultiGridPreconditioner , NormalEquations > TwoLevelMG; typedef MultiGridPreconditioner,nbasisc,Level1Op, DeflatedGuesser, NormalEquations > CoarseMG; - typedef MultiGridPreconditioner, LinearFunction > ThreeLevelMG; + typedef MultiGridPreconditioner, LinearFunction > ThreeLevelMG; - ChebyshevSmoother FineSmoother(0.25,60.0,12,HermIndefOp,Ddwf); + ChebyshevSmoother FineSmoother(0.25,60.0,12,HermIndefOp,Ddwf); /* // MultiGrid preconditioner acting on the coarse space <-> coarsecoarse space ChebyshevSmoother CoarseSmoother(0.1,15.0,3,L1LinOp,LDOp); // MirsSmoother CoarseCGSmoother(0.1,0.1,4,L1LinOp,LDOp); - // MirsSmoother FineCGSmoother(0.0,0.01,8,HermIndefOp,Ddwf); + // MirsSmoother FineCGSmoother(0.0,0.01,8,HermIndefOp,Ddwf); CoarseMG Level2Precon (CoarseAggregates, L2Op, L1LinOp,LDOp, @@ -458,7 +458,7 @@ int main (int argc, char ** argv) LatticeFermion result_o(FrbGrid); pickCheckerboard(Odd,src_o,src); result_o=Zero(); - SchurDiagMooeeOperator HermOpEO(Ddwf); + SchurDiagMooeeOperator HermOpEO(Ddwf); pCG(HermOpEO,src_o,result_o); std::cout< HermOp(Ddwf); - MdagMLinearOperator HermOpCk(Dchk); + MdagMLinearOperator HermOp(Ddwf); + MdagMLinearOperator HermOpCk(Dchk); ConjugateGradient CG((1.0e-5/(me+1)),10000); s_res = Zero(); CG(HermOp,s_src,s_res); diff --git a/tests/solver/Test_dwf_mrhs_cg_mpi.cc b/tests/solver/Test_dwf_mrhs_cg_mpi.cc index d0a32460..1a679f45 100644 --- a/tests/solver/Test_dwf_mrhs_cg_mpi.cc +++ b/tests/solver/Test_dwf_mrhs_cg_mpi.cc @@ -34,9 +34,9 @@ using namespace Grid; int main (int argc, char ** argv) { - typedef typename DomainWallFermionR::FermionField FermionField; - typedef typename DomainWallFermionR::ComplexField ComplexField; - typename DomainWallFermionR::ImplParams params; + typedef typename DomainWallFermionD::FermionField FermionField; + typedef typename DomainWallFermionD::ComplexField ComplexField; + typename DomainWallFermionD::ImplParams params; double stp=1.0e-5; const int Ls=4; @@ -189,15 +189,15 @@ int main (int argc, char ** argv) std::cout << GridLogMessage << " Building the solvers"< HermOp(Ddwf); - MdagMLinearOperator HermOpCk(Dchk); + MdagMLinearOperator HermOp(Ddwf); + MdagMLinearOperator HermOpCk(Dchk); ConjugateGradient CG((stp),10000); s_res = Zero(); CG(HermOp,s_src,s_res); diff --git a/tests/solver/Test_dwf_mrhs_cg_mpieo.cc b/tests/solver/Test_dwf_mrhs_cg_mpieo.cc index 1906619f..0dcab577 100644 --- a/tests/solver/Test_dwf_mrhs_cg_mpieo.cc +++ b/tests/solver/Test_dwf_mrhs_cg_mpieo.cc @@ -34,9 +34,9 @@ using namespace Grid; int main (int argc, char ** argv) { - typedef typename DomainWallFermionR::FermionField FermionField; - typedef typename DomainWallFermionR::ComplexField ComplexField; - typename DomainWallFermionR::ImplParams params; + typedef typename DomainWallFermionD::FermionField FermionField; + typedef typename DomainWallFermionD::ComplexField ComplexField; + typename DomainWallFermionD::ImplParams params; const int Ls=4; @@ -124,15 +124,15 @@ int main (int argc, char ** argv) /////////////////////////////////////////////////////////////// RealD mass=0.01; RealD M5=1.8; - DomainWallFermionR Dchk(Umu,*FGrid,*FrbGrid,*UGrid,*rbGrid,mass,M5); - DomainWallFermionR Ddwf(s_Umu,*SFGrid,*SFrbGrid,*SGrid,*SrbGrid,mass,M5); + DomainWallFermionD Dchk(Umu,*FGrid,*FrbGrid,*UGrid,*rbGrid,mass,M5); + DomainWallFermionD Ddwf(s_Umu,*SFGrid,*SFrbGrid,*SGrid,*SrbGrid,mass,M5); std::cout << GridLogMessage << "****************************************************************** "< HermOp(Ddwf); - MdagMLinearOperator HermOpCk(Dchk); + MdagMLinearOperator HermOp(Ddwf); + MdagMLinearOperator HermOpCk(Dchk); ConjugateGradient CG((1.0e-8/(me+1)),10000); s_res = Zero(); CG(HermOp,s_src,s_res); diff --git a/tests/solver/Test_dwf_multigrid.cc b/tests/solver/Test_dwf_multigrid.cc index e670b358..1cd83375 100644 --- a/tests/solver/Test_dwf_multigrid.cc +++ b/tests/solver/Test_dwf_multigrid.cc @@ -397,8 +397,8 @@ int main (int argc, char ** argv) std::cout< Subspace; typedef CoarsenedMatrix CoarseOperator; @@ -407,7 +407,7 @@ int main (int argc, char ** argv) std::cout< HermDefOp(Ddwf); + MdagMLinearOperator HermDefOp(Ddwf); Subspace Aggregates(Coarse5d,FGrid,0); @@ -435,8 +435,8 @@ int main (int argc, char ** argv) typedef CoarsenedMatrix Level1Op; typedef CoarsenedMatrix,nbasisc> Level2Op; - Gamma5R5HermitianLinearOperator HermIndefOp(Ddwf); - Gamma5R5HermitianLinearOperator HermIndefOpPV(Dpv); + Gamma5R5HermitianLinearOperator HermIndefOp(Ddwf); + Gamma5R5HermitianLinearOperator HermIndefOpPV(Dpv); std::cout< FineCG(tol,MaxIt); // GeneralisedMinimalResidual FineGMRES(tol,MaxIt,20); - MdagMLinearOperator FineMdagM(Ddwf); // M^\dag M - PVdagMLinearOperator FinePVdagM(Ddwf,Dpv);// M_{pv}^\dag M - SchurDiagMooeeOperator FineDiagMooee(Ddwf); // M_ee - Meo Moo^-1 Moe - SchurDiagOneOperator FineDiagOne(Ddwf); // 1 - M_ee^{-1} Meo Moo^{-1} Moe e + MdagMLinearOperator FineMdagM(Ddwf); // M^\dag M + PVdagMLinearOperator FinePVdagM(Ddwf,Dpv);// M_{pv}^\dag M + SchurDiagMooeeOperator FineDiagMooee(Ddwf); // M_ee - Meo Moo^-1 Moe + SchurDiagOneOperator FineDiagOne(Ddwf); // 1 - M_ee^{-1} Meo Moo^{-1} Moe e MdagMLinearOperator CoarseMdagM(LDOp); PVdagMLinearOperator CoarsePVdagM(LDOp,LDOpPV); @@ -552,7 +552,7 @@ int main (int argc, char ** argv) std::cout< CoarseMgridCG(0.001,1000); - ChebyshevSmoother FineSmoother(0.5,60.0,10,HermIndefOp,Ddwf); + ChebyshevSmoother FineSmoother(0.5,60.0,10,HermIndefOp,Ddwf); typedef HDCRPreconditioner > TwoLevelHDCR; TwoLevelHDCR TwoLevelPrecon(Aggregates, diff --git a/tests/solver/Test_dwf_qmr_unprec.cc b/tests/solver/Test_dwf_qmr_unprec.cc index 370e7409..eeb20c95 100644 --- a/tests/solver/Test_dwf_qmr_unprec.cc +++ b/tests/solver/Test_dwf_qmr_unprec.cc @@ -66,17 +66,17 @@ int main (int argc, char ** argv) RealD mass=0.0; RealD M5=-1.8; - DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); + DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); - Gamma5R5HermitianLinearOperator g5HermOp(Ddwf); + Gamma5R5HermitianLinearOperator g5HermOp(Ddwf); QMR(g5HermOp,src,result); GMR(g5HermOp,src,result); - NonHermitianLinearOperator NonHermOp(Ddwf); + NonHermitianLinearOperator NonHermOp(Ddwf); QMR(NonHermOp,src,result); GMR(NonHermOp,src,result); - MdagMLinearOperator HermOp(Ddwf); + MdagMLinearOperator HermOp(Ddwf); ConjugateGradient CG(1.0e-8,10000); CG(HermOp,src,result); diff --git a/tests/solver/Test_eofa_inv.cc b/tests/solver/Test_eofa_inv.cc index 564405c2..71952b97 100644 --- a/tests/solver/Test_eofa_inv.cc +++ b/tests/solver/Test_eofa_inv.cc @@ -83,8 +83,8 @@ int main (int argc, char** argv) RealD mf = 0.01; RealD mb = 1.0; RealD M5 = 1.8; - MobiusEOFAFermionR Lop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, 0.0, -1, M5, b, c); - MobiusEOFAFermionR Rop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, -1.0, 1, M5, b, c); + MobiusEOFAFermionD Lop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mf, mf, mb, 0.0, -1, M5, b, c); + MobiusEOFAFermionD Rop(U, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mb, mf, mb, -1.0, 1, M5, b, c); OneFlavourRationalParams Params(0.95, 100.0, 5000, 1.0e-10, 12); ConjugateGradient CG(1.0e-10, 5000); ExactOneFlavourRatioPseudoFermionAction Meofa(Lop, Rop, CG, CG, CG, CG, CG, Params, false); diff --git a/tests/solver/Test_hw_multigrid.cc b/tests/solver/Test_hw_multigrid.cc index 66c88883..fd30bca7 100644 --- a/tests/solver/Test_hw_multigrid.cc +++ b/tests/solver/Test_hw_multigrid.cc @@ -292,9 +292,9 @@ int main (int argc, char ** argv) std::cout< Subspace; typedef CoarsenedMatrix CoarseOperator; @@ -304,7 +304,7 @@ int main (int argc, char ** argv) std::cout< SubspaceOp(Dw); + MdagMLinearOperator SubspaceOp(Dw); Subspace Aggregates4D(Coarse4d,UGrid,0); Subspace Aggregates5D(Coarse5d,FGrid,0); @@ -335,7 +335,7 @@ int main (int argc, char ** argv) std::cout< Level1Op; - NonHermitianLinearOperator LinOpDwf(Ddwf); + NonHermitianLinearOperator LinOpDwf(Ddwf); Level1Op LDOp (*Coarse5d,*Coarse5dRB,0); diff --git a/tests/solver/Test_hw_multigrid_mixed_48.cc b/tests/solver/Test_hw_multigrid_mixed_48.cc index 0e8d6a17..3a31ddbe 100644 --- a/tests/solver/Test_hw_multigrid_mixed_48.cc +++ b/tests/solver/Test_hw_multigrid_mixed_48.cc @@ -395,7 +395,7 @@ public: Geometry geom; GridBase *Coarse5D; GridBase *Coarse4D; - CartesianStencil Stencil; + CartesianStencil Stencil; CoarsenedMatrix &Dw; GridBase * Grid(void) { return Coarse5D; }; // this is all the linalg routines need to know @@ -409,7 +409,7 @@ public: Coarse5D(&CoarseGrid5), Dw(_Dw), geom(CoarseGrid5._ndimension), - Stencil( &CoarseGrid5,geom.npoint,Even,geom.directions,geom.displacements,0) + Stencil( &CoarseGrid5,geom.npoint,Even,geom.directions,geom.displacements,DefaultImplParams()) { }; @@ -981,9 +981,9 @@ int main (int argc, char ** argv) RealD mass=0.00078; - WilsonFermionR Dw(Umu,*UGrid,*UrbGrid,-M5); - DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); - DomainWallFermionR Dpv (Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,1.0,M5); + WilsonFermionD Dw(Umu,*UGrid,*UrbGrid,-M5); + DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); + DomainWallFermionD Dpv (Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,1.0,M5); typedef Aggregation Subspace; typedef CoarsenedMatrix CoarseOperator; @@ -994,21 +994,21 @@ int main (int argc, char ** argv) std::cout< MdagM_Dw(Dw_null); + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.75); // 600 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.80); // 800 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.82); // 1023 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.85); // 1428 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.87); // 1900 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.90); // 3900 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.92); // 6200 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.94); // 8882 iters + WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.95); // 9170 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.96); // 8882 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.97); // 8406 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.99); // 6900 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-1.01); // 6397 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-1.00); // 5900 iters + MdagMLinearOperator MdagM_Dw(Dw_null); std::cout< Level1Op4; typedef CoarseCayleyFermion Level1Op5; Level1Op4 c_Dw (*Coarse4d,0); - NonHermitianLinearOperator LinOpDw(Dw); + NonHermitianLinearOperator LinOpDw(Dw); c_Dw.CoarsenOperator(UGrid,LinOpDw,Aggregates4D); // contains the M5 from Dw(-M5) // c_Dw.Test(Aggregates4D,UGrid,LinOpDw); @@ -1127,8 +1127,8 @@ int main (int argc, char ** argv) ConjugateGradient CoarseCG(tol,MaxIt); ConjugateGradient FineCG(tol,MaxIt); - NonHermitianLinearOperator FineM(Ddwf); - MdagMLinearOperator FineMdagM(Ddwf); // M^\dag M + NonHermitianLinearOperator FineM(Ddwf); + MdagMLinearOperator FineMdagM(Ddwf); // M^\dag M NonHermitianLinearOperator CoarseM(c_Dwf); MdagMLinearOperator CoarseMdagM(c_Dwf); @@ -1233,39 +1233,39 @@ typedef HDCRPreconditioner,nbasisc,NormalEquations // Wrap the 2nd level solver in a MultiGrid preconditioner acting on the fine space - // ChebyshevSmoother FineSmoother1(0.5,60.0,14,FineM,Ddwf); // 26 iter, 39s - // ChebyshevSmoother FineSmoother2(0.5,60.0,14,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(0.5,60.0,14,FineM,Ddwf); // 26 iter, 39s + // ChebyshevSmoother FineSmoother2(0.5,60.0,14,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // 25 iter, 38s - // ChebyshevSmoother FineSmoother2(0.5,60.0,16,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // 25 iter, 38s + // ChebyshevSmoother FineSmoother2(0.5,60.0,16,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // 23 iter, 39s - // ChebyshevSmoother FineSmoother2(0.5,60.0,20,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // 23 iter, 39s + // ChebyshevSmoother FineSmoother2(0.5,60.0,20,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(0.5,60.0,10,FineM,Ddwf);24 iter, 44s - // ChebyshevSmoother FineSmoother2(0.5,60.0,24,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(0.5,60.0,10,FineM,Ddwf);24 iter, 44s + // ChebyshevSmoother FineSmoother2(0.5,60.0,24,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // odd convergence tail at 10^-9 ish - // ChebyshevSmoother FineSmoother2(0.1,60.0,24,FineM,Ddwf); // 33 iter, waas O(10-9 by 26) + // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // odd convergence tail at 10^-9 ish + // ChebyshevSmoother FineSmoother2(0.1,60.0,24,FineM,Ddwf); // 33 iter, waas O(10-9 by 26) - // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // 25 iter, 39s - // ChebyshevSmoother FineSmoother2(0.5,60.0,18,FineM,Ddwf); // + // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // 25 iter, 39s + // ChebyshevSmoother FineSmoother2(0.5,60.0,18,FineM,Ddwf); // - ChebyshevSmoother FineSmoother1(0.5,60.0,16,FineM,Ddwf); - ChebyshevSmoother FineSmoother2(0.5,60.0,16,FineM,Ddwf); // + ChebyshevSmoother FineSmoother1(0.5,60.0,16,FineM,Ddwf); + ChebyshevSmoother FineSmoother2(0.5,60.0,16,FineM,Ddwf); // - // ChebyshevSmoother FineSmoother1(0.5,60.0,11,FineM,Ddwf); // 33 iter, 49s - // ChebyshevSmoother FineSmoother2(0.5,60.0,11,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // 26 iter, 37s - // ChebyshevSmoother FineSmoother2(0.5,60.0,12,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(0.4,60.0,12,FineM,Ddwf); // iter 26 no change in final residual - // ChebyshevSmoother FineSmoother2(0.4,60.0,12,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(0.3,60.0,12,FineM,Ddwf); // 27 iter 39s. - // ChebyshevSmoother FineSmoother2(0.3,60.0,12,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(0.3,60.0,13,FineM,Ddwf); // 26 iter, but slower - // ChebyshevSmoother FineSmoother2(0.3,60.0,13,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(1.0,60.0,12,FineM,Ddwf); // 34 iter, slower - // ChebyshevSmoother FineSmoother2(1.0,60.0,12,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(0.5,60.0,11,FineM,Ddwf); // 33 iter, 49s + // ChebyshevSmoother FineSmoother2(0.5,60.0,11,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // 26 iter, 37s + // ChebyshevSmoother FineSmoother2(0.5,60.0,12,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(0.4,60.0,12,FineM,Ddwf); // iter 26 no change in final residual + // ChebyshevSmoother FineSmoother2(0.4,60.0,12,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(0.3,60.0,12,FineM,Ddwf); // 27 iter 39s. + // ChebyshevSmoother FineSmoother2(0.3,60.0,12,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(0.3,60.0,13,FineM,Ddwf); // 26 iter, but slower + // ChebyshevSmoother FineSmoother2(0.3,60.0,13,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(1.0,60.0,12,FineM,Ddwf); // 34 iter, slower + // ChebyshevSmoother FineSmoother2(1.0,60.0,12,FineM,Ddwf); ThreeLevelMG ThreeLevelPrecon(Aggregates4D, FineM, diff --git a/tests/solver/Test_hw_multigrid_mixed_48_rb.cc b/tests/solver/Test_hw_multigrid_mixed_48_rb.cc index e7ceb022..0f18893e 100644 --- a/tests/solver/Test_hw_multigrid_mixed_48_rb.cc +++ b/tests/solver/Test_hw_multigrid_mixed_48_rb.cc @@ -395,7 +395,7 @@ public: Geometry geom; GridBase *Coarse5D; GridBase *Coarse4D; - CartesianStencil Stencil; + CartesianStencil Stencil; CoarsenedMatrix &Dw; GridBase * Grid(void) { return Coarse5D; }; // this is all the linalg routines need to know @@ -409,7 +409,7 @@ public: Coarse5D(&CoarseGrid5), Dw(_Dw), geom(CoarseGrid5._ndimension), - Stencil( &CoarseGrid5,geom.npoint,Even,geom.directions,geom.displacements,0) + Stencil( &CoarseGrid5,geom.npoint,Even,geom.directions,geom.displacements,DefaultImplParams()) { }; @@ -1005,9 +1005,9 @@ int main (int argc, char ** argv) RealD mass=0.00078; - WilsonFermionR Dw(Umu,*UGrid,*UrbGrid,-M5); - DomainWallFermionR Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); - DomainWallFermionR Dpv (Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,1.0,M5); + WilsonFermionD Dw(Umu,*UGrid,*UrbGrid,-M5); + DomainWallFermionD Ddwf(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5); + DomainWallFermionD Dpv (Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,1.0,M5); typedef Aggregation Subspace; typedef CoarsenedMatrix CoarseOperator; @@ -1018,21 +1018,21 @@ int main (int argc, char ** argv) std::cout< MdagM_Dw(Dw_null); + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.75); // 600 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.80); // 800 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.82); // 1023 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.85); // 1428 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.87); // 1900 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.90); // 3900 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.92); // 6200 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.94); // 8882 iters + WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.95); // 9170 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.96); // 8882 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.97); // 8406 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-0.99); // 6900 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-1.01); // 6397 iters + // WilsonFermionD Dw_null(Umu,*UGrid,*UrbGrid,-1.00); // 5900 iters + MdagMLinearOperator MdagM_Dw(Dw_null); std::cout< Level1Op4; typedef CoarseCayleyFermion Level1Op5; Level1Op4 c_Dw (*Coarse4d,0); - NonHermitianLinearOperator LinOpDw(Dw); + NonHermitianLinearOperator LinOpDw(Dw); c_Dw.CoarsenOperator(UGrid,LinOpDw,Aggregates4D); // contains the M5 from Dw(-M5) // c_Dw.Test(Aggregates4D,UGrid,LinOpDw); @@ -1148,8 +1148,8 @@ int main (int argc, char ** argv) ConjugateGradient CoarseCG(tol,MaxIt); ConjugateGradient FineCG(tol,MaxIt); - NonHermitianLinearOperator FineM(Ddwf); - MdagMLinearOperator FineMdagM(Ddwf); // M^\dag M + NonHermitianLinearOperator FineM(Ddwf); + MdagMLinearOperator FineMdagM(Ddwf); // M^\dag M NonHermitianLinearOperator CoarseM(c_Dwf); MdagMLinearOperator CoarseMdagM(c_Dwf); @@ -1272,38 +1272,38 @@ typedef HDCRPreconditioner,nbasisc,LinearFunction< // Wrap the 2nd level solver in a MultiGrid preconditioner acting on the fine space - // ChebyshevSmoother FineSmoother1(0.5,60.0,14,FineM,Ddwf); // 26 iter, 39s - // ChebyshevSmoother FineSmoother2(0.5,60.0,14,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(0.5,60.0,14,FineM,Ddwf); // 26 iter, 39s + // ChebyshevSmoother FineSmoother2(0.5,60.0,14,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // 25 iter, 38s - // ChebyshevSmoother FineSmoother2(0.5,60.0,16,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // 25 iter, 38s + // ChebyshevSmoother FineSmoother2(0.5,60.0,16,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // 23 iter, 39s - // ChebyshevSmoother FineSmoother2(0.5,60.0,20,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // 23 iter, 39s + // ChebyshevSmoother FineSmoother2(0.5,60.0,20,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(0.5,60.0,10,FineM,Ddwf);24 iter, 44s - // ChebyshevSmoother FineSmoother2(0.5,60.0,24,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(0.5,60.0,10,FineM,Ddwf);24 iter, 44s + // ChebyshevSmoother FineSmoother2(0.5,60.0,24,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // odd convergence tail at 10^-9 ish - // ChebyshevSmoother FineSmoother2(0.1,60.0,24,FineM,Ddwf); // 33 iter, waas O(10-9 by 26) + // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // odd convergence tail at 10^-9 ish + // ChebyshevSmoother FineSmoother2(0.1,60.0,24,FineM,Ddwf); // 33 iter, waas O(10-9 by 26) - // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // 25 iter, 39s - // ChebyshevSmoother FineSmoother2(0.5,60.0,18,FineM,Ddwf); // + // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // 25 iter, 39s + // ChebyshevSmoother FineSmoother2(0.5,60.0,18,FineM,Ddwf); // - ChebyshevSmoother FineSmoother(f_lo,f_hi,f_ord,FineM,Ddwf); + ChebyshevSmoother FineSmoother(f_lo,f_hi,f_ord,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(0.5,60.0,11,FineM,Ddwf); // 33 iter, 49s - // ChebyshevSmoother FineSmoother2(0.5,60.0,11,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // 26 iter, 37s - // ChebyshevSmoother FineSmoother2(0.5,60.0,12,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(0.4,60.0,12,FineM,Ddwf); // iter 26 no change in final residual - // ChebyshevSmoother FineSmoother2(0.4,60.0,12,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(0.3,60.0,12,FineM,Ddwf); // 27 iter 39s. - // ChebyshevSmoother FineSmoother2(0.3,60.0,12,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(0.3,60.0,13,FineM,Ddwf); // 26 iter, but slower - // ChebyshevSmoother FineSmoother2(0.3,60.0,13,FineM,Ddwf); - // ChebyshevSmoother FineSmoother1(1.0,60.0,12,FineM,Ddwf); // 34 iter, slower - // ChebyshevSmoother FineSmoother2(1.0,60.0,12,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(0.5,60.0,11,FineM,Ddwf); // 33 iter, 49s + // ChebyshevSmoother FineSmoother2(0.5,60.0,11,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(0.5,60.0,12,FineM,Ddwf); // 26 iter, 37s + // ChebyshevSmoother FineSmoother2(0.5,60.0,12,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(0.4,60.0,12,FineM,Ddwf); // iter 26 no change in final residual + // ChebyshevSmoother FineSmoother2(0.4,60.0,12,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(0.3,60.0,12,FineM,Ddwf); // 27 iter 39s. + // ChebyshevSmoother FineSmoother2(0.3,60.0,12,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(0.3,60.0,13,FineM,Ddwf); // 26 iter, but slower + // ChebyshevSmoother FineSmoother2(0.3,60.0,13,FineM,Ddwf); + // ChebyshevSmoother FineSmoother1(1.0,60.0,12,FineM,Ddwf); // 34 iter, slower + // ChebyshevSmoother FineSmoother2(1.0,60.0,12,FineM,Ddwf); ThreeLevelMG ThreeLevelPrecon(Aggregates4D, FineM, diff --git a/tests/solver/Test_mobius_bcg.cc b/tests/solver/Test_mobius_bcg.cc index 8092d61c..a54b4a05 100644 --- a/tests/solver/Test_mobius_bcg.cc +++ b/tests/solver/Test_mobius_bcg.cc @@ -33,9 +33,9 @@ using namespace Grid; int main (int argc, char ** argv) { - typedef typename MobiusFermionR::FermionField FermionField; - typedef typename MobiusFermionR::ComplexField ComplexField; - typename MobiusFermionR::ImplParams params; + typedef typename MobiusFermionD::FermionField FermionField; + typedef typename MobiusFermionD::ComplexField ComplexField; + typename MobiusFermionD::ImplParams params; const int Ls=12; @@ -158,15 +158,15 @@ int main (int argc, char ** argv) RealD mobius_factor=32./12.; RealD mobius_b=0.5*(mobius_factor+1.); RealD mobius_c=0.5*(mobius_factor-1.); - MobiusFermionR Dchk(Umu,*FGrid,*FrbGrid,*UGrid,*rbGrid,mass,M5,mobius_b,mobius_c,params); - MobiusFermionR Ddwf(s_Umu,*SFGrid,*SFrbGrid,*SGrid,*SrbGrid,mass,M5,mobius_b,mobius_c,params); + MobiusFermionD Dchk(Umu,*FGrid,*FrbGrid,*UGrid,*rbGrid,mass,M5,mobius_b,mobius_c,params); + MobiusFermionD Ddwf(s_Umu,*SFGrid,*SFrbGrid,*SGrid,*SrbGrid,mass,M5,mobius_b,mobius_c,params); std::cout << GridLogMessage << "****************************************************************** "< HermOp(Ddwf); - MdagMLinearOperator HermOpCk(Dchk); + MdagMLinearOperator HermOp(Ddwf); + MdagMLinearOperator HermOpCk(Dchk); ConjugateGradient CG((stp),100000); s_res = Zero(); diff --git a/tests/solver/Test_mobius_bcg_nosplit.cc b/tests/solver/Test_mobius_bcg_nosplit.cc index de02b1e3..f33a40ea 100644 --- a/tests/solver/Test_mobius_bcg_nosplit.cc +++ b/tests/solver/Test_mobius_bcg_nosplit.cc @@ -35,9 +35,9 @@ using namespace Grid; int main (int argc, char ** argv) { - typedef typename DomainWallFermionR::FermionField FermionField; - typedef typename DomainWallFermionR::ComplexField ComplexField; - typename DomainWallFermionR::ImplParams params; + typedef typename DomainWallFermionD::FermionField FermionField; + typedef typename DomainWallFermionD::ComplexField ComplexField; + typename DomainWallFermionD::ImplParams params; const int Ls=16; @@ -106,13 +106,13 @@ int main (int argc, char ** argv) std::cout << GridLogMessage << " Building the solvers"< HermOp(Ddwf); + MdagMLinearOperator HermOp(Ddwf); ConjugateGradient CG((stp),100000); for(int rhs=0;rhs<1;rhs++){ diff --git a/tests/solver/Test_mobius_bcg_phys_nosplit.cc b/tests/solver/Test_mobius_bcg_phys_nosplit.cc index 2fe573ce..76a6f7e1 100644 --- a/tests/solver/Test_mobius_bcg_phys_nosplit.cc +++ b/tests/solver/Test_mobius_bcg_phys_nosplit.cc @@ -35,9 +35,9 @@ using namespace Grid; int main (int argc, char ** argv) { - typedef typename DomainWallFermionR::FermionField FermionField; - typedef typename DomainWallFermionR::ComplexField ComplexField; - typename DomainWallFermionR::ImplParams params; + typedef typename DomainWallFermionD::FermionField FermionField; + typedef typename DomainWallFermionD::ComplexField ComplexField; + typename DomainWallFermionD::ImplParams params; const int Ls=16; @@ -107,7 +107,7 @@ int main (int argc, char ** argv) std::cout << GridLogMessage << " Building the solvers"< HermOp(Ddwf); + MdagMLinearOperator HermOp(Ddwf); ConjugateGradient CG((stp),100000); for(int rhs=0;rhs<1;rhs++){ diff --git a/tests/solver/Test_mobius_bcg_prec_nosplit.cc b/tests/solver/Test_mobius_bcg_prec_nosplit.cc index 3ac0d42b..f793893c 100644 --- a/tests/solver/Test_mobius_bcg_prec_nosplit.cc +++ b/tests/solver/Test_mobius_bcg_prec_nosplit.cc @@ -35,9 +35,9 @@ using namespace Grid; int main (int argc, char ** argv) { - typedef typename DomainWallFermionR::FermionField FermionField; - typedef typename DomainWallFermionR::ComplexField ComplexField; - typename DomainWallFermionR::ImplParams params; + typedef typename DomainWallFermionD::FermionField FermionField; + typedef typename DomainWallFermionD::ComplexField ComplexField; + typename DomainWallFermionD::ImplParams params; const int Ls=16; @@ -106,13 +106,13 @@ int main (int argc, char ** argv) std::cout << GridLogMessage << " Building the solvers"< HermOp(Ddwf); + MdagMLinearOperator HermOp(Ddwf); ConjugateGradient CG((stp),100000); for(int rhs=0;rhs<1;rhs++){ diff --git a/tests/solver/Test_split_grid.cc b/tests/solver/Test_split_grid.cc index 85626c8e..39441c82 100644 --- a/tests/solver/Test_split_grid.cc +++ b/tests/solver/Test_split_grid.cc @@ -34,9 +34,9 @@ using namespace Grid; int main (int argc, char ** argv) { - typedef typename DomainWallFermionR::FermionField FermionField; - typedef typename DomainWallFermionR::ComplexField ComplexField; - typename DomainWallFermionR::ImplParams params; + typedef typename DomainWallFermionD::FermionField FermionField; + typedef typename DomainWallFermionD::ComplexField ComplexField; + typename DomainWallFermionD::ImplParams params; const int Ls=4; @@ -117,15 +117,15 @@ int main (int argc, char ** argv) /////////////////////////////////////////////////////////////// RealD mass=0.01; RealD M5=1.8; - DomainWallFermionR Dchk(Umu,*FGrid,*FrbGrid,*UGrid,*rbGrid,mass,M5); - DomainWallFermionR Ddwf(s_Umu,*SFGrid,*SFrbGrid,*SGrid,*SrbGrid,mass,M5); + DomainWallFermionD Dchk(Umu,*FGrid,*FrbGrid,*UGrid,*rbGrid,mass,M5); + DomainWallFermionD Ddwf(s_Umu,*SFGrid,*SFrbGrid,*SGrid,*SrbGrid,mass,M5); std::cout << GridLogMessage << "****************************************************************** "< HermOp(Ddwf); - MdagMLinearOperator HermOpCk(Dchk); + MdagMLinearOperator HermOp(Ddwf); + MdagMLinearOperator HermOpCk(Dchk); ConjugateGradient CG((1.0e-8/(me+1)),10000); s_res = Zero(); CG(HermOp,s_src,s_res); diff --git a/tests/solver/Test_staggered_block_cg_prec.cc b/tests/solver/Test_staggered_block_cg_prec.cc index c5306e85..4cb7801e 100644 --- a/tests/solver/Test_staggered_block_cg_prec.cc +++ b/tests/solver/Test_staggered_block_cg_prec.cc @@ -46,9 +46,9 @@ struct scal { int main (int argc, char ** argv) { - typedef typename ImprovedStaggeredFermion5DR::FermionField FermionField; - typedef typename ImprovedStaggeredFermion5DR::ComplexField ComplexField; - typename ImprovedStaggeredFermion5DR::ImplParams params; + typedef typename ImprovedStaggeredFermion5DD::FermionField FermionField; + typedef typename ImprovedStaggeredFermion5DD::ComplexField ComplexField; + typename ImprovedStaggeredFermion5DD::ImplParams params; const int Ls=8; @@ -98,8 +98,8 @@ int main (int argc, char ** argv) RealD c1=9.0/8.0; RealD c2=-1.0/24.0; RealD u0=1.0; - ImprovedStaggeredFermion5DR Ds(Umu,Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,c1,c2,u0); - SchurStaggeredOperator HermOp(Ds); + ImprovedStaggeredFermion5DD Ds(Umu,Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,c1,c2,u0); + SchurStaggeredOperator HermOp(Ds); ConjugateGradient CG(1.0e-8,10000); int blockDim = 0; @@ -111,8 +111,8 @@ int main (int argc, char ** argv) std::cout << GridLogMessage << "****************************************************************** "< HermOp4d(Ds4d); + ImprovedStaggeredFermionD Ds4d(Umu,Umu,*UGrid,*UrbGrid,mass,c1,c2,u0); + SchurStaggeredOperator HermOp4d(Ds4d); FermionField src4d(UGrid); random(pRNG,src4d); FermionField src4d_o(UrbGrid); pickCheckerboard(Odd,src4d_o,src4d); FermionField result4d_o(UrbGrid); @@ -135,7 +135,6 @@ int main (int argc, char ** argv) std::cout << GridLogMessage << "************************************************************************ "< using namespace std; using namespace Grid; - ; - -template -struct scal { - d internal; -}; Gamma::Algebra Gmu [] = { Gamma::Algebra::GammaX, @@ -46,9 +40,9 @@ struct scal { int main (int argc, char ** argv) { - typedef typename ImprovedStaggeredFermion5DR::FermionField FermionField; - typedef typename ImprovedStaggeredFermion5DR::ComplexField ComplexField; - typename ImprovedStaggeredFermion5DR::ImplParams params; + typedef typename ImprovedStaggeredFermion5DD::FermionField FermionField; + typedef typename ImprovedStaggeredFermion5DD::ComplexField ComplexField; + typename ImprovedStaggeredFermion5DD::ImplParams params; const int Ls=8; @@ -83,8 +77,8 @@ int main (int argc, char ** argv) volume=volume*latt_size[mu]; } - ImprovedStaggeredFermion5DR Ds(Umu,Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,c1,c2,u0); - MdagMLinearOperator HermOp(Ds); + ImprovedStaggeredFermion5DD Ds(Umu,Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,c1,c2,u0); + MdagMLinearOperator HermOp(Ds); ConjugateGradient CG(1.0e-8,10000); int blockDim = 0; @@ -95,8 +89,8 @@ int main (int argc, char ** argv) std::cout << GridLogMessage << "****************************************************************** "< HermOp4d(Ds4d); + ImprovedStaggeredFermionD Ds4d(Umu,Umu,*UGrid,*UrbGrid,mass,c1,c2,u0); + MdagMLinearOperator HermOp4d(Ds4d); FermionField src4d(UGrid); random(pRNG,src4d); FermionField result4d(UGrid); result4d=Zero(); @@ -120,7 +114,6 @@ int main (int argc, char ** argv) std::cout << GridLogMessage << "************************************************************************ "< HermOp(Ds); + MdagMLinearOperator HermOp(Ds); CommunicationAvoidingGeneralisedMinimalResidual CAGMRES(1.0e-8, 10000, 25); CAGMRES(HermOp,src,result); diff --git a/tests/solver/Test_staggered_cg_prec.cc b/tests/solver/Test_staggered_cg_prec.cc index 854ef632..bc80da09 100644 --- a/tests/solver/Test_staggered_cg_prec.cc +++ b/tests/solver/Test_staggered_cg_prec.cc @@ -47,8 +47,8 @@ struct scal { int main (int argc, char ** argv) { - typedef typename ImprovedStaggeredFermionR::FermionField FermionField; - typename ImprovedStaggeredFermionR::ImplParams params; + typedef typename ImprovedStaggeredFermionD::FermionField FermionField; + typename ImprovedStaggeredFermionD::ImplParams params; Grid_init(&argc,&argv); @@ -74,14 +74,14 @@ int main (int argc, char ** argv) RealD c1=9.0/8.0; RealD c2=-1.0/24.0; RealD u0=1.0; - ImprovedStaggeredFermionR Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0); + ImprovedStaggeredFermionD Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0); FermionField res_o(&RBGrid); FermionField src_o(&RBGrid); pickCheckerboard(Odd,src_o,src); res_o=Zero(); - SchurStaggeredOperator HermOpEO(Ds); + SchurStaggeredOperator HermOpEO(Ds); ConjugateGradient CG(1.0e-8,10000); double t1=usecond(); CG(HermOpEO,src_o,res_o); diff --git a/tests/solver/Test_staggered_cg_schur.cc b/tests/solver/Test_staggered_cg_schur.cc index d8e5bdd4..5d7d073e 100644 --- a/tests/solver/Test_staggered_cg_schur.cc +++ b/tests/solver/Test_staggered_cg_schur.cc @@ -45,8 +45,8 @@ struct scal { int main (int argc, char ** argv) { - typedef typename ImprovedStaggeredFermionR::FermionField FermionField; - typename ImprovedStaggeredFermionR::ImplParams params; + typedef typename ImprovedStaggeredFermionD::FermionField FermionField; + typename ImprovedStaggeredFermionD::ImplParams params; Grid_init(&argc,&argv); Coordinate latt_size = GridDefaultLatt(); @@ -68,7 +68,7 @@ int main (int argc, char ** argv) RealD c1=9.0/8.0; RealD c2=-1.0/24.0; RealD u0=1.0; - ImprovedStaggeredFermionR Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0); + ImprovedStaggeredFermionD Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0); ConjugateGradient CG(1.0e-8,10000); SchurRedBlackStaggeredSolve SchurSolver(CG); diff --git a/tests/solver/Test_staggered_cg_unprec.cc b/tests/solver/Test_staggered_cg_unprec.cc index e023b910..466f1d04 100644 --- a/tests/solver/Test_staggered_cg_unprec.cc +++ b/tests/solver/Test_staggered_cg_unprec.cc @@ -47,9 +47,9 @@ struct scal { int main (int argc, char ** argv) { - typedef typename ImprovedStaggeredFermionR::FermionField FermionField; - typedef typename ImprovedStaggeredFermionR::ComplexField ComplexField; - typename ImprovedStaggeredFermionR::ImplParams params; + typedef typename ImprovedStaggeredFermionD::FermionField FermionField; + typedef typename ImprovedStaggeredFermionD::ComplexField ComplexField; + typename ImprovedStaggeredFermionD::ImplParams params; Grid_init(&argc,&argv); @@ -76,9 +76,9 @@ int main (int argc, char ** argv) RealD c1=9.0/8.0; RealD c2=-1.0/24.0; RealD u0=1.0; - ImprovedStaggeredFermionR Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0); + ImprovedStaggeredFermionD Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0); - MdagMLinearOperator HermOp(Ds); + MdagMLinearOperator HermOp(Ds); ConjugateGradient CG(1.0e-6,10000); CG(HermOp,src,result); diff --git a/tests/solver/Test_staggered_fcagmres_prec.cc b/tests/solver/Test_staggered_fcagmres_prec.cc index 692d688e..7587748e 100644 --- a/tests/solver/Test_staggered_fcagmres_prec.cc +++ b/tests/solver/Test_staggered_fcagmres_prec.cc @@ -33,9 +33,9 @@ using namespace Grid; int main (int argc, char ** argv) { - typedef typename ImprovedStaggeredFermionR::FermionField FermionField; - typedef typename ImprovedStaggeredFermionR::ComplexField ComplexField; - typename ImprovedStaggeredFermionR::ImplParams params; + typedef typename ImprovedStaggeredFermionD::FermionField FermionField; + typedef typename ImprovedStaggeredFermionD::ComplexField ComplexField; + typename ImprovedStaggeredFermionD::ImplParams params; Grid_init(&argc,&argv); @@ -62,9 +62,9 @@ int main (int argc, char ** argv) RealD c1=9.0/8.0; RealD c2=-1.0/24.0; RealD u0=1.0; - ImprovedStaggeredFermionR Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0); + ImprovedStaggeredFermionD Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0); - MdagMLinearOperator HermOp(Ds); + MdagMLinearOperator HermOp(Ds); TrivialPrecon simple; diff --git a/tests/solver/Test_staggered_fgmres_prec.cc b/tests/solver/Test_staggered_fgmres_prec.cc index fe6da67c..a3c65057 100644 --- a/tests/solver/Test_staggered_fgmres_prec.cc +++ b/tests/solver/Test_staggered_fgmres_prec.cc @@ -33,9 +33,9 @@ using namespace Grid; int main (int argc, char ** argv) { - typedef typename ImprovedStaggeredFermionR::FermionField FermionField; - typedef typename ImprovedStaggeredFermionR::ComplexField ComplexField; - typename ImprovedStaggeredFermionR::ImplParams params; + typedef typename ImprovedStaggeredFermionD::FermionField FermionField; + typedef typename ImprovedStaggeredFermionD::ComplexField ComplexField; + typename ImprovedStaggeredFermionD::ImplParams params; Grid_init(&argc,&argv); @@ -62,9 +62,9 @@ int main (int argc, char ** argv) RealD c1=9.0/8.0; RealD c2=-1.0/24.0; RealD u0=1.0; - ImprovedStaggeredFermionR Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0); + ImprovedStaggeredFermionD Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0); - MdagMLinearOperator HermOp(Ds); + MdagMLinearOperator HermOp(Ds); TrivialPrecon simple; diff --git a/tests/solver/Test_staggered_gmres_unprec.cc b/tests/solver/Test_staggered_gmres_unprec.cc index ec9d4608..abfeab75 100644 --- a/tests/solver/Test_staggered_gmres_unprec.cc +++ b/tests/solver/Test_staggered_gmres_unprec.cc @@ -33,9 +33,9 @@ using namespace Grid; int main (int argc, char ** argv) { - typedef typename ImprovedStaggeredFermionR::FermionField FermionField; - typedef typename ImprovedStaggeredFermionR::ComplexField ComplexField; - typename ImprovedStaggeredFermionR::ImplParams params; + typedef typename ImprovedStaggeredFermionD::FermionField FermionField; + typedef typename ImprovedStaggeredFermionD::ComplexField ComplexField; + typename ImprovedStaggeredFermionD::ImplParams params; Grid_init(&argc,&argv); @@ -62,9 +62,9 @@ int main (int argc, char ** argv) RealD c1=9.0/8.0; RealD c2=-1.0/24.0; RealD u0=1.0; - ImprovedStaggeredFermionR Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0); + ImprovedStaggeredFermionD Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0); - MdagMLinearOperator HermOp(Ds); + MdagMLinearOperator HermOp(Ds); GeneralisedMinimalResidual GMRES(1.0e-8, 10000, 25); GMRES(HermOp,src,result); diff --git a/tests/solver/Test_staggered_mr_unprec.cc b/tests/solver/Test_staggered_mr_unprec.cc index ddbb8de3..1cdd60f9 100644 --- a/tests/solver/Test_staggered_mr_unprec.cc +++ b/tests/solver/Test_staggered_mr_unprec.cc @@ -33,9 +33,9 @@ using namespace Grid; int main (int argc, char ** argv) { - typedef typename ImprovedStaggeredFermionR::FermionField FermionField; - typedef typename ImprovedStaggeredFermionR::ComplexField ComplexField; - typename ImprovedStaggeredFermionR::ImplParams params; + typedef typename ImprovedStaggeredFermionD::FermionField FermionField; + typedef typename ImprovedStaggeredFermionD::ComplexField ComplexField; + typename ImprovedStaggeredFermionD::ImplParams params; Grid_init(&argc,&argv); @@ -62,9 +62,9 @@ int main (int argc, char ** argv) RealD c1=9.0/8.0; RealD c2=-1.0/24.0; RealD u0=1.0; - ImprovedStaggeredFermionR Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0); + ImprovedStaggeredFermionD Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0); - MdagMLinearOperator HermOp(Ds); + MdagMLinearOperator HermOp(Ds); MinimalResidual MR(1.0e-8,10000,0.8); MR(HermOp,src,result); diff --git a/tests/solver/Test_staggered_multishift.cc b/tests/solver/Test_staggered_multishift.cc index 856f0b87..9f6b37d6 100644 --- a/tests/solver/Test_staggered_multishift.cc +++ b/tests/solver/Test_staggered_multishift.cc @@ -46,8 +46,8 @@ struct scal { int main (int argc, char ** argv) { - typedef typename ImprovedStaggeredFermionR::FermionField FermionField; - typename ImprovedStaggeredFermionR::ImplParams params; + typedef typename ImprovedStaggeredFermionD::FermionField FermionField; + typename ImprovedStaggeredFermionD::ImplParams params; Grid_init(&argc,&argv); @@ -90,8 +90,8 @@ int main (int argc, char ** argv) RealD c2=-1.0/24.0; RealD u0=1.0; - ImprovedStaggeredFermionR Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0); - SchurStaggeredOperator HermOpEO(Ds); + ImprovedStaggeredFermionD Ds(Umu,Umu,Grid,RBGrid,mass,c1,c2,u0); + SchurStaggeredOperator HermOpEO(Ds); FermionField src(&Grid); random(pRNG,src); FermionField src_o(&RBGrid); diff --git a/tests/solver/Test_wilson_cagmres_unprec.cc b/tests/solver/Test_wilson_cagmres_unprec.cc index 226d0719..80381a27 100644 --- a/tests/solver/Test_wilson_cagmres_unprec.cc +++ b/tests/solver/Test_wilson_cagmres_unprec.cc @@ -55,9 +55,9 @@ int main (int argc, char ** argv) } RealD mass=0.5; - WilsonFermionR Dw(Umu,Grid,RBGrid,mass); + WilsonFermionD Dw(Umu,Grid,RBGrid,mass); - MdagMLinearOperator HermOp(Dw); + MdagMLinearOperator HermOp(Dw); CommunicationAvoidingGeneralisedMinimalResidual CAGMRES(1.0e-8, 10000, 25); CAGMRES(HermOp,src,result); diff --git a/tests/solver/Test_wilson_cg_prec.cc b/tests/solver/Test_wilson_cg_prec.cc index a28e014e..cb480e8c 100644 --- a/tests/solver/Test_wilson_cg_prec.cc +++ b/tests/solver/Test_wilson_cg_prec.cc @@ -69,7 +69,7 @@ int main (int argc, char ** argv) } RealD mass=0.5; - WilsonFermionR Dw(Umu,Grid,RBGrid,mass); + WilsonFermionD Dw(Umu,Grid,RBGrid,mass); // HermitianOperator HermOp(Dw); // ConjugateGradient CG(1.0e-8,10000); @@ -80,7 +80,7 @@ int main (int argc, char ** argv) pickCheckerboard(Odd,src_o,src); result_o=Zero(); - SchurDiagMooeeOperator HermOpEO(Dw); + SchurDiagMooeeOperator HermOpEO(Dw); ConjugateGradient CG(1.0e-8,10000); CG(HermOpEO,src_o,result_o); diff --git a/tests/solver/Test_wilson_cg_schur.cc b/tests/solver/Test_wilson_cg_schur.cc index 97482131..601eb6b2 100644 --- a/tests/solver/Test_wilson_cg_schur.cc +++ b/tests/solver/Test_wilson_cg_schur.cc @@ -64,7 +64,7 @@ int main (int argc, char ** argv) LatticeFermion resid(&Grid); RealD mass=0.5; - WilsonFermionR Dw(Umu,Grid,RBGrid,mass); + WilsonFermionD Dw(Umu,Grid,RBGrid,mass); ConjugateGradient CG(1.0e-8,10000); SchurRedBlackDiagMooeeSolve SchurSolver(CG); diff --git a/tests/solver/Test_wilson_cg_unprec.cc b/tests/solver/Test_wilson_cg_unprec.cc index 07f6ba7b..f1ecebd3 100644 --- a/tests/solver/Test_wilson_cg_unprec.cc +++ b/tests/solver/Test_wilson_cg_unprec.cc @@ -68,9 +68,9 @@ int main (int argc, char ** argv) } RealD mass=0.5; - WilsonFermionR Dw(Umu,Grid,RBGrid,mass); + WilsonFermionD Dw(Umu,Grid,RBGrid,mass); - MdagMLinearOperator HermOp(Dw); + MdagMLinearOperator HermOp(Dw); ConjugateGradient CG(1.0e-8,10000); CG(HermOp,src,result); diff --git a/tests/solver/Test_wilson_cr_unprec.cc b/tests/solver/Test_wilson_cr_unprec.cc index 67510a23..a8b49afd 100644 --- a/tests/solver/Test_wilson_cr_unprec.cc +++ b/tests/solver/Test_wilson_cr_unprec.cc @@ -70,9 +70,9 @@ int main (int argc, char ** argv) } RealD mass=0.5; - WilsonFermionR Dw(Umu,Grid,RBGrid,mass); + WilsonFermionD Dw(Umu,Grid,RBGrid,mass); - MdagMLinearOperator HermOp(Dw); + MdagMLinearOperator HermOp(Dw); ConjugateResidual MCR(1.0e-8,10000); diff --git a/tests/solver/Test_wilson_fcagmres_prec.cc b/tests/solver/Test_wilson_fcagmres_prec.cc index d2a1acf4..66f9f518 100644 --- a/tests/solver/Test_wilson_fcagmres_prec.cc +++ b/tests/solver/Test_wilson_fcagmres_prec.cc @@ -55,9 +55,9 @@ int main (int argc, char ** argv) } RealD mass=0.5; - WilsonFermionR Dw(Umu,Grid,RBGrid,mass); + WilsonFermionD Dw(Umu,Grid,RBGrid,mass); - MdagMLinearOperator HermOp(Dw); + MdagMLinearOperator HermOp(Dw); TrivialPrecon simple; diff --git a/tests/solver/Test_wilson_fgmres_prec.cc b/tests/solver/Test_wilson_fgmres_prec.cc index 02d8f9f2..61368636 100644 --- a/tests/solver/Test_wilson_fgmres_prec.cc +++ b/tests/solver/Test_wilson_fgmres_prec.cc @@ -55,9 +55,9 @@ int main (int argc, char ** argv) } RealD mass=0.5; - WilsonFermionR Dw(Umu,Grid,RBGrid,mass); + WilsonFermionD Dw(Umu,Grid,RBGrid,mass); - MdagMLinearOperator HermOp(Dw); + MdagMLinearOperator HermOp(Dw); TrivialPrecon simple; diff --git a/tests/solver/Test_wilson_gmres_unprec.cc b/tests/solver/Test_wilson_gmres_unprec.cc index e52c047f..5f2728ce 100644 --- a/tests/solver/Test_wilson_gmres_unprec.cc +++ b/tests/solver/Test_wilson_gmres_unprec.cc @@ -55,9 +55,9 @@ int main (int argc, char ** argv) } RealD mass=0.5; - WilsonFermionR Dw(Umu,Grid,RBGrid,mass); + WilsonFermionD Dw(Umu,Grid,RBGrid,mass); - MdagMLinearOperator HermOp(Dw); + MdagMLinearOperator HermOp(Dw); GeneralisedMinimalResidual GMRES(1.0e-8, 10000, 25); GMRES(HermOp,src,result); diff --git a/tests/solver/Test_wilson_mg.cc b/tests/solver/Test_wilson_mg.cc index 99a16e19..875bf32a 100644 --- a/tests/solver/Test_wilson_mg.cc +++ b/tests/solver/Test_wilson_mg.cc @@ -77,16 +77,16 @@ int main(int argc, char **argv) { // Note: We do chiral doubling, so actually only nbasis/2 full basis vectors are used const int nbasis = 40; - WilsonFermionR Dw(Umu, *FGrid, *FrbGrid, mass); + WilsonFermionD Dw(Umu, *FGrid, *FrbGrid, mass); - MdagMLinearOperator MdagMOpDw(Dw); + MdagMLinearOperator MdagMOpDw(Dw); std::cout << GridLogMessage << "**************************************************" << std::endl; std::cout << GridLogMessage << "Testing Multigrid for Wilson" << std::endl; std::cout << GridLogMessage << "**************************************************" << std::endl; TrivialPrecon TrivialPrecon; - auto MGPreconDw = createMGInstance(mgParams, levelInfo, Dw, Dw); + auto MGPreconDw = createMGInstance(mgParams, levelInfo, Dw, Dw); MGPreconDw->setup(); diff --git a/tests/solver/Test_wilson_mr_unprec.cc b/tests/solver/Test_wilson_mr_unprec.cc index fef83794..c71392e4 100644 --- a/tests/solver/Test_wilson_mr_unprec.cc +++ b/tests/solver/Test_wilson_mr_unprec.cc @@ -55,9 +55,9 @@ int main (int argc, char ** argv) } RealD mass=0.5; - WilsonFermionR Dw(Umu,Grid,RBGrid,mass); + WilsonFermionD Dw(Umu,Grid,RBGrid,mass); - MdagMLinearOperator HermOp(Dw); + MdagMLinearOperator HermOp(Dw); MinimalResidual MR(1.0e-8,10000,0.8); MR(HermOp,src,result); diff --git a/tests/solver/Test_wilson_qmr_unprec.cc b/tests/solver/Test_wilson_qmr_unprec.cc index c0b42a28..0cd132e4 100644 --- a/tests/solver/Test_wilson_qmr_unprec.cc +++ b/tests/solver/Test_wilson_qmr_unprec.cc @@ -56,9 +56,9 @@ int main (int argc, char ** argv) QuasiMinimalResidual QMR(1.0e-8,10000); RealD mass=0.0; - WilsonFermionR Dw(Umu,*Grid,*rbGrid,mass); + WilsonFermionD Dw(Umu,*Grid,*rbGrid,mass); - NonHermitianLinearOperator NonHermOp(Dw); + NonHermitianLinearOperator NonHermOp(Dw); QMR(NonHermOp,src,result); Grid_finalize(); diff --git a/tests/solver/Test_wilsonclover_bicgstab_prec.cc b/tests/solver/Test_wilsonclover_bicgstab_prec.cc index b382b1bb..d265e687 100644 --- a/tests/solver/Test_wilsonclover_bicgstab_prec.cc +++ b/tests/solver/Test_wilsonclover_bicgstab_prec.cc @@ -70,14 +70,14 @@ int main (int argc, char ** argv) RealD mass = -0.1; RealD csw_r = 1.0; RealD csw_t = 1.0; - WilsonCloverFermionR Dw(Umu, Grid, RBGrid, mass, csw_r, csw_t); + WilsonCloverFermionD Dw(Umu, Grid, RBGrid, mass, csw_r, csw_t); LatticeFermion src_o(&RBGrid); LatticeFermion result_o(&RBGrid); pickCheckerboard(Odd, src_o, src); result_o = Zero(); - NonHermitianSchurDiagMooeeOperator HermOp(Dw); + NonHermitianSchurDiagMooeeOperator HermOp(Dw); BiCGSTAB CG(1.0e-8,10000); CG(HermOp, src_o, result_o); diff --git a/tests/solver/Test_wilsonclover_bicgstab_schur.cc b/tests/solver/Test_wilsonclover_bicgstab_schur.cc index f09d7cd1..38bfdb72 100644 --- a/tests/solver/Test_wilsonclover_bicgstab_schur.cc +++ b/tests/solver/Test_wilsonclover_bicgstab_schur.cc @@ -70,7 +70,7 @@ int main (int argc, char ** argv) RealD mass = -0.1; RealD csw_r = 1.0; RealD csw_t = 1.0; - WilsonCloverFermionR Dw(Umu, Grid, RBGrid, mass, csw_r, csw_t); + WilsonCloverFermionD Dw(Umu, Grid, RBGrid, mass, csw_r, csw_t); BiCGSTAB CG(1.0e-8,10000); NonHermitianSchurRedBlackDiagMooeeSolve SchurSolver(CG); diff --git a/tests/solver/Test_wilsonclover_bicgstab_unprec.cc b/tests/solver/Test_wilsonclover_bicgstab_unprec.cc index f546a744..48f194b0 100644 --- a/tests/solver/Test_wilsonclover_bicgstab_unprec.cc +++ b/tests/solver/Test_wilsonclover_bicgstab_unprec.cc @@ -70,9 +70,9 @@ int main (int argc, char ** argv) RealD mass = -0.1; RealD csw_r = 1.0; RealD csw_t = 1.0; - WilsonCloverFermionR Dw(Umu, Grid, RBGrid, mass, csw_r, csw_t); + WilsonCloverFermionD Dw(Umu, Grid, RBGrid, mass, csw_r, csw_t); - NonHermitianLinearOperator HermOp(Dw); + NonHermitianLinearOperator HermOp(Dw); BiCGSTAB CG(1.0e-8,10000); CG(HermOp,src,result); diff --git a/tests/solver/Test_wilsonclover_cagmres_unprec.cc b/tests/solver/Test_wilsonclover_cagmres_unprec.cc index a8818168..8b264139 100644 --- a/tests/solver/Test_wilsonclover_cagmres_unprec.cc +++ b/tests/solver/Test_wilsonclover_cagmres_unprec.cc @@ -44,8 +44,8 @@ int main (int argc, char ** argv) std::vector seeds({1,2,3,4}); GridParallelRNG pRNG(&Grid); pRNG.SeedFixedIntegers(seeds); - typedef typename WilsonCloverFermionR::FermionField FermionField; - typename WilsonCloverFermionR::ImplParams params; + typedef typename WilsonCloverFermionD::FermionField FermionField; + typename WilsonCloverFermionD::ImplParams params; WilsonAnisotropyCoefficients anis; FermionField src(&Grid); random(pRNG,src); @@ -61,9 +61,9 @@ int main (int argc, char ** argv) RealD mass = 0.5; RealD csw_r = 1.0; RealD csw_t = 1.0; - WilsonCloverFermionR Dwc(Umu,Grid,RBGrid,mass,csw_r,csw_t,anis,params); + WilsonCloverFermionD Dwc(Umu,Grid,RBGrid,mass,csw_r,csw_t,anis,params); - MdagMLinearOperator HermOp(Dwc); + MdagMLinearOperator HermOp(Dwc); CommunicationAvoidingGeneralisedMinimalResidual CAGMRES(1.0e-8, 10000, 25); CAGMRES(HermOp,src,result); diff --git a/tests/solver/Test_wilsonclover_cg_prec.cc b/tests/solver/Test_wilsonclover_cg_prec.cc index abf64a1f..a0b3a712 100644 --- a/tests/solver/Test_wilsonclover_cg_prec.cc +++ b/tests/solver/Test_wilsonclover_cg_prec.cc @@ -72,10 +72,10 @@ int main (int argc, char ** argv) RealD csw_r = 1.0; RealD csw_t = 1.0; RealD cF = 1.0; - WilsonCloverFermionR Dw(Umu, Grid, RBGrid, mass, csw_r, csw_t); - CompactWilsonCloverFermionR Dw_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 0.0); - WilsonExpCloverFermionR Dwe(Umu, Grid, RBGrid, mass, csw_r, csw_t); - CompactWilsonExpCloverFermionR Dwe_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 0.0); + WilsonCloverFermionD Dw(Umu, Grid, RBGrid, mass, csw_r, csw_t); + CompactWilsonCloverFermionD Dw_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 0.0); + WilsonExpCloverFermionD Dwe(Umu, Grid, RBGrid, mass, csw_r, csw_t); + CompactWilsonExpCloverFermionD Dwe_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 0.0); // HermitianOperator HermOp(Dw); @@ -89,22 +89,22 @@ int main (int argc, char ** argv) ConjugateGradient CG(1.0e-8,10000); std::cout << GridLogMessage << "Testing Wilson Clover" << std::endl; - SchurDiagMooeeOperator HermOpEO(Dw); + SchurDiagMooeeOperator HermOpEO(Dw); result_o=Zero(); CG(HermOpEO,src_o,result_o); std::cout << GridLogMessage << "Testing Compact Wilson Clover" << std::endl; - SchurDiagMooeeOperator HermOpEO_compact(Dw_compact); + SchurDiagMooeeOperator HermOpEO_compact(Dw_compact); result_o=Zero(); CG(HermOpEO_compact,src_o,result_o); std::cout << GridLogMessage << "Testing Wilson Exp Clover" << std::endl; - SchurDiagMooeeOperator HermOpEO_exp(Dwe); + SchurDiagMooeeOperator HermOpEO_exp(Dwe); result_o=Zero(); CG(HermOpEO_exp,src_o,result_o); std::cout << GridLogMessage << "Testing Compact Wilson Exp Clover" << std::endl; - SchurDiagMooeeOperator HermOpEO_exp_compact(Dwe_compact); + SchurDiagMooeeOperator HermOpEO_exp_compact(Dwe_compact); result_o=Zero(); CG(HermOpEO_exp_compact,src_o,result_o); diff --git a/tests/solver/Test_wilsonclover_cg_schur.cc b/tests/solver/Test_wilsonclover_cg_schur.cc index 50d06af7..50a1c4a6 100644 --- a/tests/solver/Test_wilsonclover_cg_schur.cc +++ b/tests/solver/Test_wilsonclover_cg_schur.cc @@ -72,22 +72,22 @@ int main (int argc, char ** argv) RealD cF = 1.0; std::cout << GridLogMessage << "Testing Wilson Clover" << std::endl; - WilsonCloverFermionR Dw(Umu, Grid, RBGrid, mass, csw_r, csw_t); + WilsonCloverFermionD Dw(Umu, Grid, RBGrid, mass, csw_r, csw_t); result=Zero(); SchurSolver(Dw,src,result); std::cout << GridLogMessage << "Testing Compact Wilson Clover" << std::endl; - CompactWilsonCloverFermionR Dw_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 0.0); + CompactWilsonCloverFermionD Dw_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 0.0); result=Zero(); SchurSolver(Dw_compact,src,result); std::cout << GridLogMessage << "Testing Wilson Exp Clover" << std::endl; - WilsonExpCloverFermionR Dwe(Umu, Grid, RBGrid, mass, csw_r, csw_t); + WilsonExpCloverFermionD Dwe(Umu, Grid, RBGrid, mass, csw_r, csw_t); result=Zero(); SchurSolver(Dwe,src,result); std::cout << GridLogMessage << "Testing Compact Wilson Exp Clover" << std::endl; - CompactWilsonExpCloverFermionR Dwe_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 0.0); + CompactWilsonExpCloverFermionD Dwe_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 0.0); result=Zero(); SchurSolver(Dwe_compact,src,result); diff --git a/tests/solver/Test_wilsonclover_cg_unprec.cc b/tests/solver/Test_wilsonclover_cg_unprec.cc index 2a859f11..25cf07ee 100644 --- a/tests/solver/Test_wilsonclover_cg_unprec.cc +++ b/tests/solver/Test_wilsonclover_cg_unprec.cc @@ -71,31 +71,31 @@ int main (int argc, char ** argv) RealD csw_r = 1.0; RealD csw_t = 1.0; RealD cF = 1.0; - WilsonCloverFermionR Dw(Umu, Grid, RBGrid, mass, csw_r, csw_t); - CompactWilsonCloverFermionR Dw_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 0.0); - WilsonExpCloverFermionR Dwe(Umu, Grid, RBGrid, mass, csw_r, csw_t); - CompactWilsonExpCloverFermionR Dwe_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 0.0); + WilsonCloverFermionD Dw(Umu, Grid, RBGrid, mass, csw_r, csw_t); + CompactWilsonCloverFermionD Dw_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 0.0); + WilsonExpCloverFermionD Dwe(Umu, Grid, RBGrid, mass, csw_r, csw_t); + CompactWilsonExpCloverFermionD Dwe_compact(Umu, Grid, RBGrid, mass, csw_r, csw_t, 0.0); ConjugateGradient CG(1.0e-8,10000); std::cout << GridLogMessage << "Testing Wilson Clover" << std::endl; - MdagMLinearOperator HermOp(Dw); + MdagMLinearOperator HermOp(Dw); result=Zero(); CG(HermOp,src,result); std::cout << GridLogMessage << "Testing Compact Wilson Clover" << std::endl; - MdagMLinearOperator HermOp_compact(Dw_compact); + MdagMLinearOperator HermOp_compact(Dw_compact); result=Zero(); CG(HermOp_compact,src,result); std::cout << GridLogMessage << "Testing Wilson Exp Clover" << std::endl; - MdagMLinearOperator HermOp_exp(Dwe); + MdagMLinearOperator HermOp_exp(Dwe); result=Zero(); CG(HermOp_exp,src,result); std::cout << GridLogMessage << "Testing Compact Wilson Exp Clover" << std::endl; - MdagMLinearOperator HermOp_exp_compact(Dwe_compact); + MdagMLinearOperator HermOp_exp_compact(Dwe_compact); result=Zero(); CG(HermOp_exp_compact,src,result); diff --git a/tests/solver/Test_wilsonclover_fcagmres_prec.cc b/tests/solver/Test_wilsonclover_fcagmres_prec.cc index 1a294821..77b2afff 100644 --- a/tests/solver/Test_wilsonclover_fcagmres_prec.cc +++ b/tests/solver/Test_wilsonclover_fcagmres_prec.cc @@ -44,8 +44,8 @@ int main (int argc, char ** argv) std::vector seeds({1,2,3,4}); GridParallelRNG pRNG(&Grid); pRNG.SeedFixedIntegers(seeds); - typedef typename WilsonCloverFermionR::FermionField FermionField; - typename WilsonCloverFermionR::ImplParams params; + typedef typename WilsonCloverFermionD::FermionField FermionField; + typename WilsonCloverFermionD::ImplParams params; WilsonAnisotropyCoefficients anis; FermionField src(&Grid); random(pRNG,src); @@ -61,9 +61,9 @@ int main (int argc, char ** argv) RealD mass = 0.5; RealD csw_r = 1.0; RealD csw_t = 1.0; - WilsonCloverFermionR Dwc(Umu,Grid,RBGrid,mass,csw_r,csw_t,anis,params); + WilsonCloverFermionD Dwc(Umu,Grid,RBGrid,mass,csw_r,csw_t,anis,params); - MdagMLinearOperator HermOp(Dwc); + MdagMLinearOperator HermOp(Dwc); TrivialPrecon simple; diff --git a/tests/solver/Test_wilsonclover_fgmres_prec.cc b/tests/solver/Test_wilsonclover_fgmres_prec.cc index 15bb4136..0f48871f 100644 --- a/tests/solver/Test_wilsonclover_fgmres_prec.cc +++ b/tests/solver/Test_wilsonclover_fgmres_prec.cc @@ -44,8 +44,8 @@ int main (int argc, char ** argv) std::vector seeds({1,2,3,4}); GridParallelRNG pRNG(&Grid); pRNG.SeedFixedIntegers(seeds); - typedef typename WilsonCloverFermionR::FermionField FermionField; - typename WilsonCloverFermionR::ImplParams params; + typedef typename WilsonCloverFermionD::FermionField FermionField; + typename WilsonCloverFermionD::ImplParams params; WilsonAnisotropyCoefficients anis; FermionField src(&Grid); random(pRNG,src); @@ -61,9 +61,9 @@ int main (int argc, char ** argv) RealD mass = 0.5; RealD csw_r = 1.0; RealD csw_t = 1.0; - WilsonCloverFermionR Dwc(Umu,Grid,RBGrid,mass,csw_r,csw_t,anis,params); + WilsonCloverFermionD Dwc(Umu,Grid,RBGrid,mass,csw_r,csw_t,anis,params); - MdagMLinearOperator HermOp(Dwc); + MdagMLinearOperator HermOp(Dwc); TrivialPrecon simple; diff --git a/tests/solver/Test_wilsonclover_gmres_unprec.cc b/tests/solver/Test_wilsonclover_gmres_unprec.cc index 00f33382..b660d716 100644 --- a/tests/solver/Test_wilsonclover_gmres_unprec.cc +++ b/tests/solver/Test_wilsonclover_gmres_unprec.cc @@ -44,8 +44,8 @@ int main (int argc, char ** argv) std::vector seeds({1,2,3,4}); GridParallelRNG pRNG(&Grid); pRNG.SeedFixedIntegers(seeds); - typedef typename WilsonCloverFermionR::FermionField FermionField; - typename WilsonCloverFermionR::ImplParams params; + typedef typename WilsonCloverFermionD::FermionField FermionField; + typename WilsonCloverFermionD::ImplParams params; WilsonAnisotropyCoefficients anis; FermionField src(&Grid); random(pRNG,src); @@ -61,9 +61,9 @@ int main (int argc, char ** argv) RealD mass = 0.5; RealD csw_r = 1.0; RealD csw_t = 1.0; - WilsonCloverFermionR Dwc(Umu,Grid,RBGrid,mass,csw_r,csw_t,anis,params); + WilsonCloverFermionD Dwc(Umu,Grid,RBGrid,mass,csw_r,csw_t,anis,params); - MdagMLinearOperator HermOp(Dwc); + MdagMLinearOperator HermOp(Dwc); GeneralisedMinimalResidual GMRES(1.0e-8, 10000, 25); GMRES(HermOp,src,result); diff --git a/tests/solver/Test_wilsonclover_mg.cc b/tests/solver/Test_wilsonclover_mg.cc index 605d225d..1b0e8bb7 100644 --- a/tests/solver/Test_wilsonclover_mg.cc +++ b/tests/solver/Test_wilsonclover_mg.cc @@ -80,16 +80,16 @@ int main(int argc, char **argv) { // Note: We do chiral doubling, so actually only nbasis/2 full basis vectors are used const int nbasis = 40; - WilsonCloverFermionR Dwc(Umu, *FGrid, *FrbGrid, mass, csw_r, csw_t); + WilsonCloverFermionD Dwc(Umu, *FGrid, *FrbGrid, mass, csw_r, csw_t); - MdagMLinearOperator MdagMOpDwc(Dwc); + MdagMLinearOperator MdagMOpDwc(Dwc); std::cout << GridLogMessage << "**************************************************" << std::endl; std::cout << GridLogMessage << "Testing Multigrid for Wilson Clover" << std::endl; std::cout << GridLogMessage << "**************************************************" << std::endl; TrivialPrecon TrivialPrecon; - auto MGPreconDwc = createMGInstance(mgParams, levelInfo, Dwc, Dwc); + auto MGPreconDwc = createMGInstance(mgParams, levelInfo, Dwc, Dwc); MGPreconDwc->setup(); diff --git a/tests/solver/Test_wilsonclover_mr_unprec.cc b/tests/solver/Test_wilsonclover_mr_unprec.cc index ab49ec1f..be721236 100644 --- a/tests/solver/Test_wilsonclover_mr_unprec.cc +++ b/tests/solver/Test_wilsonclover_mr_unprec.cc @@ -44,8 +44,8 @@ int main (int argc, char ** argv) std::vector seeds({1,2,3,4}); GridParallelRNG pRNG(&Grid); pRNG.SeedFixedIntegers(seeds); - typedef typename WilsonCloverFermionR::FermionField FermionField; - typename WilsonCloverFermionR::ImplParams params; + typedef typename WilsonCloverFermionD::FermionField FermionField; + typename WilsonCloverFermionD::ImplParams params; WilsonAnisotropyCoefficients anis; FermionField src(&Grid); random(pRNG,src); @@ -61,9 +61,9 @@ int main (int argc, char ** argv) RealD mass = 0.5; RealD csw_r = 1.0; RealD csw_t = 1.0; - WilsonCloverFermionR Dwc(Umu,Grid,RBGrid,mass,csw_r,csw_t,anis,params); + WilsonCloverFermionD Dwc(Umu,Grid,RBGrid,mass,csw_r,csw_t,anis,params); - MdagMLinearOperator HermOp(Dwc); + MdagMLinearOperator HermOp(Dwc); MinimalResidual MR(1.0e-8,10000,0.8); MR(HermOp,src,result); diff --git a/tests/solver/Test_zmobius_cg_prec.cc b/tests/solver/Test_zmobius_cg_prec.cc index 6b007afc..7f1f98b8 100644 --- a/tests/solver/Test_zmobius_cg_prec.cc +++ b/tests/solver/Test_zmobius_cg_prec.cc @@ -101,7 +101,7 @@ int main(int argc, char** argv) { omegas.push_back( std::complex(0.0686324988446592,-0.0550658530827402) ); #endif - ZMobiusFermionR Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, omegas,1.,0.); + ZMobiusFermionD Ddwf(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, mass, M5, omegas,1.,0.); LatticeFermion src_o(FrbGrid); LatticeFermion result_o(FrbGrid); @@ -110,7 +110,7 @@ int main(int argc, char** argv) { GridStopWatch CGTimer; - SchurDiagMooeeOperator HermOpEO(Ddwf); + SchurDiagMooeeOperator HermOpEO(Ddwf); ConjugateGradient CG(1.0e-8, 10000, 0);// switch off the assert CGTimer.Start(); @@ -121,7 +121,6 @@ int main(int argc, char** argv) { << std::endl; std::cout << GridLogMessage << "######## Dhop calls summary" << std::endl; - Ddwf.Report(); Grid_finalize(); }