From dc8e9272d4e2f4b8df7fc4e72e12a786666fde47 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Sun, 24 Dec 2023 13:12:13 +0100 Subject: [PATCH] reset the timer also on non-root MPI processes (#1787) Co-authored-by: Michael Schlottke-Lakemper --- src/callbacks_step/summary.jl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/callbacks_step/summary.jl b/src/callbacks_step/summary.jl index 566f2c0341..21c7fc780a 100644 --- a/src/callbacks_step/summary.jl +++ b/src/callbacks_step/summary.jl @@ -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()