From 88a3f8d517cd23392da38e70577ebeb9405ca6b1 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Wed, 20 Dec 2023 07:37:10 +0100 Subject: [PATCH] reset the timer also on non-root MPI processes --- 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 566f2c03418..21c7fc780a5 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()