From 504e6587ec83e0c98c64ffbb23fc3939798ef93b Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 19 Feb 2002 17:01:00 -0500 Subject: [svn-r4995] Purpose: Bone-headed Bug Fix Description: There were blanks being put into the output. The cause: the "print_indent()" routine was printing indents for all of the processes, but only process 0 should have been printing them out at all (since process 0 is the one which prints out the reports). Solution: Check to make sure that we're process 0 before printing the indents. Platforms tested: Linux --- perform/pio_perf.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/perform/pio_perf.c b/perform/pio_perf.c index 4e2da0e..902817c 100644 --- a/perform/pio_perf.c +++ b/perform/pio_perf.c @@ -779,10 +779,16 @@ output_report(FILE *output, const char *fmt, ...) static void print_indent(register FILE *output, register int indent) { - indent *= TAB_SPACE; + int myrank; + + MPI_Comm_rank(pio_comm_g, &myrank); - for (; indent > 0; --indent) - fputc(' ', output); + if (myrank == 0) { + indent *= TAB_SPACE; + + for (; indent > 0; --indent) + fputc(' ', output); + } } /* -- cgit v0.12