diff --git a/Grid/communicator/SharedMemoryMPI.cc b/Grid/communicator/SharedMemoryMPI.cc index 0ee55a1c..8b27ab7a 100644 --- a/Grid/communicator/SharedMemoryMPI.cc +++ b/Grid/communicator/SharedMemoryMPI.cc @@ -448,7 +448,11 @@ void GlobalSharedMemory::SharedMemoryAllocate(uint64_t bytes, int flags) /////////////////////////////////////////////////////////////////////////////////////////////////////////// // Each MPI rank should allocate our own buffer /////////////////////////////////////////////////////////////////////////////////////////////////////////// +#ifndef GRID_MPI3_SHM_NONE auto err = cudaMalloc(&ShmCommBuf, bytes); +#else + auto err = cudaMallocManaged(&ShmCommBuf, bytes); +#endif if ( err != cudaSuccess) { std::cerr << " SharedMemoryMPI.cc cudaMallocManaged failed for " << bytes<<" bytes " < compress; myStencil.HaloExchange(Foo,compress); Bar = Cshift(Foo,dir,disp); + std::cout << GridLogMessage << "B" << std::endl; + // Implement a stencil code that should agree with cshift! for(int i=0;ioSites();i++){ @@ -117,8 +121,8 @@ int main(int argc, char ** argv) { check[i] = foo[SE->_offset]; else { check[i] = myStencil.CommBuf()[SE->_offset]; - // std::cout << " receive "<