Skip to content

Commit 8f34fa4

Browse files
author
Ralph Castain
committed
Move the detection of OPAL_PREFIX and subsequent posting of PMIX_PREFIX to the internal integration code for PMIx so we only do this when running with the embeddied PMIx
Signed-off-by: Ralph Castain <rhc@open-mpi.org>
1 parent e94786f commit 8f34fa4

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
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

0 commit comments

Comments
 (0)