diff --git a/lib/communicator/SharedMemoryMPI.cc b/lib/communicator/SharedMemoryMPI.cc index 1fa84dfb..8eebdc0f 100644 --- a/lib/communicator/SharedMemoryMPI.cc +++ b/lib/communicator/SharedMemoryMPI.cc @@ -27,6 +27,7 @@ Author: Peter Boyle /* END LEGAL */ #include +#include namespace Grid { @@ -288,7 +289,8 @@ void GlobalSharedMemory::SharedMemoryAllocate(uint64_t bytes, int flags) size_t size = bytes; - sprintf(shm_name,"/myGrid_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); shm_unlink(shm_name); int fd=shm_open(shm_name,O_RDWR|O_CREAT,0666);