summaryrefslogtreecommitdiffstats
path: root/perform/pio_perf.c
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2002-01-11 20:30:02 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2002-01-11 20:30:02 (GMT)
commit0d069736a7fefcd6e5cc7318782f30982b3ca849 (patch)
treeeef9509c155edbb12bf88c867f8a63c7477644f0 /perform/pio_perf.c
parent52bf29ae4aad348d41d3f67f4439933a03539710 (diff)
downloadhdf5-0d069736a7fefcd6e5cc7318782f30982b3ca849.zip
hdf5-0d069736a7fefcd6e5cc7318782f30982b3ca849.tar.gz
hdf5-0d069736a7fefcd6e5cc7318782f30982b3ca849.tar.bz2
[svn-r4818]
Purpose: Small Fix Description: Fixed the Min/Max/Average accumlation stuff... Solution: Actually thought about the code and made it accumulate the information in the correct way. Platforms tested: Linux
Diffstat (limited to 'perform/pio_perf.c')
-rw-r--r--perform/pio_perf.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/perform/pio_perf.c b/perform/pio_perf.c
index 6377ce4..03441f1 100644
--- a/perform/pio_perf.c
+++ b/perform/pio_perf.c
@@ -561,17 +561,15 @@ run_test(FILE *output, iotype iot, parameters parms)
static void
get_minmax(minmax *mm, double val)
{
- double sum;
- int myrank, nproc;
+ double min, max, sum;
+ int myrank;
MPI_Comm_rank(pio_comm_g, &myrank);
- MPI_Comm_size(pio_comm_g, &nproc);
+ MPI_Comm_size(pio_comm_g, &mm->num);
- MPI_Allreduce(&val, &(mm->max), 1, MPI_DOUBLE, MPI_MAX, pio_comm_g);
- MPI_Allreduce(&val, &(mm->min), 1, MPI_DOUBLE, MPI_MIN, pio_comm_g);
- MPI_Allreduce(&val, &sum, 1, MPI_DOUBLE, MPI_SUM, pio_comm_g);
- mm->sum += sum;
- mm->num += nproc;
+ MPI_Allreduce(&val, &mm->max, 1, MPI_DOUBLE, MPI_MAX, pio_comm_g);
+ MPI_Allreduce(&val, &mm->min, 1, MPI_DOUBLE, MPI_MIN, pio_comm_g);
+ MPI_Allreduce(&val, &mm->sum, 1, MPI_DOUBLE, MPI_SUM, pio_comm_g);
}
/*