From e33878e0de5ed40d5c1995743e59ccb39431d757 Mon Sep 17 00:00:00 2001 From: Christoph Lehner Date: Thu, 6 Aug 2020 11:50:24 +0200 Subject: [PATCH 1/3] Trigger re-run of CI --- Grid/allocator/MemoryManager.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/Grid/allocator/MemoryManager.cc b/Grid/allocator/MemoryManager.cc index b79c7df3..c1a4d93a 100644 --- a/Grid/allocator/MemoryManager.cc +++ b/Grid/allocator/MemoryManager.cc @@ -140,6 +140,7 @@ void MemoryManager::Init(void) } void MemoryManager::InitMessage(void) { + #ifndef GRID_UVM std::cout << GridLogMessage << "MemoryManager Cache "<< MemoryManager::DeviceMaxBytes <<" bytes "< Date: Thu, 6 Aug 2020 14:42:38 +0200 Subject: [PATCH 2/3] when using SHM_NONE allow multiple ranks per node but without using shared memory --- Grid/communicator/SharedMemoryMPI.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Grid/communicator/SharedMemoryMPI.cc b/Grid/communicator/SharedMemoryMPI.cc index 45fefc71..0ee55a1c 100644 --- a/Grid/communicator/SharedMemoryMPI.cc +++ b/Grid/communicator/SharedMemoryMPI.cc @@ -47,7 +47,12 @@ void GlobalSharedMemory::Init(Grid_MPI_Comm comm) ///////////////////////////////////////////////////////////////////// // Split into groups that can share memory ///////////////////////////////////////////////////////////////////// +#ifndef GRID_MPI3_SHM_NONE MPI_Comm_split_type(comm, MPI_COMM_TYPE_SHARED, 0, MPI_INFO_NULL,&WorldShmComm); +#else + MPI_Comm_split(comm, WorldRank, 0, &WorldShmComm); +#endif + MPI_Comm_rank(WorldShmComm ,&WorldShmRank); MPI_Comm_size(WorldShmComm ,&WorldShmSize); @@ -705,7 +710,11 @@ void SharedMemory::SetCommunicator(Grid_MPI_Comm comm) ///////////////////////////////////////////////////////////////////// // Split into groups that can share memory ///////////////////////////////////////////////////////////////////// +#ifndef GRID_MPI3_SHM_NONE MPI_Comm_split_type(comm, MPI_COMM_TYPE_SHARED, 0, MPI_INFO_NULL,&ShmComm); +#else + MPI_Comm_split(comm, rank, 0, &ShmComm); +#endif MPI_Comm_rank(ShmComm ,&ShmRank); MPI_Comm_size(ShmComm ,&ShmSize); ShmCommBufs.resize(ShmSize); From 69db4816f72bb6e88aa88145ad247a6028364a62 Mon Sep 17 00:00:00 2001 From: Christoph Lehner Date: Thu, 6 Aug 2020 16:57:16 +0200 Subject: [PATCH 3/3] fix variable capture in Scatter_plane_merge on accelerators --- Grid/cshift/Cshift_common.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Grid/cshift/Cshift_common.h b/Grid/cshift/Cshift_common.h index 4de2bbe2..d296c024 100644 --- a/Grid/cshift/Cshift_common.h +++ b/Grid/cshift/Cshift_common.h @@ -209,9 +209,11 @@ template void Scatter_plane_merge(Lattice &rhs,ExtractPointerA if(cbmask ==0x3 ) { autoView( rhs_v , rhs, AcceleratorWrite); + int _slice_stride = rhs.Grid()->_slice_stride[dimension]; + int _slice_block = rhs.Grid()->_slice_block[dimension]; accelerator_for2d(n,e1,b,e2,1,{ - int o = n*rhs.Grid()->_slice_stride[dimension]; - int offset = b+n*rhs.Grid()->_slice_block[dimension]; + int o = n*_slice_stride; + int offset = b+n*_slice_block; merge(rhs_v[so+o+b],pointers,offset); }); } else {