1
1

Some minor cleanups to the handling of multi-path component find

This commit was SVN r22275.
Этот коммит содержится в:
Ralph Castain 2009-12-08 09:34:49 +00:00
родитель 982b6204cd
Коммит 703ec3d6ce
2 изменённых файлов: 4 добавлений и 13 удалений

Просмотреть файл

@ -255,7 +255,7 @@ static void find_dyn_components(const char *path, const char *type_name,
/* copy the default location definitions */
#if OPAL_WANT_HOME_CONFIG_FILES
system_default = opal_install_dirs.pkglibdir; /* DO NOT FREE */
system_default = strdup(opal_install_dirs.pkglibdir);
asprintf(&user_default, "%s"OPAL_PATH_SEP".openmpi"OPAL_PATH_SEP"components", opal_home_directory());
#else
# if defined(__WINDOWS__) && defined(_DEBUG)
@ -313,6 +313,7 @@ static void find_dyn_components(const char *path, const char *type_name,
} while (NULL != end);
}
}
free(system_default);
if (NULL != user_default) {
free(user_default);
}

Просмотреть файл

@ -65,21 +65,11 @@ int mca_base_open(void)
return OPAL_SUCCESS;
}
/* Register some params */
#if OPAL_WANT_HOME_CONFIG_FILES
asprintf(&value, "%s%c%s"OPAL_PATH_SEP".openmpi"OPAL_PATH_SEP"components", opal_install_dirs.pkglibdir, OPAL_ENV_SEP, opal_home_directory() );
#else
# if defined(__WINDOWS__) && defined(_DEBUG)
asprintf(&value, "%s/debug", opal_install_dirs.pkglibdir);
# else
asprintf(&value, "%s", opal_install_dirs.pkglibdir);
# endif
#endif
/* the system and user default paths will be defined in component_find */
mca_base_param_component_path =
mca_base_param_reg_string_name("mca", "component_path",
"Path where to look for Open MPI and ORTE components",
false, false, value, NULL);
false, false, "SYSTEM_DEFAULT:USER_DEFAULT", NULL);
free(value);
param_index = mca_base_param_reg_string_name("mca", "verbose",
"Top-level verbosity parameter",