mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-11-03 21:44:33 +00:00 
			
		
		
		
	EO bug fix when spread out in x-direction
This commit is contained in:
		@@ -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 "<<dimension<<"cb "<<_checkerboard<<"shift "<<shift<<" sshift " << sshift[0]<<" "<<sshift[1]<<std::endl;
 | 
			
		||||
	    if ( sshift[0] == sshift[1] ) {
 | 
			
		||||
	      if (splice_dim) {
 | 
			
		||||
		GatherStartCommsSimd(source,dimension,shift,0x3,u_comm_buf,u_comm_offset,compress);
 | 
			
		||||
@@ -180,7 +181,7 @@ namespace Grid {
 | 
			
		||||
 | 
			
		||||
	    if (comm_proc) {
 | 
			
		||||
	      
 | 
			
		||||
	      int words = send_buf.size();
 | 
			
		||||
	      int words = buffer_size;
 | 
			
		||||
	      if (cbmask != 0x3) words=words>>1;
 | 
			
		||||
	    
 | 
			
		||||
	      int bytes = words * sizeof(cobj);
 | 
			
		||||
@@ -201,10 +202,11 @@ namespace Grid {
 | 
			
		||||
				   recv_from_rank,
 | 
			
		||||
				   bytes);
 | 
			
		||||
 | 
			
		||||
	      for(int i=0;i<buffer_size;i++){
 | 
			
		||||
	      for(int i=0;i<words;i++){
 | 
			
		||||
		u_comm_buf[u_comm_offset+i]=recv_buf[i];
 | 
			
		||||
		//		std::cout << " Halo["<<i<<"] snd "<<send_buf[i]<< " rcv "<<recv_buf[i]<<"  mask 0x"<<cbmask<<std::endl;
 | 
			
		||||
	      }
 | 
			
		||||
	      u_comm_offset+=buffer_size;
 | 
			
		||||
	      u_comm_offset+=words;
 | 
			
		||||
	    }
 | 
			
		||||
	  }
 | 
			
		||||
	}
 | 
			
		||||
@@ -241,6 +243,7 @@ namespace Grid {
 | 
			
		||||
	  int buffer_size = _grid->_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 
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user