Skip to content

Commit

Permalink
Merge pull request #3 from justsz/counter_issue
Browse files Browse the repository at this point in the history
Fix congestor real_n_measurements bug
  • Loading branch information
Peter Mendygral authored Apr 6, 2020
2 parents 4639e2f + 0347b11 commit 03aa329
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions congestors.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {

Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 03aa329

Please sign in to comment.