Skip to content

Commit

Permalink
Put barrier before timing call
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Schuchart <schuchart@icl.utk.edu>
  • Loading branch information
devreal committed Oct 8, 2021
1 parent db70cfc commit 10340ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/spmm/spmm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2032,12 +2032,12 @@ static void timed_measurement(SpMatrix<> &A, SpMatrix<> &B, const std::function<
assert(connected);
TTGUNUSED(connected);

MPI_Barrier(MPI_COMM_WORLD);
struct timeval start {
0
}, end{0}, diff{0};
gettimeofday(&start, nullptr);
// ready, go! need only 1 kick, so must be done by 1 thread only
MPI_Barrier(MPI_COMM_WORLD);
if (ttg_default_execution_context().rank() == 0) control.start(a_times_b.initbound());
ttg_fence(ttg_default_execution_context());
gettimeofday(&end, nullptr);
Expand Down

0 comments on commit 10340ee

Please sign in to comment.