diff --git a/tests/solver/Test_hw_multigrid.cc b/tests/solver/Test_hw_multigrid.cc index b531decc..26e6a025 100644 --- a/tests/solver/Test_hw_multigrid.cc +++ b/tests/solver/Test_hw_multigrid.cc @@ -311,7 +311,6 @@ public: Vector &diag, Vector &upper) { - chi_i.Checkerboard()=psi_i.Checkerboard(); GridBase *grid=psi_i.Grid(); autoView(psi , psi_i,AcceleratorRead); @@ -328,7 +327,9 @@ public: // 10 = 3 complex mult + 2 complex add // Flops = 10.0*(Nc*Ns) *Ls*vol (/2 for red black counting) uint64_t nloop = grid->oSites()/Ls; - accelerator_for(sss,nloop,Simd::Nsimd(),{ + + const int Nsimd = Field::vector_type::Nsimd(); + accelerator_for(sss,nloop,Nsimd,{ uint64_t ss= sss*Ls; typedef decltype(coalescedRead(psi[0])) spinor; spinor tmp1, tmp2; @@ -362,7 +363,8 @@ public: int Ls=this->Ls; uint64_t nloop = grid->oSites()/Ls; - accelerator_for(sss,nloop,Simd::Nsimd(),{ + const int Nsimd = Field::vector_type::Nsimd(); + accelerator_for(sss,nloop,Nsimd,{ uint64_t ss=sss*Ls; typedef decltype(coalescedRead(psi[0])) spinor; spinor tmp1,tmp2; @@ -406,8 +408,8 @@ public: Coarse4D(&CoarseGrid4), Coarse5D(&CoarseGrid5), Dw(_Dw), - geom(CoarseGrid4._ndimension), - Stencil( &CoarseGrid4,geom.npoint,Even,geom.directions,geom.displacements,0) + geom(CoarseGrid5._ndimension), + Stencil( &CoarseGrid5,geom.npoint,Even,geom.directions,geom.displacements,0) { }; @@ -428,8 +430,8 @@ public: autoView( out_v , out, AcceleratorWrite); typedef LatticeView Aview; + std::cout << "Dw"< AcceleratorViewContainer; - for(int p=0;pLs; + std::cout << "Dw for2d"< Level1Op5; Level1Op4 c_Dw (*Coarse4d,0); - Level1Op5 c_Dwf (*Coarse4d,*Coarse5d,c_Dw,M5, mass, Ls, 1.0,0.0); + std::cout< LinOpDw(Dw); + std::cout< CoarseMdagM(c_Dwf); + ConjugateGradient CoarseCG(tol,MaxIt); + // BiCGSTAB CoarseBiCGSTAB(tol,MaxIt); + + c_res=Zero(); + CoarseCG(CoarseMdagM,c_src,c_res); std::cout<