Skip to content

Commit aa05c1d

Browse files
authored
Merge pull request #4872 from sam6258/v3.1.x_prefix_pick
Fix PATH and LD_LIBRARY_PATH prefixing to use first app context value…
2 parents 300d96a + da60fe2 commit aa05c1d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

orte/mca/schizo/ompi/schizo_ompi.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* Copyright (c) 2013-2018 Intel, Inc. All rights reserved.
1818
* Copyright (c) 2015 Research Organization for Information Science
1919
* and Technology (RIST). All rights reserved.
20+
* Copyright (c) 2018 IBM Corporation. All rights reserved.
2021
* $COPYRIGHT$
2122
*
2223
* Additional copyrights may follow
@@ -866,6 +867,12 @@ static int setup_fork(orte_job_t *jdata,
866867
variables. */
867868
param = NULL;
868869
orte_get_attribute(&app->attributes, ORTE_APP_PREFIX_DIR, (void**)&param, OPAL_STRING);
870+
/* grab the parameter from the first app context because the current context does not have a prefix assigned */
871+
if (NULL == param) {
872+
tmp_app = (orte_app_context_t*)opal_pointer_array_get_item(jdata->apps, 0);
873+
assert (NULL != tmp_app);
874+
orte_get_attribute(&tmp_app->attributes, ORTE_APP_PREFIX_DIR, (void**)&param, OPAL_STRING);
875+
}
869876
for (i = 0; NULL != param && NULL != app->env && NULL != app->env[i]; ++i) {
870877
char *newenv;
871878

0 commit comments

Comments
 (0)