From 8f34fa4a564899201bf728e514c6590c3393c237 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Tue, 1 Aug 2017 08:24:27 -0600 Subject: [PATCH] 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 --- opal/mca/pmix/pmix2x/pmix2x_client.c | 5 +++++ opal/mca/pmix/pmix2x/pmix2x_server_south.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/opal/mca/pmix/pmix2x/pmix2x_client.c b/opal/mca/pmix/pmix2x/pmix2x_client.c index 3170d1bfd9..990be35666 100644 --- a/opal/mca/pmix/pmix2x/pmix2x_client.c +++ b/opal/mca/pmix/pmix2x/pmix2x_client.c @@ -29,6 +29,7 @@ #include "opal/hash_string.h" #include "opal/threads/threads.h" #include "opal/util/argv.h" +#include "opal/util/opal_environ.h" #include "opal/util/proc.h" #include "opal/mca/pmix/base/base.h" @@ -65,6 +66,7 @@ int pmix2x_client_init(opal_list_t *ilist) pmix_info_t *pinfo; size_t ninfo, n; opal_value_t *ival; + char *evar; opal_output_verbose(1, opal_pmix_base_framework.framework_output, "PMIx_client init"); @@ -76,6 +78,9 @@ int pmix2x_client_init(opal_list_t *ilist) asprintf(&dbgvalue, "PMIX_DEBUG=%d", dbg); putenv(dbgvalue); } + if (NULL != (evar = getenv("OPAL_PREFIX"))) { + opal_setenv("PMIX_PREFIX", evar, false, &environ); + } } /* convert the incoming list to info structs */ diff --git a/opal/mca/pmix/pmix2x/pmix2x_server_south.c b/opal/mca/pmix/pmix2x/pmix2x_server_south.c index d22622ede1..0842b3918a 100644 --- a/opal/mca/pmix/pmix2x/pmix2x_server_south.c +++ b/opal/mca/pmix/pmix2x/pmix2x_server_south.c @@ -36,6 +36,7 @@ #include "opal/util/argv.h" #include "opal/util/error.h" #include "opal/util/output.h" +#include "opal/util/opal_environ.h" #include "opal/util/proc.h" #include "opal/util/show_help.h" #include "opal/mca/pmix/base/base.h" @@ -99,6 +100,7 @@ int pmix2x_server_init(opal_pmix_server_module_t *module, opal_pmix2x_event_t *event; opal_pmix2x_jobid_trkr_t *job; opal_pmix_lock_t lk; + char *evar; OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock); @@ -107,6 +109,9 @@ int pmix2x_server_init(opal_pmix_server_module_t *module, asprintf(&dbgvalue, "PMIX_DEBUG=%d", dbg); putenv(dbgvalue); } + if (NULL != (evar = getenv("OPAL_PREFIX"))) { + opal_setenv("PMIX_PREFIX", evar, false, &environ); + } } ++opal_pmix_base.initialized;