Skip to content

Commit 7e5ef6a

Browse files
author
Ralph Castain
committed
Fix the env_list support - the MCA param was being set way too early, so provide a "backdoor" way of providing the value
1 parent 6311f86 commit 7e5ef6a

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

opal/mca/base/mca_base_var.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Copyright (c) 2008-2015 Cisco Systems, Inc. All rights reserved.
1414
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
1515
* reserved.
16-
* Copyright (c) 2014 Intel, Inc. All rights reserved.
16+
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
1717
* Copyright (c) 2015 Research Organization for Information Science
1818
* and Technology (RIST). All rights reserved.
1919
* $COPYRIGHT$
@@ -366,7 +366,7 @@ static void process_env_list(char *env_list, char ***argv, char sep)
366366
opal_argv_free(tokens);
367367
}
368368

369-
int mca_base_var_process_env_list(char ***argv)
369+
int mca_base_var_process_env_list(char *list, char ***argv)
370370
{
371371
char sep;
372372
sep = ';';
@@ -379,7 +379,9 @@ int mca_base_var_process_env_list(char ***argv)
379379
return OPAL_SUCCESS;
380380
}
381381
}
382-
if (NULL != mca_base_env_list) {
382+
if (NULL != list) {
383+
process_env_list(list, argv, sep);
384+
} else if (NULL != mca_base_env_list) {
383385
process_env_list(mca_base_env_list, argv, sep);
384386
}
385387

opal/mca/base/mca_base_var.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved.
1414
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
1515
* reserved.
16+
* Copyright (c) 2016 Intel, Inc. All rights reserved.
1617
* $COPYRIGHT$
1718
*
1819
* Additional copyrights may follow
@@ -729,7 +730,7 @@ OPAL_DECLSPEC int mca_base_var_dump(int vari, char ***out, mca_base_var_dump_typ
729730
* Parse a provided list of envars and add their local value, or
730731
* their assigned value, to the provided argv
731732
*/
732-
OPAL_DECLSPEC int mca_base_var_process_env_list(char ***argv);
733+
OPAL_DECLSPEC int mca_base_var_process_env_list(char *list, char ***argv);
733734
OPAL_DECLSPEC int mca_base_var_process_env_list_from_file(char ***argv);
734735

735736
END_C_DECLS

orte/mca/schizo/ompi/schizo_ompi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ static int parse_env(char *path,
688688
if (!set_from_file) {
689689
/* set necessary env variables for external usage */
690690
vars = NULL;
691-
if (OPAL_SUCCESS == mca_base_var_process_env_list(&vars) &&
691+
if (OPAL_SUCCESS == mca_base_var_process_env_list(env_set_flag, &vars) &&
692692
NULL != vars) {
693693
for (i=0; NULL != vars[i]; i++) {
694694
value = strchr(vars[i], '=');

0 commit comments

Comments
 (0)