ess/singleton: expects 4 PMIX_* environment variables or more
Этот коммит содержится в:
родитель
696121cc4a
Коммит
a1e8e58a8a
@ -15,6 +15,8 @@
|
|||||||
* Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
|
* Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
|
||||||
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||||
* reserved.
|
* reserved.
|
||||||
|
* Copyright (c) 2016 Research Organization for Information Science
|
||||||
|
* and Technology (RIST). All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -564,6 +566,8 @@ static int fork_hnp(void)
|
|||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
int count;
|
||||||
|
|
||||||
free(cmd);
|
free(cmd);
|
||||||
/* I am the parent - wait to hear something back and
|
/* I am the parent - wait to hear something back and
|
||||||
* report results
|
* report results
|
||||||
@ -630,12 +634,13 @@ static int fork_hnp(void)
|
|||||||
|
|
||||||
/* split the pmix_uri into its parts */
|
/* split the pmix_uri into its parts */
|
||||||
argv = opal_argv_split(cptr, ',');
|
argv = opal_argv_split(cptr, ',');
|
||||||
if (4 != opal_argv_count(argv)) {
|
count = opal_argv_count(argv);
|
||||||
|
if (4 > count) {
|
||||||
opal_argv_free(argv);
|
opal_argv_free(argv);
|
||||||
return ORTE_ERR_BAD_PARAM;
|
return ORTE_ERR_BAD_PARAM;
|
||||||
}
|
}
|
||||||
/* push each piece into the environment */
|
/* push each piece into the environment */
|
||||||
for (i=0; i < 4; i++) {
|
for (i=0; i < count; i++) {
|
||||||
pmixenvars[i] = strdup(argv[i]);
|
pmixenvars[i] = strdup(argv[i]);
|
||||||
putenv(pmixenvars[i]);
|
putenv(pmixenvars[i]);
|
||||||
}
|
}
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user