From 62e741831713b64b733103efd789690c81cbf4e4 Mon Sep 17 00:00:00 2001 From: Ian Hinder Date: Thu, 2 Jun 2011 11:13:41 +0200 Subject: Make Carpet timers hierarchical This commit modifies the timer infrastructure in Carpet to generate a tree of timers where the hierarchy reflects the call-graph of the program. This makes it much easier to interpret the timer output than with the previous flat structure, where it was not possible to see which timers "contained" which others. More implementation details are given at the top of TimerNode.hh. Note that the Timer source and header files have been renamed as CactusTimer and a new Timer file and object has been created. This is because the Timer object now only provides a wrapper around the Cactus timer mechanism which was contained in the old Timer object. --- Carpet/Carpet/src/Evolve.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Carpet/Carpet/src/Evolve.cc') diff --git a/Carpet/Carpet/src/Evolve.cc b/Carpet/Carpet/src/Evolve.cc index 8337e98aa..4eb348c96 100644 --- a/Carpet/Carpet/src/Evolve.cc +++ b/Carpet/Carpet/src/Evolve.cc @@ -18,6 +18,7 @@ #include #include +#include @@ -82,7 +83,7 @@ namespace Carpet { cctkGH->cctk_iteration % output_timers_every == 0 and cctkGH->cctk_iteration % do_every == 0) { - TimerSet::writeData (cctkGH, timer_file); + Carpet::TimerSet::writeData (cctkGH, timer_file); } } @@ -630,6 +631,7 @@ namespace Carpet { timers_t & timers = * timersp; // Obtain timer, creating a new one if it does not yet exist + // This is no longer necessary with the new timer implementation ostringstream timernamebuf; timernamebuf << where << "::" << name; string const timername = timernamebuf.str(); -- cgit v1.2.3