diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2011-06-01 08:55:24 +0200 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2011-12-14 18:26:31 +0000 |
commit | 26ee29ba4a30a2111bf0e130b916a657ba139a97 (patch) | |
tree | 39d06beae4312a328badd78910d078fca1a23e6a /Carpet/Carpet/src/Evolve.cc | |
parent | 62e741831713b64b733103efd789690c81cbf4e4 (diff) |
Add timer tree output and associated parameters
New parameters output_initialise_timer_tree and
output_timer_tree_every control output of a new "timer tree diagram"
to standard output for the Initialise and Evolve timer trees
respectively. These diagrams indicate:
1. the value of each timer;
2. the percentage of the given tree taken by each timer;
3. which timers are contained in which other timers;
4. any untimed code
for any timer which takes more than 1% of the tree time.
Diffstat (limited to 'Carpet/Carpet/src/Evolve.cc')
-rw-r--r-- | Carpet/Carpet/src/Evolve.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Carpet/Carpet/src/Evolve.cc b/Carpet/Carpet/src/Evolve.cc index 4eb348c96..06a598ca0 100644 --- a/Carpet/Carpet/src/Evolve.cc +++ b/Carpet/Carpet/src/Evolve.cc @@ -19,6 +19,7 @@ #include <carpet.hh> #include <Timers.hh> #include <TimerSet.hh> +#include "TimerNode.hh" @@ -85,6 +86,15 @@ namespace Carpet { { Carpet::TimerSet::writeData (cctkGH, timer_file); } + + if (output_timer_tree_every > 0 and + cctkGH->cctk_iteration % output_timer_tree_every == 0 and + cctkGH->cctk_iteration % do_every == 0) + { + TimerNode *rt = TimerNode::getRootTimer(); + TimerNode *et = rt->getChildTimer("Evolve"); + et->print(cout, et->getTime(), 0, 1.0); + } } // Ensure that all levels have consistent times |