Skip to content

Commit

Permalink
osc/rdma: add pid to shm file name
Browse files Browse the repository at this point in the history
Current shm file name used by osc/rdma is not unique when multiple
communicator are on the same instance. This patch add the local
leader's pid to the file name to address the issue.

Signed-off-by: Wei Zhang <[email protected]>
  • Loading branch information
wzamazon committed Sep 27, 2021
1 parent 4a845a9 commit 3c0ae03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ompi/mca/osc/rdma/osc_rdma_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,9 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s

if (0 == local_rank) {
/* allocate the shared memory segment */
ret = opal_asprintf (&data_file, "%s" OPAL_PATH_SEP "osc_rdma.%s.%x.%d",
ret = opal_asprintf (&data_file, "%s" OPAL_PATH_SEP "osc_rdma.%s.%x.%d.%d",
mca_osc_rdma_component.backing_directory, ompi_process_info.nodename,
OMPI_PROC_MY_NAME->jobid, ompi_comm_get_cid(module->comm));
OMPI_PROC_MY_NAME->jobid, ompi_comm_get_cid(module->comm), getpid());
if (0 > ret) {
ret = OMPI_ERR_OUT_OF_RESOURCE;
} else {
Expand Down

0 comments on commit 3c0ae03

Please sign in to comment.