1
1

Fix direct and linear xcast modes

This commit was SVN r18359.
Этот коммит содержится в:
Ralph Castain 2008-05-02 14:30:07 +00:00
родитель 8e846bf7f2
Коммит 519c15f8af
2 изменённых файлов: 25 добавлений и 15 удалений

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

@ -360,7 +360,7 @@ static int xcast_linear(orte_jobid_t job,
* and rattling messages around the system if daemons are not * and rattling messages around the system if daemons are not
* fully connected * fully connected
*/ */
if (!orte_process_info.hnp) {
/* tell the HNP to relay */ /* tell the HNP to relay */
command = ORTE_DAEMON_PROCESS_AND_RELAY_CMD; command = ORTE_DAEMON_PROCESS_AND_RELAY_CMD;
if (ORTE_SUCCESS != (rc = opal_dss.pack(buf, &command, 1, ORTE_DAEMON_CMD))) { if (ORTE_SUCCESS != (rc = opal_dss.pack(buf, &command, 1, ORTE_DAEMON_CMD))) {
@ -373,7 +373,6 @@ static int xcast_linear(orte_jobid_t job,
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
goto CLEANUP; goto CLEANUP;
} }
}
/* if this isn't intended for the daemon command tag, then we better /* if this isn't intended for the daemon command tag, then we better
* tell the daemon to deliver it to the procs, and what job is supposed * tell the daemon to deliver it to the procs, and what job is supposed
@ -542,8 +541,8 @@ static int xcast_direct(orte_jobid_t job,
if (ORTE_PROC_MY_NAME->jobid != job) { if (ORTE_PROC_MY_NAME->jobid != job) {
if (ORTE_SUCCESS != (rc = relay_via_hnp(job, buffer, tag))) { if (ORTE_SUCCESS != (rc = relay_via_hnp(job, buffer, tag))) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
goto CLEANUP;
} }
goto CLEANUP;
} }
/* if it is my jobid, then we can just send this ourselves - /* if it is my jobid, then we can just send this ourselves -
* set the target tag * set the target tag
@ -566,8 +565,8 @@ static int xcast_direct(orte_jobid_t job,
if (ORTE_PROC_MY_NAME->jobid != job) { if (ORTE_PROC_MY_NAME->jobid != job) {
if (ORTE_SUCCESS != (rc = relay_via_hnp(job, buffer, tag))) { if (ORTE_SUCCESS != (rc = relay_via_hnp(job, buffer, tag))) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
goto CLEANUP;
} }
goto CLEANUP;
} }
/* if this is going to the daemon job to /* if this is going to the daemon job to
* someplace other than the daemon cmd processor, then I need to add * someplace other than the daemon cmd processor, then I need to add

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

@ -125,6 +125,11 @@ static void send_relay(int fd, short event, void *data)
if (!orte_process_info.hnp) { if (!orte_process_info.hnp) {
goto CLEANUP; goto CLEANUP;
} }
OPAL_OUTPUT_VERBOSE((1, orte_debug_output,
"%s orte:daemon:send_relay linear mode with %d procs",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), (int)orte_process_info.num_procs));
/* if the mode is linear and we are the HNP, don't ask for /* if the mode is linear and we are the HNP, don't ask for
* next recipients as this will generate a potentially very * next recipients as this will generate a potentially very
* long list! Instead, just send the message to each daemon * long list! Instead, just send the message to each daemon
@ -133,6 +138,12 @@ static void send_relay(int fd, short event, void *data)
dummy.jobid = ORTE_PROC_MY_HNP->jobid; dummy.jobid = ORTE_PROC_MY_HNP->jobid;
for (i=1; i < orte_process_info.num_procs; i++) { for (i=1; i < orte_process_info.num_procs; i++) {
dummy.vpid = i; dummy.vpid = i;
OPAL_OUTPUT_VERBOSE((1, orte_debug_output,
"%s orte:daemon:send_relay sending relay msg to %s",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
ORTE_NAME_PRINT(&dummy)));
if (0 > (ret = orte_rml.send_buffer(&dummy, buffer, ORTE_RML_TAG_DAEMON, 0))) { if (0 > (ret = orte_rml.send_buffer(&dummy, buffer, ORTE_RML_TAG_DAEMON, 0))) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
goto CLEANUP; goto CLEANUP;