1
1

Allow the passing of NULL to orte_plm.kill_local_procs to match what we allow for the equivalent orte_odls call

This commit was SVN r23436.
Этот коммит содержится в:
Ralph Castain 2010-07-20 04:05:41 +00:00
родитель 519bbf6b6b
Коммит 72525a5850

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

@ -254,14 +254,23 @@ int orte_plm_base_orted_kill_local_procs(opal_pointer_array_t *procs)
orte_process_name_t peer; orte_process_name_t peer;
orte_job_t *daemons; orte_job_t *daemons;
orte_proc_t *proc; orte_proc_t *proc;
int32_t num_procs; int32_t num_procs=0;
OPAL_OUTPUT_VERBOSE((5, orte_plm_globals.output, OPAL_OUTPUT_VERBOSE((5, orte_plm_globals.output,
"%s plm:base:orted_cmd sending kill_local_procs cmds", "%s plm:base:orted_cmd sending kill_local_procs cmds",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
OBJ_CONSTRUCT(&cmd, opal_buffer_t);
/* pack the command */
if (ORTE_SUCCESS != (rc = opal_dss.pack(&cmd, &command, 1, ORTE_DAEMON_CMD))) {
ORTE_ERROR_LOG(rc);
OBJ_DESTRUCT(&cmd);
return rc;
}
if (NULL != procs) {
/* count the number of procs */ /* count the number of procs */
num_procs = 0;
for (v=0; v < procs->size; v++) { for (v=0; v < procs->size; v++) {
if (NULL == opal_pointer_array_get_item(procs, v)) { if (NULL == opal_pointer_array_get_item(procs, v)) {
continue; continue;
@ -276,14 +285,6 @@ int orte_plm_base_orted_kill_local_procs(opal_pointer_array_t *procs)
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
return ORTE_SUCCESS; return ORTE_SUCCESS;
} }
OBJ_CONSTRUCT(&cmd, opal_buffer_t);
/* pack the command */
if (ORTE_SUCCESS != (rc = opal_dss.pack(&cmd, &command, 1, ORTE_DAEMON_CMD))) {
ORTE_ERROR_LOG(rc);
OBJ_DESTRUCT(&cmd);
return rc;
} }
/* pack the number of procs */ /* pack the number of procs */
@ -294,6 +295,7 @@ int orte_plm_base_orted_kill_local_procs(opal_pointer_array_t *procs)
} }
/* pack the proc names */ /* pack the proc names */
if (NULL != procs) {
for (v=0; v < procs->size; v++) { for (v=0; v < procs->size; v++) {
if (NULL == (proc = (orte_proc_t*)opal_pointer_array_get_item(procs, v))) { if (NULL == (proc = (orte_proc_t*)opal_pointer_array_get_item(procs, v))) {
continue; continue;
@ -304,6 +306,7 @@ int orte_plm_base_orted_kill_local_procs(opal_pointer_array_t *procs)
return rc; return rc;
} }
} }
}
/* if we are abnormally ordering the termination, then /* if we are abnormally ordering the termination, then
* we do -not- want to use a collective operation to send the * we do -not- want to use a collective operation to send the