Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions opal/mca/pmix/pmix2x/pmix2x_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "opal_config.h"
#include "opal/constants.h"
#include "opal/types.h"
#include "opal/mca/installdirs/installdirs.h"

#ifdef HAVE_STRING_H
#include <string.h>
Expand Down Expand Up @@ -78,9 +79,17 @@ int pmix2x_client_init(opal_list_t *ilist)
asprintf(&dbgvalue, "PMIX_DEBUG=%d", dbg);
putenv(dbgvalue);
}
if ((NULL != (evar = getenv("OPAL_PREFIX"))) &&
(NULL == getenv("PMIX_INSTALL_PREFIX"))) {
if (NULL != (evar = getenv("OPAL_PREFIX"))) {
/* OMPI installation was relocated. We need to propagate this to
* internal PMIx as well
*/
opal_setenv("PMIX_INSTALL_PREFIX", evar, false, &environ);
} else if(NULL != getenv("PMIX_INSTALL_PREFIX")) {
/* we use internal version of PMIx, need to override this
* envar so we wont get corrupted configuration
*/
opal_setenv("PMIX_INSTALL_PREFIX", opal_install_dirs.prefix,
false, &environ);
}
}

Expand Down
13 changes: 11 additions & 2 deletions opal/mca/pmix/pmix2x/pmix2x_server_south.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "opal_config.h"
#include "opal/constants.h"
#include "opal/types.h"
#include "opal/mca/installdirs/installdirs.h"

#ifdef HAVE_STRING_H
#include <string.h>
Expand Down Expand Up @@ -109,9 +110,17 @@ int pmix2x_server_init(opal_pmix_server_module_t *module,
asprintf(&dbgvalue, "PMIX_DEBUG=%d", dbg);
putenv(dbgvalue);
}
if ((NULL != (evar = getenv("OPAL_PREFIX"))) &&
(NULL == getenv("PMIX_INSTALL_PREFIX"))) {
if (NULL != (evar = getenv("OPAL_PREFIX"))) {
/* OMPI installation was relocated. We need to propagate this to
* internal PMIx as well
*/
opal_setenv("PMIX_INSTALL_PREFIX", evar, false, &environ);
} else if(NULL != getenv("PMIX_INSTALL_PREFIX")) {
/* we use internal version of PMIx, need to override this
* envar so we wont get corrupted configuration
*/
opal_setenv("PMIX_INSTALL_PREFIX", opal_install_dirs.prefix,
false, &environ);
}
}
++opal_pmix_base.initialized;
Expand Down