Skip to content

Commit

Permalink
reset the timer also on non-root MPI processes (#1787)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
  • Loading branch information
ranocha and sloede committed Dec 24, 2023
1 parent 96c5bef commit dc8e927
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/callbacks_step/summary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,13 @@ function initialize_summary_callback(cb::DiscreteCallback, u, t, integrator;
Polyester.reset_threads!()
end

mpi_isroot() || return nothing
# The summary callback should only print information on the root process.
# However, all other MPI processes should also reset the timer so that
# it can be used to diagnose performance.
if !mpi_isroot()
reset_timer!(timer())
return nothing
end

print_startup_message()

Expand Down

0 comments on commit dc8e927

Please sign in to comment.