Fix a reported problem when specifying orte_launch_agent - if only one word was given, we inadvertently appended a "NULL" to the end of the cmd.
This commit was SVN r21827.
Этот коммит содержится в:
родитель
a489f3fc6c
Коммит
dbb3cbe3dd
@ -891,7 +891,7 @@ void orte_plm_base_app_report_launch(int fd, short event, void *data)
|
|||||||
|
|
||||||
if (orte_report_launch_progress) {
|
if (orte_report_launch_progress) {
|
||||||
if (0 == num_daemons_reported % 100 || num_daemons_reported == orte_process_info.num_procs) {
|
if (0 == num_daemons_reported % 100 || num_daemons_reported == orte_process_info.num_procs) {
|
||||||
opal_output(orte_clean_output, "Reported: %d(%d) daemons %d(%d) procs",
|
opal_output(orte_clean_output, "Reported: %d (out of %d) daemons - %d (out of %d) procs",
|
||||||
(int)num_daemons_reported, (int)orte_process_info.num_procs,
|
(int)num_daemons_reported, (int)orte_process_info.num_procs,
|
||||||
(int)jdata->num_launched, (int)jdata->num_procs);
|
(int)jdata->num_launched, (int)jdata->num_procs);
|
||||||
}
|
}
|
||||||
@ -1013,8 +1013,10 @@ int orte_plm_base_setup_orted_cmd(int *argc, char ***argv)
|
|||||||
int i, loc;
|
int i, loc;
|
||||||
char **tmpv;
|
char **tmpv;
|
||||||
|
|
||||||
/* set default location */
|
/* set default location to be 0, indicating that
|
||||||
loc = -1;
|
* only a single word is in the cmd
|
||||||
|
*/
|
||||||
|
loc = 0;
|
||||||
/* split the command apart in case it is multi-word */
|
/* split the command apart in case it is multi-word */
|
||||||
tmpv = opal_argv_split(orte_launch_agent, ' ');
|
tmpv = opal_argv_split(orte_launch_agent, ' ');
|
||||||
for (i = 0; NULL != tmpv && NULL != tmpv[i]; ++i) {
|
for (i = 0; NULL != tmpv && NULL != tmpv[i]; ++i) {
|
||||||
|
@ -531,15 +531,13 @@ static int setup_launch(int *argcptr, char ***argvptr,
|
|||||||
* even more interesting! Gotta love rsh/ssh...
|
* even more interesting! Gotta love rsh/ssh...
|
||||||
*/
|
*/
|
||||||
if (0 == orted_index) {
|
if (0 == orted_index) {
|
||||||
/* this is the default scenario, but there could be options specified
|
/* single word cmd - this is the default scenario, but there could
|
||||||
* so we need to account for that possibility
|
* be options specified so we need to account for that possibility.
|
||||||
|
* However, we don't need/want a prefix as nothing precedes the orted
|
||||||
|
* cmd itself
|
||||||
*/
|
*/
|
||||||
orted_cmd = opal_argv_join(orted_argv, ' ');
|
orted_cmd = opal_argv_join(orted_argv, ' ');
|
||||||
orted_prefix = NULL;
|
orted_prefix = NULL;
|
||||||
} else if (0 > orted_index) {
|
|
||||||
/* no "orted" was included */
|
|
||||||
orted_cmd = NULL;
|
|
||||||
orted_prefix = opal_argv_join(orted_argv, ' ');
|
|
||||||
} else {
|
} else {
|
||||||
/* okay, so the "orted" cmd is somewhere in this array, with
|
/* okay, so the "orted" cmd is somewhere in this array, with
|
||||||
* something preceding it and perhaps things following it.
|
* something preceding it and perhaps things following it.
|
||||||
@ -576,13 +574,13 @@ static int setup_launch(int *argcptr, char ***argvptr,
|
|||||||
"%s%s%s PATH=%s/%s:$PATH ; export PATH ; "
|
"%s%s%s PATH=%s/%s:$PATH ; export PATH ; "
|
||||||
"LD_LIBRARY_PATH=%s/%s:$LD_LIBRARY_PATH ; export LD_LIBRARY_PATH ; "
|
"LD_LIBRARY_PATH=%s/%s:$LD_LIBRARY_PATH ; export LD_LIBRARY_PATH ; "
|
||||||
"%s %s",
|
"%s %s",
|
||||||
(opal_prefix != NULL ? "OPAL_PREFIX=" : ""),
|
(opal_prefix != NULL ? "OPAL_PREFIX=" : " "),
|
||||||
(opal_prefix != NULL ? opal_prefix : ""),
|
(opal_prefix != NULL ? opal_prefix : " "),
|
||||||
(opal_prefix != NULL ? " ; export OPAL_PREFIX;" : ""),
|
(opal_prefix != NULL ? " ; export OPAL_PREFIX;" : " "),
|
||||||
prefix_dir, bin_base,
|
prefix_dir, bin_base,
|
||||||
prefix_dir, lib_base,
|
prefix_dir, lib_base,
|
||||||
(orted_prefix != NULL ? orted_prefix : ""),
|
(orted_prefix != NULL ? orted_prefix : " "),
|
||||||
(full_orted_cmd != NULL ? full_orted_cmd : ""));
|
(full_orted_cmd != NULL ? full_orted_cmd : " "));
|
||||||
} else if (ORTE_PLM_RSH_SHELL_TCSH == remote_shell ||
|
} else if (ORTE_PLM_RSH_SHELL_TCSH == remote_shell ||
|
||||||
ORTE_PLM_RSH_SHELL_CSH == remote_shell) {
|
ORTE_PLM_RSH_SHELL_CSH == remote_shell) {
|
||||||
/* [t]csh is a bit more challenging -- we
|
/* [t]csh is a bit more challenging -- we
|
||||||
@ -606,14 +604,14 @@ static int setup_launch(int *argcptr, char ***argvptr,
|
|||||||
"if ( $?OMPI_have_llp == 1 ) "
|
"if ( $?OMPI_have_llp == 1 ) "
|
||||||
"setenv LD_LIBRARY_PATH %s/%s:$LD_LIBRARY_PATH ; "
|
"setenv LD_LIBRARY_PATH %s/%s:$LD_LIBRARY_PATH ; "
|
||||||
"%s %s",
|
"%s %s",
|
||||||
(opal_prefix != NULL ? "setenv OPAL_PREFIX " : ""),
|
(opal_prefix != NULL ? "setenv OPAL_PREFIX " : " "),
|
||||||
(opal_prefix != NULL ? opal_prefix : ""),
|
(opal_prefix != NULL ? opal_prefix : " "),
|
||||||
(opal_prefix != NULL ? " ;" : ""),
|
(opal_prefix != NULL ? " ;" : " "),
|
||||||
prefix_dir, bin_base,
|
prefix_dir, bin_base,
|
||||||
prefix_dir, lib_base,
|
prefix_dir, lib_base,
|
||||||
prefix_dir, lib_base,
|
prefix_dir, lib_base,
|
||||||
(orted_prefix != NULL ? orted_prefix : ""),
|
(orted_prefix != NULL ? orted_prefix : " "),
|
||||||
(full_orted_cmd != NULL ? full_orted_cmd : ""));
|
(full_orted_cmd != NULL ? full_orted_cmd : " "));
|
||||||
} else {
|
} else {
|
||||||
orte_show_help("help-plm-rsh.txt", "cannot-resolve-shell-with-prefix", true,
|
orte_show_help("help-plm-rsh.txt", "cannot-resolve-shell-with-prefix", true,
|
||||||
(NULL == opal_prefix) ? "NULL" : opal_prefix,
|
(NULL == opal_prefix) ? "NULL" : opal_prefix,
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user