diff options
author | Erik Schnetter <schnetter@gmail.com> | 2013-08-08 13:51:27 -0400 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2013-08-08 13:51:27 -0400 |
commit | f76e4b872473b41c30ef410c5931a4bbfdd73e0a (patch) | |
tree | a686168ac2437bae21021180649bae22d924fa56 | |
parent | c59c3c235d48c34b1e4360576792ad38ecf253b2 (diff) |
Carpet: Output timers before they are destructed at Shutdown
-rw-r--r-- | Carpet/Carpet/src/Shutdown.cc | 24 |
1 files 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(); - } |