Skip to content

Commit b5bec96

Browse files
authored
Merge pull request #10690 from jjhursey/sm-node-rank
btl/sm: Use node rank instead of local rank for sm backing file
2 parents 8c6e910 + 9cef06a commit b5bec96

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

opal/mca/btl/sm/btl_sm_component.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* reserved.
2424
* Copyright (c) 2019-2021 Google, Inc. All rights reserved.
2525
* Copyright (c) 2021 Nanook Consulting. All rights reserved.
26+
* Copyright (c) 2022 IBM Corporation. All rights reserved.
2627
* $COPYRIGHT$
2728
*
2829
* Additional copyrights may follow
@@ -367,9 +368,11 @@ mca_btl_sm_component_init(int *num_btls, bool enable_progress_threads, bool enab
367368

368369
char *sm_file;
369370

371+
// Note: Use the node_rank not the local_rank for the backing file.
372+
// This makes the file unique even when recovering from failures.
370373
rc = opal_asprintf(&sm_file, "%s" OPAL_PATH_SEP "sm_segment.%s.%u.%x.%d",
371374
mca_btl_sm_component.backing_directory, opal_process_info.nodename,
372-
geteuid(), OPAL_PROC_MY_NAME.jobid, MCA_BTL_SM_LOCAL_RANK);
375+
geteuid(), OPAL_PROC_MY_NAME.jobid, opal_process_info.my_node_rank);
373376
if (0 > rc) {
374377
free(btls);
375378
return NULL;

0 commit comments

Comments
 (0)