diff --git a/lib/cshift/Cshift_common.h b/lib/cshift/Cshift_common.h index 7551a1f8..8c429723 100644 --- a/lib/cshift/Cshift_common.h +++ b/lib/cshift/Cshift_common.h @@ -47,12 +47,13 @@ Gather_plane_simple (const Lattice &rhs,commVector &buffer,int dimen int e2=rhs.Grid()->_slice_block[dimension]; int stride=rhs.Grid()->_slice_stride[dimension]; + auto rhs_v = rhs.View(); if ( cbmask == 0x3 ) { thread_loop_collapse2( (int n=0;n &rhs,commVector &buffer,int dimen } } thread_loop( (int i=0;i &rhs,ExtractPointerArray_slice_block[dimension]; int n1=rhs.Grid()->_slice_stride[dimension]; + auto rhs_v = rhs.View(); if ( cbmask ==0x3){ thread_loop_collapse2( (int n=0;n &rhs,ExtractPointerArray(temp,pointers,offset); } @@ -116,7 +118,7 @@ Gather_plane_extract(const Lattice &rhs,ExtractPointerArray(temp,pointers,offset); } } @@ -140,13 +142,13 @@ template void Scatter_plane_simple (Lattice &rhs,commVector_slice_nblock[dimension]; int e2=rhs.Grid()->_slice_block[dimension]; int stride=rhs.Grid()->_slice_stride[dimension]; - + auto rhs_v = rhs.View(); if ( cbmask ==0x3 ) { thread_loop_collapse2( (int n=0;n_slice_stride[dimension]; int bo =n*rhs.Grid()->_slice_block[dimension]; - rhs[so+o+b]=buffer[bo+b]; + rhs_v[so+o+b]=buffer[bo+b]; } }); } else { @@ -162,7 +164,7 @@ template void Scatter_plane_simple (Lattice &rhs,commVector void Scatter_plane_merge(Lattice &rhs,ExtractPointerA int e1=rhs.Grid()->_slice_nblock[dimension]; int e2=rhs.Grid()->_slice_block[dimension]; + auto rhs_v = rhs.View(); if(cbmask ==0x3 ) { thread_loop_collapse2( (int n=0;n_slice_stride[dimension]; int offset = b+n*rhs.Grid()->_slice_block[dimension]; - merge(rhs[so+o+b],pointers,offset); + merge(rhs_v[so+o+b],pointers,offset); } }); } else { // Case of SIMD split AND checker dim cannot currently be hit, except in // Test_cshift_red_black code. - // std::cout << "Scatter_plane merge assert(0); think this is buggy FIXME "<< std::endl;// think this is buggy FIXME + // std::cout << "Scatter_plane merge assert(0); think this is buggy FIXME "<< std::endl; + // think this is buggy FIXME std::cout<<" Unthreaded warning -- buffer is not densely packed ??"< void Scatter_plane_merge(Lattice &rhs,ExtractPointerA int offset = b+n*rhs.Grid()->_slice_block[dimension]; int ocb=1<CheckerBoardFromOindex(o+b); if ( ocb&cbmask ) { - merge(rhs[so+o+b],pointers,offset); + merge(rhs_v[so+o+b],pointers,offset); } } } diff --git a/lib/cshift/Cshift_mpi.h b/lib/cshift/Cshift_mpi.h index 30ffb457..1ee2233c 100644 --- a/lib/cshift/Cshift_mpi.h +++ b/lib/cshift/Cshift_mpi.h @@ -142,7 +142,7 @@ template void Cshift_comms(Lattice &ret,const Lattice &r Gather_plane_simple (rhs,send_buf,dimension,sx,cbmask); - int rank = grid->_processor; + // int rank = grid->_processor; int recv_from_rank; int xmit_to_rank; grid->ShiftedRanks(dimension,comm_proc,xmit_to_rank,recv_from_rank); @@ -186,7 +186,7 @@ template void Cshift_comms_simd(Lattice &ret,const Lattice_slice_nblock[dimension]*grid->_slice_block[dimension]; - int words = sizeof(vobj)/sizeof(vector_type); + // int words = sizeof(vobj)/sizeof(vector_type); std::vector > send_buf_extract(Nsimd,commVector(buffer_size) ); std::vector > recv_buf_extract(Nsimd,commVector(buffer_size) );