Skip to content

Commit 355c71b

Browse files
author
Ralph Castain
authored
Merge pull request #4004 from artpol84/pmix_instdirs/master
pmix: fix PMIx envar name for the installation prefix.
2 parents 31171d0 + 71da0fc commit 355c71b

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

opal/mca/pmix/pmix2x/pmix2x_client.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
44
* Copyright (c) 2014-2017 Research Organization for Information Science
55
* and Technology (RIST). All rights reserved.
6-
* Copyright (c) 2014-2015 Mellanox Technologies, Inc.
6+
* Copyright (c) 2014-2017 Mellanox Technologies, Inc.
77
* All rights reserved.
88
* Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
99
* Copyright (c) 2016 Los Alamos National Security, LLC. All rights
@@ -78,8 +78,9 @@ int pmix2x_client_init(opal_list_t *ilist)
7878
asprintf(&dbgvalue, "PMIX_DEBUG=%d", dbg);
7979
putenv(dbgvalue);
8080
}
81-
if (NULL != (evar = getenv("OPAL_PREFIX"))) {
82-
opal_setenv("PMIX_PREFIX", evar, false, &environ);
81+
if ((NULL != (evar = getenv("OPAL_PREFIX"))) &&
82+
(NULL == getenv("PMIX_INSTALL_PREFIX"))) {
83+
opal_setenv("PMIX_INSTALL_PREFIX", evar, false, &environ);
8384
}
8485
}
8586

opal/mca/pmix/pmix2x/pmix2x_server_south.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Copyright (c) 2014-2017 Research Organization for Information Science
55
* and Technology (RIST). All rights reserved.
66
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
7-
* Copyright (c) 2014 Mellanox Technologies, Inc.
7+
* Copyright (c) 2014-2017 Mellanox Technologies, Inc.
88
* All rights reserved.
99
* Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
1010
* Copyright (c) 2017 Los Alamos National Security, LLC. All rights
@@ -109,8 +109,9 @@ int pmix2x_server_init(opal_pmix_server_module_t *module,
109109
asprintf(&dbgvalue, "PMIX_DEBUG=%d", dbg);
110110
putenv(dbgvalue);
111111
}
112-
if (NULL != (evar = getenv("OPAL_PREFIX"))) {
113-
opal_setenv("PMIX_PREFIX", evar, false, &environ);
112+
if ((NULL != (evar = getenv("OPAL_PREFIX"))) &&
113+
(NULL == getenv("PMIX_INSTALL_PREFIX"))) {
114+
opal_setenv("PMIX_INSTALL_PREFIX", evar, false, &environ);
114115
}
115116
}
116117
++opal_pmix_base.initialized;

orte/mca/plm/rsh/plm_rsh_module.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
1818
* Copyright (c) 2015-2017 Research Organization for Information Science
1919
* and Technology (RIST). All rights reserved.
20+
* Copyright (c) 2017 Mellanox Technologies, Inc. All rights reserved.
2021
* $COPYRIGHT$
2122
*
2223
* Additional copyrights may follow
@@ -344,6 +345,7 @@ static int setup_launch(int *argcptr, char ***argvptr,
344345
bool found;
345346
char *lib_base=NULL, *bin_base=NULL;
346347
char *opal_prefix = getenv("OPAL_PREFIX");
348+
char *pmix_prefix = getenv("PMIX_INSTALL_PREFIX");
347349
char* full_orted_cmd = NULL;
348350

349351
/* Figure out the basenames for the libdir and bindir. This
@@ -497,13 +499,16 @@ static int setup_launch(int *argcptr, char ***argvptr,
497499
* we have to insert the orted_prefix in the right place
498500
*/
499501
(void)asprintf (&final_cmd,
500-
"%s%s%s PATH=%s%s$PATH ; export PATH ; "
502+
"%s%s%s %s%s%s PATH=%s%s$PATH ; export PATH ; "
501503
"LD_LIBRARY_PATH=%s%s$LD_LIBRARY_PATH ; export LD_LIBRARY_PATH ; "
502504
"DYLD_LIBRARY_PATH=%s%s$DYLD_LIBRARY_PATH ; export DYLD_LIBRARY_PATH ; "
503505
"%s %s",
504506
(opal_prefix != NULL ? "OPAL_PREFIX=" : " "),
505507
(opal_prefix != NULL ? opal_prefix : " "),
506508
(opal_prefix != NULL ? " ; export OPAL_PREFIX;" : " "),
509+
(pmix_prefix != NULL ? "PMIX_INSTALL_PREFIX=" : " "),
510+
(pmix_prefix != NULL ? pmix_prefix : " "),
511+
(pmix_prefix != NULL ? " ; export PMIX_INSTALL_PREFIX;" : " "),
507512
(NULL != bin_base ? bin_base : " "),
508513
(NULL != bin_base ? ":" : " "),
509514
(NULL != lib_base ? lib_base : " "),

0 commit comments

Comments
 (0)