1
1

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.
Этот коммит содержится в:
Ralph Castain 2009-08-18 14:57:34 +00:00
родитель a489f3fc6c
Коммит dbb3cbe3dd
2 изменённых файлов: 19 добавлений и 19 удалений

Просмотреть файл

@ -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.