diff --git a/benchmarks/Benchmark_dwf.cc b/benchmarks/Benchmark_dwf.cc index cd14d538..a40939fd 100644 --- a/benchmarks/Benchmark_dwf.cc +++ b/benchmarks/Benchmark_dwf.cc @@ -71,7 +71,6 @@ int main (int argc, char ** argv) std::cout << GridLogMessage << "Making s innermost grids"< WilsonFermion5DF; LatticeFermionF ssrc(sFGrid); LatticeFermionF sref(sFGrid); LatticeFermionF sresult(sFGrid); - WilsonFermion5DF sDw(1,Umu,*sFGrid,*sFrbGrid,*sUGrid,*sUrbGrid,M5,params); + WilsonFermion5DF sDw(1,Umu,*sFGrid,*sFrbGrid,*sUGrid,M5,params); for(int x=0;x0); // all elements of a simd vector must have same checkerboard. - // - // If Ls vectorised, this must still be the case; e.g. - // layout == 8 , require _rdimensions[d] >= 2; - // std::cout << GridLogMessage << " dimension "<1 ) { - if ( _rdimensions[d]&0x1 ) { - std::cout << GridLogMessage << " dimension "<::WilsonFermion5D(GaugeField &_Umu, } template -WilsonFermion5D::WilsonFermion5D(int simd, GaugeField &_Umu, +WilsonFermion5D::WilsonFermion5D(int simd,GaugeField &_Umu, GridCartesian &FiveDimGrid, GridRedBlackCartesian &FiveDimRedBlackGrid, GridCartesian &FourDimGrid, - GridRedBlackCartesian &FourDimRedBlackGrid, RealD _M5,const ImplParams &p) : Kernels(p), _FiveDimGrid (&FiveDimGrid), _FiveDimRedBlackGrid(&FiveDimRedBlackGrid), _FourDimGrid (&FourDimGrid), - _FourDimRedBlackGrid(&FourDimRedBlackGrid), Stencil (_FiveDimGrid,npoint,Even,directions,displacements), StencilEven(_FiveDimRedBlackGrid,npoint,Even,directions,displacements), // source is Even StencilOdd (_FiveDimRedBlackGrid,npoint,Odd ,directions,displacements), // source is Odd M5(_M5), Umu(_FourDimGrid), - UmuEven(_FourDimRedBlackGrid), - UmuOdd (_FourDimRedBlackGrid), + UmuEven(_FourDimGrid), + UmuOdd (_FourDimGrid), Lebesgue(_FourDimGrid), - LebesgueEvenOdd(_FourDimRedBlackGrid) + LebesgueEvenOdd(_FourDimGrid) { int nsimd = Simd::Nsimd(); @@ -131,7 +129,6 @@ WilsonFermion5D::WilsonFermion5D(int simd, GaugeField &_Umu, assert(FiveDimRedBlackGrid._ndimension==5); assert(FiveDimRedBlackGrid._checker_dim==0); // Checkerboard the s-direction assert(FourDimGrid._ndimension==4); - assert(FourDimRedBlackGrid._ndimension==4); // Dimension zero of the five-d is the Ls direction Ls=FiveDimGrid._fdimensions[0]; @@ -144,15 +141,10 @@ WilsonFermion5D::WilsonFermion5D(int simd, GaugeField &_Umu, // Other dimensions must match the decomposition of the four-D fields for(int d=0;d<4;d++){ - assert(FourDimRedBlackGrid._fdimensions[d] ==FourDimGrid._fdimensions[d]); assert(FiveDimRedBlackGrid._fdimensions[d+1]==FourDimGrid._fdimensions[d]); - - assert(FourDimRedBlackGrid._processors[d] ==FourDimGrid._processors[d]); assert(FiveDimRedBlackGrid._processors[d+1] ==FourDimGrid._processors[d]); assert(FourDimGrid._simd_layout[d]=1); - assert(FourDimRedBlackGrid._simd_layout[d] ==1); - assert(FourDimRedBlackGrid._simd_layout[d] ==1); assert(FiveDimRedBlackGrid._simd_layout[d+1]==1); assert(FiveDimGrid._fdimensions[d+1] ==FourDimGrid._fdimensions[d]); @@ -160,8 +152,13 @@ WilsonFermion5D::WilsonFermion5D(int simd, GaugeField &_Umu, assert(FiveDimGrid._simd_layout[d+1] ==FourDimGrid._simd_layout[d]); } - // Allocate the required comms buffer - ImportGauge(_Umu); + { + GaugeField HUmu(_Umu._grid); + HUmu = _Umu*(-0.5); + Impl::DoubleStore(GaugeGrid(),Umu,HUmu); + UmuEven=Umu;// Really want a reference. + UmuOdd =Umu; + } } diff --git a/lib/qcd/action/fermion/WilsonFermion5D.h b/lib/qcd/action/fermion/WilsonFermion5D.h index 27bd3802..dc1f16e2 100644 --- a/lib/qcd/action/fermion/WilsonFermion5D.h +++ b/lib/qcd/action/fermion/WilsonFermion5D.h @@ -134,7 +134,6 @@ namespace Grid { GridCartesian &FiveDimGrid, GridRedBlackCartesian &FiveDimRedBlackGrid, GridCartesian &FourDimGrid, - GridRedBlackCartesian &FourDimRedBlackGrid, double _M5,const ImplParams &p= ImplParams()); // DoubleStore diff --git a/tests/Test_dwf_rb5d.cc b/tests/Test_dwf_rb5d.cc index 8fa1721a..564191fb 100644 --- a/tests/Test_dwf_rb5d.cc +++ b/tests/Test_dwf_rb5d.cc @@ -97,7 +97,7 @@ int main (int argc, char ** argv) RealD M5 =1.8; typename WilsonFermion5DR::ImplParams params; - WilsonFermion5DR Dw(1,Umu,*FGrid,*FrbGrid,*sUGrid,*sUrbGrid,M5,params); + WilsonFermion5DR Dw(1,Umu,*FGrid,*FrbGrid,*sUGrid,M5,params); Dw.Dhop(src,result,0);