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 (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)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;
|
||||
char **tmpv;
|
||||
|
||||
/* set default location */
|
||||
loc = -1;
|
||||
/* set default location to be 0, indicating that
|
||||
* only a single word is in the cmd
|
||||
*/
|
||||
loc = 0;
|
||||
/* split the command apart in case it is multi-word */
|
||||
tmpv = opal_argv_split(orte_launch_agent, ' ');
|
||||
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...
|
||||
*/
|
||||
if (0 == orted_index) {
|
||||
/* this is the default scenario, but there could be options specified
|
||||
* so we need to account for that possibility
|
||||
/* single word cmd - this is the default scenario, but there could
|
||||
* 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_prefix = NULL;
|
||||
} else if (0 > orted_index) {
|
||||
/* no "orted" was included */
|
||||
orted_cmd = NULL;
|
||||
orted_prefix = opal_argv_join(orted_argv, ' ');
|
||||
} else {
|
||||
/* okay, so the "orted" cmd is somewhere in this array, with
|
||||
* 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 ; "
|
||||
"LD_LIBRARY_PATH=%s/%s:$LD_LIBRARY_PATH ; export LD_LIBRARY_PATH ; "
|
||||
"%s %s",
|
||||
(opal_prefix != NULL ? "OPAL_PREFIX=" : ""),
|
||||
(opal_prefix != NULL ? opal_prefix : ""),
|
||||
(opal_prefix != NULL ? " ; export OPAL_PREFIX;" : ""),
|
||||
(opal_prefix != NULL ? "OPAL_PREFIX=" : " "),
|
||||
(opal_prefix != NULL ? opal_prefix : " "),
|
||||
(opal_prefix != NULL ? " ; export OPAL_PREFIX;" : " "),
|
||||
prefix_dir, bin_base,
|
||||
prefix_dir, lib_base,
|
||||
(orted_prefix != NULL ? orted_prefix : ""),
|
||||
(full_orted_cmd != NULL ? full_orted_cmd : ""));
|
||||
(orted_prefix != NULL ? orted_prefix : " "),
|
||||
(full_orted_cmd != NULL ? full_orted_cmd : " "));
|
||||
} else if (ORTE_PLM_RSH_SHELL_TCSH == remote_shell ||
|
||||
ORTE_PLM_RSH_SHELL_CSH == remote_shell) {
|
||||
/* [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 ) "
|
||||
"setenv LD_LIBRARY_PATH %s/%s:$LD_LIBRARY_PATH ; "
|
||||
"%s %s",
|
||||
(opal_prefix != NULL ? "setenv OPAL_PREFIX " : ""),
|
||||
(opal_prefix != NULL ? opal_prefix : ""),
|
||||
(opal_prefix != NULL ? " ;" : ""),
|
||||
(opal_prefix != NULL ? "setenv OPAL_PREFIX " : " "),
|
||||
(opal_prefix != NULL ? opal_prefix : " "),
|
||||
(opal_prefix != NULL ? " ;" : " "),
|
||||
prefix_dir, bin_base,
|
||||
prefix_dir, lib_base,
|
||||
prefix_dir, lib_base,
|
||||
(orted_prefix != NULL ? orted_prefix : ""),
|
||||
(full_orted_cmd != NULL ? full_orted_cmd : ""));
|
||||
(orted_prefix != NULL ? orted_prefix : " "),
|
||||
(full_orted_cmd != NULL ? full_orted_cmd : " "));
|
||||
} else {
|
||||
orte_show_help("help-plm-rsh.txt", "cannot-resolve-shell-with-prefix", true,
|
||||
(NULL == opal_prefix) ? "NULL" : opal_prefix,
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user