diff --git a/lib/communicator/SharedMemoryMPI.cc b/lib/communicator/SharedMemoryMPI.cc index 4b74f3e9..4a288979 100644 --- a/lib/communicator/SharedMemoryMPI.cc +++ b/lib/communicator/SharedMemoryMPI.cc @@ -42,9 +42,14 @@ void GlobalSharedMemory::Init(Grid_MPI_Comm comm) ///////////////////////////////////////////////////////////////////// // Split into groups that can share memory ///////////////////////////////////////////////////////////////////// +#ifdef GRID_NVCC + MPI_Comm_split(comm, WorldRank , 0,&WorldShmComm); +#else MPI_Comm_split_type(comm, MPI_COMM_TYPE_SHARED, 0, MPI_INFO_NULL,&WorldShmComm); +#endif MPI_Comm_rank(WorldShmComm ,&WorldShmRank); MPI_Comm_size(WorldShmComm ,&WorldShmSize); + std::cout << " Shared communicator of size " <