@@ -414,23 +414,29 @@ static void resolve_relative_paths(char **file_prefix, char *file_path, bool rel
414
414
415
415
int mca_base_var_cache_files (bool rel_path_search )
416
416
{
417
- char * tmp ;
417
+ char * tmp = NULL ;
418
418
int ret ;
419
419
420
- if (NULL != getenv ("OPAL_USER_PARAMS_GIVEN" )) {
421
- /* PMIx already provided the params for us */
422
- return OPAL_SUCCESS ;
423
- }
424
-
425
420
#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
+ }
432
425
#endif
433
426
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
+
434
440
/* Initialize a parameter that says where MCA param files can be found.
435
441
We may change this value so set the scope to MCA_BASE_VAR_SCOPE_READONLY */
436
442
tmp = mca_base_var_files ;
0 commit comments