Skip to content

Commit 54f8b6d

Browse files
committed
Pickup the OMPI system-default parameters
Signed-off-by: Ralph Castain <rhc@pmix.org>
1 parent 337fcb0 commit 54f8b6d

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

opal/mca/base/mca_base_var.c

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -414,23 +414,29 @@ static void resolve_relative_paths(char **file_prefix, char *file_path, bool rel
414414

415415
int mca_base_var_cache_files(bool rel_path_search)
416416
{
417-
char *tmp;
417+
char *tmp = NULL;
418418
int ret;
419419

420-
if (NULL != getenv("OPAL_USER_PARAMS_GIVEN")) {
421-
/* PMIx already provided the params for us */
422-
return OPAL_SUCCESS;
423-
}
424-
425420
#if OPAL_WANT_HOME_CONFIG_FILES
426-
opal_asprintf(&mca_base_var_files, "%s"OPAL_PATH_SEP".openmpi" OPAL_PATH_SEP
427-
"mca-params.conf%c%s" OPAL_PATH_SEP "openmpi-mca-params.conf",
428-
home, ',', opal_install_dirs.sysconfdir);
429-
#else
430-
opal_asprintf(&mca_base_var_files, "%s" OPAL_PATH_SEP "openmpi-mca-params.conf",
431-
opal_install_dirs.sysconfdir);
421+
if (NULL == getenv("OPAL_USER_PARAMS_GIVEN")) {
422+
opal_asprintf(&tmp, "%s"OPAL_PATH_SEP".openmpi" OPAL_PATH_SEP
423+
"mca-params.conf", home);
424+
}
432425
#endif
433426

427+
if (NULL == getenv("OPAL_SYS_PARAMS_GIVEN")) {
428+
if (NULL != tmp) {
429+
opal_asprintf(&mca_base_var_files, "%s,%s" OPAL_PATH_SEP "openmpi-mca-params.conf",
430+
tmp, opal_install_dirs.sysconfdir);
431+
free(tmp);
432+
} else {
433+
opal_asprintf(&mca_base_var_files, "%s" OPAL_PATH_SEP "openmpi-mca-params.conf",
434+
opal_install_dirs.sysconfdir);
435+
}
436+
} else {
437+
mca_base_var_files = strdup("none");
438+
}
439+
434440
/* Initialize a parameter that says where MCA param files can be found.
435441
We may change this value so set the scope to MCA_BASE_VAR_SCOPE_READONLY */
436442
tmp = mca_base_var_files;

0 commit comments

Comments
 (0)