From f76e4b872473b41c30ef410c5931a4bbfdd73e0a Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 8 Aug 2013 13:51:27 -0400 Subject: Carpet: Output timers before they are destructed at Shutdown --- Carpet/Carpet/src/Shutdown.cc | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/Carpet/Carpet/src/Shutdown.cc b/Carpet/Carpet/src/Shutdown.cc index e4d0a2fa3..79849dde8 100644 --- a/Carpet/Carpet/src/Shutdown.cc +++ b/Carpet/Carpet/src/Shutdown.cc @@ -55,7 +55,9 @@ namespace Carpet { } LEAVE_LEVEL_MODE; } END_REVERSE_MGLEVEL_LOOP; } // for rl - + + + // Stop all timers before shutdown, since timers may rely on data // structures which are destroyed during shutdown int const ierr = CCTK_TimerStop ("CCTK total time"); @@ -65,6 +67,16 @@ namespace Carpet { Timers::CactusTimerSet::writeData (cctkGH, timer_file); } + if (output_timer_tree_every > 0) { + Timers::Timer::outputTree("Evolve"); + } + + if (output_xml_timer_tree) { + Timers::Timer::outputTreeXML(); + } + + + BEGIN_REVERSE_MGLEVEL_LOOP(cctkGH) { do_early_global_mode = true; do_late_global_mode = true; @@ -78,16 +90,6 @@ namespace Carpet { CCTK_ScheduleTraverse ("CCTK_SHUTDOWN", cctkGH, CallFunction); } END_REVERSE_MGLEVEL_LOOP; - - - - if (output_timer_tree_every > 0) { - Timers::Timer::outputTree("Evolve"); - } - - if (output_xml_timer_tree) { - Timers::Timer::outputTreeXML(); - } -- cgit v1.2.3