diff --git a/Grid/lattice/Lattice_transfer.h b/Grid/lattice/Lattice_transfer.h index ef489ea6..3895ad46 100644 --- a/Grid/lattice/Lattice_transfer.h +++ b/Grid/lattice/Lattice_transfer.h @@ -658,9 +658,9 @@ void localCopyRegion(const Lattice &From,Lattice & To,Coordinate Fro Coordinate ist = Tg->_istride; Coordinate ost = Tg->_ostride; - autoView( t_v , To, AcceleratorWrite); - autoView( f_v , From, AcceleratorRead); - accelerator_for(idx,Fg->lSites(),1,{ + autoView( t_v , To, CpuWrite); + autoView( f_v , From, CpuRead); + thread_for(idx,Fg->lSites(),{ sobj s; Coordinate Fcoor(nd); Coordinate Tcoor(nd); @@ -673,15 +673,20 @@ void localCopyRegion(const Lattice &From,Lattice & To,Coordinate Fro Tcoor[d] = ToLowerLeft[d]+ Fcoor[d]-FromLowerLeft[d]; } if (in_region) { - Integer idx_f = 0; for(int d=0;d &lowDim, Lattice & higherDim,int for(int d=0;d_processors[d] == hg->_processors[d]); - assert(lg->_ldimensions[d] == hg->_ldimensions[d]); - } + assert(lg->_processors[d] == hg->_processors[d]); + assert(lg->_ldimensions[d] == hg->_ldimensions[d]); + } } // the above should guarantee that the operations are local