Skip to content

Commit 69612b3

Browse files
author
Ralph Castain
authored
Merge pull request #3990 from rhc54/topic/p2
Move handling of OPAL_PREFIX to PMIX_PREFIX down into embedded PMIx integration code
2 parents c4ae36f + 8f34fa4 commit 69612b3

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

opal/mca/pmix/pmix2x/pmix2x_client.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "opal/hash_string.h"
3030
#include "opal/threads/threads.h"
3131
#include "opal/util/argv.h"
32+
#include "opal/util/opal_environ.h"
3233
#include "opal/util/proc.h"
3334

3435
#include "opal/mca/pmix/base/base.h"
@@ -65,6 +66,7 @@ int pmix2x_client_init(opal_list_t *ilist)
6566
pmix_info_t *pinfo;
6667
size_t ninfo, n;
6768
opal_value_t *ival;
69+
char *evar;
6870

6971
opal_output_verbose(1, opal_pmix_base_framework.framework_output,
7072
"PMIx_client init");
@@ -76,6 +78,9 @@ int pmix2x_client_init(opal_list_t *ilist)
7678
asprintf(&dbgvalue, "PMIX_DEBUG=%d", dbg);
7779
putenv(dbgvalue);
7880
}
81+
if (NULL != (evar = getenv("OPAL_PREFIX"))) {
82+
opal_setenv("PMIX_PREFIX", evar, false, &environ);
83+
}
7984
}
8085

8186
/* convert the incoming list to info structs */

opal/mca/pmix/pmix2x/pmix2x_server_south.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "opal/util/argv.h"
3737
#include "opal/util/error.h"
3838
#include "opal/util/output.h"
39+
#include "opal/util/opal_environ.h"
3940
#include "opal/util/proc.h"
4041
#include "opal/util/show_help.h"
4142
#include "opal/mca/pmix/base/base.h"
@@ -99,6 +100,7 @@ int pmix2x_server_init(opal_pmix_server_module_t *module,
99100
opal_pmix2x_event_t *event;
100101
opal_pmix2x_jobid_trkr_t *job;
101102
opal_pmix_lock_t lk;
103+
char *evar;
102104

103105
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
104106

@@ -107,6 +109,9 @@ int pmix2x_server_init(opal_pmix_server_module_t *module,
107109
asprintf(&dbgvalue, "PMIX_DEBUG=%d", dbg);
108110
putenv(dbgvalue);
109111
}
112+
if (NULL != (evar = getenv("OPAL_PREFIX"))) {
113+
opal_setenv("PMIX_PREFIX", evar, false, &environ);
114+
}
110115
}
111116
++opal_pmix_base.initialized;
112117

orte/mca/ess/base/ess_base_std_prolog.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2017 Intel, Inc. All rights reserved.
1312
* $COPYRIGHT$
1413
*
1514
* Additional copyrights may follow
@@ -29,7 +28,6 @@
2928
#include <unistd.h>
3029
#endif
3130

32-
#include "opal/util/opal_environ.h"
3331
#include "orte/mca/errmgr/errmgr.h"
3432
#include "orte/util/show_help.h"
3533
#include "orte/runtime/orte_wait.h"
@@ -41,7 +39,6 @@ int orte_ess_base_std_prolog(void)
4139
{
4240
int ret;
4341
char *error = NULL;
44-
char *evar;
4542

4643
/* Initialize the ORTE data type support */
4744
if (ORTE_SUCCESS != (ret = orte_dt_init())) {
@@ -59,10 +56,6 @@ int orte_ess_base_std_prolog(void)
5956
goto error;
6057
}
6158
}
62-
/* check for OPAL_PREFIX */
63-
if (NULL != (evar = getenv("OPAL_PREFIX"))) {
64-
opal_setenv("PMIX_PREFIX", evar, false, &environ);
65-
}
6659

6760
return ORTE_SUCCESS;
6861

0 commit comments

Comments
 (0)