@@ -66,10 +66,9 @@ static char *mca_base_var_override_file = NULL;
6666static char * mca_base_var_file_prefix = NULL ;
6767static char * mca_base_envar_file_prefix = NULL ;
6868static char * mca_base_param_file_path = NULL ;
69- static char * mca_base_env_list = NULL ;
70- #define MCA_BASE_ENV_LIST_SEP_DEFAULT ";"
71- static char * mca_base_env_list_sep = MCA_BASE_ENV_LIST_SEP_DEFAULT ;
72- static char * mca_base_env_list_internal = NULL ;
69+ char * mca_base_env_list = NULL ;
70+ char * mca_base_env_list_sep = MCA_BASE_ENV_LIST_SEP_DEFAULT ;
71+ char * mca_base_env_list_internal = NULL ;
7372static bool mca_base_var_suppress_override_warning = false;
7473static opal_list_t mca_base_var_file_values ;
7574static opal_list_t mca_base_envar_file_values ;
@@ -130,7 +129,6 @@ static const char *info_lvl_strings[] = {
130129 */
131130static int fixup_files (char * * file_list , char * path , bool rel_path_search , char sep );
132131static int read_files (char * file_list , opal_list_t * file_values , char sep );
133- static int mca_base_var_cache_files (bool rel_path_search );
134132static int var_set_initial (mca_base_var_t * var , mca_base_var_t * original );
135133static int var_get (int vari , mca_base_var_t * * var_out , bool original );
136134static int var_value_string (mca_base_var_t * var , char * * value_string );
@@ -242,7 +240,6 @@ static char *append_filename_to_list(const char *filename)
242240int mca_base_var_init (void )
243241{
244242 int ret ;
245- char * name = NULL ;
246243
247244 if (!mca_base_var_initialized ) {
248245 /* Init the value array for the param storage */
@@ -282,41 +279,6 @@ int mca_base_var_init(void)
282279
283280 mca_base_var_initialized = true;
284281
285- mca_base_var_cache_files (false);
286-
287- /* register the envar-forwarding params */
288- (void )mca_base_var_register ("opal" , "mca" , "base" , "env_list" ,
289- "Set SHELL env variables" ,
290- MCA_BASE_VAR_TYPE_STRING , NULL , 0 , 0 , OPAL_INFO_LVL_3 ,
291- MCA_BASE_VAR_SCOPE_READONLY , & mca_base_env_list );
292-
293- mca_base_env_list_sep = MCA_BASE_ENV_LIST_SEP_DEFAULT ;
294- (void )mca_base_var_register ("opal" , "mca" , "base" , "env_list_delimiter" ,
295- "Set SHELL env variables delimiter. Default: semicolon ';'" ,
296- MCA_BASE_VAR_TYPE_STRING , NULL , 0 , 0 , OPAL_INFO_LVL_3 ,
297- MCA_BASE_VAR_SCOPE_READONLY , & mca_base_env_list_sep );
298-
299- /* Set OMPI_MCA_mca_base_env_list variable, it might not be set before
300- * if mca variable was taken from amca conf file. Need to set it
301- * here because mca_base_var_process_env_list is called from schizo_ompi.c
302- * only when this env variable was set.
303- */
304- if (NULL != mca_base_env_list ) {
305- (void ) mca_base_var_env_name ("mca_base_env_list" , & name );
306- if (NULL != name ) {
307- opal_setenv (name , mca_base_env_list , false, & environ );
308- free (name );
309- }
310- }
311-
312- /* Register internal MCA variable mca_base_env_list_internal. It can be set only during
313- * parsing of amca conf file and contains SHELL env variables specified via -x there.
314- * Its format is the same as for mca_base_env_list.
315- */
316- (void )mca_base_var_register ("opal" , "mca" , "base" , "env_list_internal" ,
317- "Store SHELL env variables from amca conf file" ,
318- MCA_BASE_VAR_TYPE_STRING , NULL , 0 , MCA_BASE_VAR_FLAG_INTERNAL , OPAL_INFO_LVL_3 ,
319- MCA_BASE_VAR_SCOPE_READONLY , & mca_base_env_list_internal );
320282 }
321283
322284 return OPAL_SUCCESS ;
@@ -419,15 +381,15 @@ static void resolve_relative_paths(char **file_prefix, char *file_path, bool rel
419381 }
420382}
421383
422- static int mca_base_var_cache_files (bool rel_path_search )
384+ int mca_base_var_cache_files (bool rel_path_search )
423385{
424386 char * tmp ;
425387 int ret ;
426388
427389 /* We may need this later */
428390 home = (char * )opal_home_directory ();
429391
430- if (NULL == cwd ) {
392+ if (NULL == cwd ) {
431393 cwd = (char * ) malloc (sizeof (char ) * MAXPATHLEN );
432394 if ( NULL == (cwd = getcwd (cwd , MAXPATHLEN ) )) {
433395 opal_output (0 , "Error: Unable to get the current working directory\n" );
@@ -452,7 +414,8 @@ static int mca_base_var_cache_files(bool rel_path_search)
452414 MCA_BASE_VAR_TYPE_STRING , NULL , 0 , 0 , OPAL_INFO_LVL_2 ,
453415 MCA_BASE_VAR_SCOPE_READONLY , & mca_base_var_files );
454416 free (tmp );
455- if (OPAL_SUCCESS != ret ) {
417+ if (0 > ret ) {
418+ opal_output (0 , "FAILED PARAM FILES: %d" , ret );
456419 return ret ;
457420 }
458421
@@ -464,6 +427,7 @@ static int mca_base_var_cache_files(bool rel_path_search)
464427 ret = asprintf (& mca_base_var_override_file , "%s" OPAL_PATH_SEP "openmpi-mca-params-override.conf" ,
465428 opal_install_dirs .sysconfdir );
466429 if (0 > ret ) {
430+ opal_output (0 , "FAILED OVERRIDE" );
467431 return OPAL_ERR_OUT_OF_RESOURCE ;
468432 }
469433
@@ -476,6 +440,7 @@ static int mca_base_var_cache_files(bool rel_path_search)
476440 & mca_base_var_override_file );
477441 free (tmp );
478442 if (0 > ret ) {
443+ opal_output (0 , "FAILED OVERRIDE PARAM FILES" );
479444 return ret ;
480445 }
481446
@@ -490,6 +455,7 @@ static int mca_base_var_cache_files(bool rel_path_search)
490455 MCA_BASE_VAR_TYPE_BOOL , NULL , 0 , 0 , OPAL_INFO_LVL_2 ,
491456 MCA_BASE_VAR_SCOPE_LOCAL , & mca_base_var_suppress_override_warning );
492457 if (0 > ret ) {
458+ opal_output (0 , "FAILED OVERRIDE WARNING" );
493459 return ret ;
494460 }
495461
@@ -503,6 +469,7 @@ static int mca_base_var_cache_files(bool rel_path_search)
503469 MCA_BASE_VAR_TYPE_STRING , NULL , 0 , 0 , OPAL_INFO_LVL_3 ,
504470 MCA_BASE_VAR_SCOPE_READONLY , & mca_base_var_file_prefix );
505471 if (0 > ret ) {
472+ opal_output (0 , "FAILED PARAM PREFIX" );
506473 return ret ;
507474 }
508475
@@ -512,12 +479,14 @@ static int mca_base_var_cache_files(bool rel_path_search)
512479 MCA_BASE_VAR_TYPE_STRING , NULL , 0 , 0 , OPAL_INFO_LVL_3 ,
513480 MCA_BASE_VAR_SCOPE_READONLY , & mca_base_envar_file_prefix );
514481 if (0 > ret ) {
482+ opal_output (0 , "FAILED ENV PREFIX" );
515483 return ret ;
516484 }
517485
518486 ret = asprintf (& mca_base_param_file_path , "%s" OPAL_PATH_SEP "amca-param-sets%c%s" ,
519487 opal_install_dirs .opaldatadir , OPAL_ENV_SEP , cwd );
520488 if (0 > ret ) {
489+ opal_output (0 , "FAILED PARAM FILE PATH" );
521490 return OPAL_ERR_OUT_OF_RESOURCE ;
522491 }
523492
@@ -528,6 +497,7 @@ static int mca_base_var_cache_files(bool rel_path_search)
528497 MCA_BASE_VAR_SCOPE_READONLY , & mca_base_param_file_path );
529498 free (tmp );
530499 if (0 > ret ) {
500+ opal_output (0 , "FAILED PARAM FILE PATH2" );
531501 return ret ;
532502 }
533503
@@ -537,6 +507,7 @@ static int mca_base_var_cache_files(bool rel_path_search)
537507 MCA_BASE_VAR_TYPE_STRING , NULL , 0 , 0 , OPAL_INFO_LVL_3 ,
538508 MCA_BASE_VAR_SCOPE_READONLY , & force_agg_path );
539509 if (0 > ret ) {
510+ opal_output (0 , "FAILED PARAM FILE FORCE" );
540511 return ret ;
541512 }
542513
0 commit comments