1
1

Fix the env_list support - the MCA param was being set way too early, so provide a "backdoor" way of providing the value

Этот коммит содержится в:
Ralph Castain 2016-05-06 15:38:39 -07:00
родитель 6311f86939
Коммит 7e5ef6a240
3 изменённых файлов: 8 добавлений и 5 удалений

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

@ -13,7 +13,7 @@
* Copyright (c) 2008-2015 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2014 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
@ -366,7 +366,7 @@ static void process_env_list(char *env_list, char ***argv, char sep)
opal_argv_free(tokens);
}
int mca_base_var_process_env_list(char ***argv)
int mca_base_var_process_env_list(char *list, char ***argv)
{
char sep;
sep = ';';
@ -379,7 +379,9 @@ int mca_base_var_process_env_list(char ***argv)
return OPAL_SUCCESS;
}
}
if (NULL != mca_base_env_list) {
if (NULL != list) {
process_env_list(list, argv, sep);
} else if (NULL != mca_base_env_list) {
process_env_list(mca_base_env_list, argv, sep);
}

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

@ -13,6 +13,7 @@
* Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2016 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -729,7 +730,7 @@ OPAL_DECLSPEC int mca_base_var_dump(int vari, char ***out, mca_base_var_dump_typ
* Parse a provided list of envars and add their local value, or
* their assigned value, to the provided argv
*/
OPAL_DECLSPEC int mca_base_var_process_env_list(char ***argv);
OPAL_DECLSPEC int mca_base_var_process_env_list(char *list, char ***argv);
OPAL_DECLSPEC int mca_base_var_process_env_list_from_file(char ***argv);
END_C_DECLS

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

@ -688,7 +688,7 @@ static int parse_env(char *path,
if (!set_from_file) {
/* set necessary env variables for external usage */
vars = NULL;
if (OPAL_SUCCESS == mca_base_var_process_env_list(&vars) &&
if (OPAL_SUCCESS == mca_base_var_process_env_list(env_set_flag, &vars) &&
NULL != vars) {
for (i=0; NULL != vars[i]; i++) {
value = strchr(vars[i], '=');