From b95b1b4cd7f19768cf2eac9b155ec1ceb5b750e2 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Tue, 13 Apr 2021 08:01:51 -0700 Subject: [PATCH] Add the userid to the sm backing file path Avoid potential conflicts Signed-off-by: Ralph Castain --- opal/mca/btl/sm/btl_sm_component.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opal/mca/btl/sm/btl_sm_component.c b/opal/mca/btl/sm/btl_sm_component.c index da9b3632a5f..a7040296b62 100644 --- a/opal/mca/btl/sm/btl_sm_component.c +++ b/opal/mca/btl/sm/btl_sm_component.c @@ -22,6 +22,7 @@ * Copyright (c) 2018 Triad National Security, LLC. All rights * reserved. * Copyright (c) 2019-2020 Google, Inc. All rights reserved. + * Copyright (c) 2021 Nanook Consulting. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -546,9 +547,9 @@ mca_btl_sm_component_init(int *num_btls, bool enable_progress_threads, bool enab if (MCA_BTL_SM_XPMEM != mca_btl_sm_component.single_copy_mechanism) { char *sm_file; - rc = opal_asprintf(&sm_file, "%s" OPAL_PATH_SEP "sm_segment.%s.%x.%d", + rc = opal_asprintf(&sm_file, "%s" OPAL_PATH_SEP "sm_segment.%s.%u.%x.%d", mca_btl_sm_component.backing_directory, opal_process_info.nodename, - OPAL_PROC_MY_NAME.jobid, MCA_BTL_SM_LOCAL_RANK); + geteuid(), OPAL_PROC_MY_NAME.jobid, MCA_BTL_SM_LOCAL_RANK); if (0 > rc) { free(btls); return NULL;