diff options
Diffstat (limited to 'Carpet/Carpet/src/Initialise.cc')
-rw-r--r-- | Carpet/Carpet/src/Initialise.cc | 50 |
1 files changed, 23 insertions, 27 deletions
diff --git a/Carpet/Carpet/src/Initialise.cc b/Carpet/Carpet/src/Initialise.cc index 7440b5cdc..388f35c9b 100644 --- a/Carpet/Carpet/src/Initialise.cc +++ b/Carpet/Carpet/src/Initialise.cc @@ -15,10 +15,10 @@ #include <Requirements.hh> +#include <CactusTimerSet.hh> +#include <Timer.hh> + #include <carpet.hh> -#include <Timers.hh> -#include <TimerSet.hh> -#include <TimerNode.hh> @@ -84,7 +84,7 @@ namespace Carpet { cctkGH->cctk_time = global_time; cctkGH->cctk_delta_time = delta_time; - static Timer timer ("Initialise"); + static Timers::Timer timer ("Initialise"); timer.start(); // Delay checkpoint until MPI has been initialised @@ -134,15 +134,11 @@ namespace Carpet { timer.stop(); if (output_timers_every > 0) { - TimerSet::writeData (cctkGH, timer_file); + Timers::CactusTimerSet::writeData (cctkGH, timer_file); } - if (output_initialise_timer_tree) - { - TimerNode *it = main_timer_tree.root->getChildTimer("Initialise"); - double total_avg, total_max; - it->getGlobalTime(total_avg, total_max); - it->print(cout, total_max, 0, timer_tree_threshold_percentage, timer_tree_output_precision); + if (output_initialise_timer_tree) { + Timers::Timer::outputTree("Initialise"); } Waypoint ("Done with initialisation"); @@ -162,7 +158,7 @@ namespace Carpet { CallSetup (cGH * const cctkGH) { char const * const where = "CallSetup"; - static Timer timer (where); + static Timers::Timer timer (where); timer.start(); BEGIN_MGLEVEL_LOOP(cctkGH) { @@ -206,7 +202,7 @@ namespace Carpet { CallRecoverVariables (cGH * const cctkGH) { char const * const where = "CallRecoverVariables"; - static Timer timer (where); + static Timers::Timer timer (where); timer.start(); DECLARE_CCTK_PARAMETERS; @@ -273,7 +269,7 @@ namespace Carpet { DECLARE_CCTK_PARAMETERS; char const * const where = "CallPostRecoverVariables"; - static Timer timer (where); + static Timers::Timer timer (where); timer.start(); for (int rl=0; rl<reflevels; ++rl) { @@ -366,7 +362,7 @@ namespace Carpet { DECLARE_CCTK_PARAMETERS; char const * const where = "CallInitial"; - static Timer timer (where); + static Timers::Timer timer (where); timer.start(); if (not regrid_during_initialisation) { @@ -470,7 +466,7 @@ namespace Carpet { DECLARE_CCTK_PARAMETERS; char const * const where = "Initialise::CallRestrict"; - static Timer timer ("CallRestrict"); + static Timers::Timer timer ("CallRestrict"); timer.start(); for (int ml=mglevels-1; ml>=0; --ml) { @@ -546,7 +542,7 @@ namespace Carpet { CallPostInitial (cGH * const cctkGH) { char const * const where = "CallPostInitial"; - static Timer timer (where); + static Timers::Timer timer (where); timer.start(); for (int rl=0; rl<reflevels; ++rl) { @@ -592,7 +588,7 @@ namespace Carpet { CallAnalysis (cGH * const cctkGH, bool const did_recover) { char const * const where = "CallAnalysis"; - static Timer timer (where); + static Timers::Timer timer (where); timer.start(); for (int rl=0; rl<reflevels; ++rl) { @@ -802,7 +798,7 @@ namespace Carpet { DECLARE_CCTK_PARAMETERS; char const * const where = "CallRegridRecoverMeta"; - static Timer timer (where); + static Timers::Timer timer (where); timer.start(); assert (is_meta_mode()); @@ -892,7 +888,7 @@ namespace Carpet { DECLARE_CCTK_PARAMETERS; char const * const where = "CallRegridRecoverLevel"; - static Timer timer (where); + static Timers::Timer timer (where); timer.start(); CCTK_WARN (CCTK_WARN_ALERT, @@ -1029,7 +1025,7 @@ namespace Carpet { DECLARE_CCTK_PARAMETERS; char const * const where = "CallRegridInitialMeta"; - static Timer timer (where); + static Timers::Timer timer (where); timer.start(); assert (is_meta_mode()); @@ -1106,7 +1102,7 @@ namespace Carpet { DECLARE_CCTK_PARAMETERS; char const * const where = "CallRegridInitialLevel"; - static Timer timer (where); + static Timers::Timer timer (where); timer.start(); CCTK_WARN (CCTK_WARN_ALERT, @@ -1274,7 +1270,7 @@ namespace Carpet { Waypoint ("Initialising three timelevels:"); char const * const where = "Initialise3TL"; - static Timer timer (where); + static Timers::Timer timer (where); timer.start(); #if 0 @@ -1320,7 +1316,7 @@ namespace Carpet { initialise_3tl_evolve (cGH * const cctkGH) { char const * const where = "Evolve"; - static Timer timer (where); + static Timers::Timer timer (where); timer.start(); BEGIN_MGLEVEL_LOOP(cctkGH) { @@ -1360,7 +1356,7 @@ namespace Carpet { initialise_3tl_recycle (cGH * const cctkGH) { char const * const where = "Recycle"; - static Timer timer (where); + static Timers::Timer timer (where); timer.start(); BEGIN_MGLEVEL_LOOP(cctkGH) { @@ -1405,7 +1401,7 @@ namespace Carpet { void ScheduleTraverse (char const * const where, char const * const name, cGH * const cctkGH) { - Timer timer(name); + Timers::Timer timer(name); timer.start(); ostringstream infobuf; @@ -1418,7 +1414,7 @@ namespace Carpet { void OutputGH (char const * const where, cGH * const cctkGH) { - static Timer timer("OutputGH"); + static Timers::Timer timer("OutputGH"); timer.start(); CCTK_OutputGH (cctkGH); timer.stop(); |