From 0347b113083c86224ec6d0898b0e11490145f957 Mon Sep 17 00:00:00 2001 From: Justs Zarins Date: Wed, 5 Feb 2020 12:05:22 +0000 Subject: [PATCH] Fix congestor real_n_measurements bug --- congestors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/congestors.c b/congestors.c index fda8519..1ee1460 100644 --- a/congestors.c +++ b/congestors.c @@ -151,7 +151,7 @@ int congestor(CommConfig_t *config, int n_measurements, int niters, MPI_Comm tes timeout_t1 = MPI_Wtime(); timeout = 0.; mpi_error(MPI_Iallreduce(MPI_IN_PLACE, &timeout, 1, MPI_DOUBLE, MPI_MAX, test_comm, &req)); - *real_n_measurements = 0; + if (record_perf) *real_n_measurements = 0; bt = 0.; for (m = 0; m < n_measurements; m++) { @@ -194,7 +194,7 @@ int congestor(CommConfig_t *config, int n_measurements, int niters, MPI_Comm tes } bt2 = MPI_Wtime(); bt += bt2 - bt1; - (*real_n_measurements)++; + if (record_perf) (*real_n_measurements)++; } if (req != MPI_REQUEST_NULL) { mpi_error(MPI_Wait(&req, MPI_STATUS_IGNORE));