Skip to content

Commit f86b558

Browse files
hjelmnPeter Gottesman
authored andcommitted
osc/sm: avoid filename collision when multiple windows share same CID
This commit fixes an issue identified by MTT where we can have two different sets of processes on the same node creating a shared memory window with communicators sharing the same CID. To avoid this issue the temporary filename now includes the creating processes vpid. References #5363 Signed-off-by: Nathan Hjelm <[email protected]> (cherry picked from commit 35a75a6) Signed-off-by: Peter Gottesman <[email protected]>
1 parent ea135ed commit f86b558

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ompi/mca/osc/sm/osc_sm_component.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,9 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit
282282
posts_size += OPAL_ALIGN_PAD_AMOUNT(posts_size, 64);
283283
if (0 == ompi_comm_rank (module->comm)) {
284284
char *data_file;
285-
ret = asprintf (&data_file, "%s" OPAL_PATH_SEP "osc_sm.%s.%x.%d",
286-
mca_osc_sm_component.backing_directory, ompi_process_info.nodename,
287-
OMPI_PROC_MY_NAME->jobid, ompi_comm_get_cid(module->comm));
285+
ret = asprintf (&data_file, "%s" OPAL_PATH_SEP "osc_sm.%s.%x.%d.%d",
286+
mca_osc_sm_component.backing_directory, ompi_process_info.nodename,
287+
OMPI_PROC_MY_NAME->jobid, (int) OMPI_PROC_MY_NAME->vpid, ompi_comm_get_cid(module->comm));
288288
if (ret < 0) {
289289
return OMPI_ERR_OUT_OF_RESOURCE;
290290
}

0 commit comments

Comments
 (0)