Skip to content

Commit

Permalink
iof: Fix merging of stderr to stdout.
Browse files Browse the repository at this point in the history
Also, make sure stderr/stdout are seperated when writing
to files.

Signed-off-by: Austen Lauria <[email protected]>
  • Loading branch information
awlauria authored and rhc54 committed Aug 23, 2022
1 parent a7698ed commit 1491f3e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/common/pmix_iof.c
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,8 @@ pmix_status_t pmix_iof_write_output(const pmix_proc_t *name, pmix_iof_channel_t
/* see if we already have one - we reuse the same sink for
* all streams */
PMIX_LIST_FOREACH(sink, &nptr->sinks, pmix_iof_sink_t) {
if (sink->name.rank == name->rank) {
if (sink->name.rank == name->rank &&
((stream & sink->tag) || nptr->iof_flags.merge)) {
channel = &sink->wev;
break;
}
Expand Down Expand Up @@ -1579,7 +1580,12 @@ pmix_status_t pmix_iof_write_output(const pmix_proc_t *name, pmix_iof_channel_t
if (PMIX_FWD_STDOUT_CHANNEL & stream) {
channel = &pmix_client_globals.iof_stdout.wev;
} else {
channel = &pmix_client_globals.iof_stderr.wev;
if(!myflags.merge) {
channel = &pmix_client_globals.iof_stderr.wev;
}
else {
channel = &pmix_client_globals.iof_stdout.wev;
}
}
}

Expand Down

0 comments on commit 1491f3e

Please sign in to comment.