From 60b57706c4bd264b39a765835d2cff0c19722bf0 Mon Sep 17 00:00:00 2001 From: Guido Cossu Date: Wed, 21 Mar 2018 13:57:30 +0000 Subject: [PATCH] Small bug fix in the shm file names --- lib/communicator/SharedMemoryMPI.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/communicator/SharedMemoryMPI.cc b/lib/communicator/SharedMemoryMPI.cc index 8eebdc0f..d534a6d9 100644 --- a/lib/communicator/SharedMemoryMPI.cc +++ b/lib/communicator/SharedMemoryMPI.cc @@ -325,7 +325,8 @@ void GlobalSharedMemory::SharedMemoryAllocate(uint64_t bytes, int flags) size_t size = bytes ; - sprintf(shm_name,"/Grid_mpi3_shm_%d_%d",WorldNode,r); + struct passwd *pw = getpwuid (getuid()); + sprintf(shm_name,"/Grid_%s_mpi3_shm_%d_%d",pw->pw_name,WorldNode,r); int fd=shm_open(shm_name,O_RDWR,0666); if ( fd<0 ) { perror("failed shm_open"); assert(0); }