Minor cleanups:
* fix an if condition so that we do the right thing when procs local to mpirun output to stderr * ensure that tools can handle relays of 0-byte output, indicating that a process closed that io channel This commit was SVN r19884.
Этот коммит содержится в:
родитель
c4f0eb276a
Коммит
85bc7bb26a
@ -193,13 +193,15 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata)
|
||||
(ORTE_IOF_STDOUT & rev->tag) ? "stdout" : ((ORTE_IOF_STDERR & rev->tag) ? "stderr" : "stddiag"),
|
||||
ORTE_NAME_PRINT(&rev->name)));
|
||||
|
||||
if ( (0 != numbytes) && (ORTE_IOF_STDOUT & rev->tag) ) {
|
||||
orte_iof_base_write_output(&rev->name, rev->tag, data, numbytes, &orte_iof_base.iof_write_stdout);
|
||||
} else {
|
||||
orte_iof_base_write_output(&rev->name, rev->tag, data, numbytes, &orte_iof_base.iof_write_stderr);
|
||||
|
||||
if (0 != numbytes) {
|
||||
if (ORTE_IOF_STDOUT & rev->tag) {
|
||||
orte_iof_base_write_output(&rev->name, rev->tag, data, numbytes, &orte_iof_base.iof_write_stdout);
|
||||
} else {
|
||||
orte_iof_base_write_output(&rev->name, rev->tag, data, numbytes, &orte_iof_base.iof_write_stderr);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CLEAN_RETURN:
|
||||
/* if we read 0 bytes from the stdout/err/diag, there is
|
||||
* nothing to output - close these file descriptors,
|
||||
|
@ -90,11 +90,16 @@ static void process_msg(int fd, short event, void *cbdata)
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), numbytes,
|
||||
ORTE_NAME_PRINT(&origin)));
|
||||
|
||||
/* write the output locally */
|
||||
if (ORTE_IOF_STDOUT & stream) {
|
||||
orte_iof_base_write_output(&origin, stream, data, numbytes, &orte_iof_base.iof_write_stdout);
|
||||
} else {
|
||||
orte_iof_base_write_output(&origin, stream, data, numbytes, &orte_iof_base.iof_write_stderr);
|
||||
/* if numbytes is zero, it means that the channel was closed on the far end - for
|
||||
* now, we just ignore this condition
|
||||
*/
|
||||
if (0 < numbytes) {
|
||||
/* write the output locally */
|
||||
if (ORTE_IOF_STDOUT & stream) {
|
||||
orte_iof_base_write_output(&origin, stream, data, numbytes, &orte_iof_base.iof_write_stdout);
|
||||
} else {
|
||||
orte_iof_base_write_output(&origin, stream, data, numbytes, &orte_iof_base.iof_write_stderr);
|
||||
}
|
||||
}
|
||||
|
||||
CLEAN_RETURN:
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user