From ec5af35166167ab2582dab0d18cab18f66e2513a Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Wed, 4 Nov 2015 09:56:58 +0000 Subject: [PATCH] EO bug fix when spread out in x-direction --- lib/Stencil.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/Stencil.h b/lib/Stencil.h index c6e51059..d73db237 100644 --- a/lib/Stencil.h +++ b/lib/Stencil.h @@ -124,6 +124,7 @@ namespace Grid { if ( comm_dim ) { sshift[0] = _grid->CheckerBoardShiftForCB(_checkerboard,dimension,shift,Even); sshift[1] = _grid->CheckerBoardShiftForCB(_checkerboard,dimension,shift,Odd); + // std::cout << "dim "<=0); assert(shift_slice_nblock[dimension]*_grid->_slice_block[dimension]; - + std::vector > send_buf(buffer_size); // hmm... std::vector > recv_buf(buffer_size); - + int cb= (cbmask==0x2)? Odd : Even; int sshift= _grid->CheckerBoardShiftForCB(rhs.checkerboard,dimension,shift,cb); - + for(int x=0;x>1; int bytes = words * sizeof(cobj); @@ -201,10 +202,11 @@ namespace Grid { recv_from_rank, bytes); - for(int i=0;i_slice_nblock[dimension]*_grid->_slice_block[dimension]; int words = sizeof(cobj)/sizeof(vector_type); + assert(cbmask==0x3); // Fixme think there is a latent bug if not true /* * possibly slow to allocate * Doesn't matter in this test, but may want to preallocate in the