Skip to content

Commit 1491f3e

Browse files
awlauriarhc54
authored andcommitted
iof: Fix merging of stderr to stdout.
Also, make sure stderr/stdout are seperated when writing to files. Signed-off-by: Austen Lauria <awlauria@us.ibm.com>
1 parent a7698ed commit 1491f3e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/common/pmix_iof.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,7 +1543,8 @@ pmix_status_t pmix_iof_write_output(const pmix_proc_t *name, pmix_iof_channel_t
15431543
/* see if we already have one - we reuse the same sink for
15441544
* all streams */
15451545
PMIX_LIST_FOREACH(sink, &nptr->sinks, pmix_iof_sink_t) {
1546-
if (sink->name.rank == name->rank) {
1546+
if (sink->name.rank == name->rank &&
1547+
((stream & sink->tag) || nptr->iof_flags.merge)) {
15471548
channel = &sink->wev;
15481549
break;
15491550
}
@@ -1579,7 +1580,12 @@ pmix_status_t pmix_iof_write_output(const pmix_proc_t *name, pmix_iof_channel_t
15791580
if (PMIX_FWD_STDOUT_CHANNEL & stream) {
15801581
channel = &pmix_client_globals.iof_stdout.wev;
15811582
} else {
1582-
channel = &pmix_client_globals.iof_stderr.wev;
1583+
if(!myflags.merge) {
1584+
channel = &pmix_client_globals.iof_stderr.wev;
1585+
}
1586+
else {
1587+
channel = &pmix_client_globals.iof_stdout.wev;
1588+
}
15831589
}
15841590
}
15851591

0 commit comments

Comments
 (0)