diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-10-23 11:58:11 +0200 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-10-23 11:58:11 +0200 |
commit | 3be7da787d9d608d1fedf678ed06f457808f8dc8 (patch) | |
tree | d8c9e1fd4d2345c57fd66cf3b77f17ad43309d78 /Carpet | |
parent | 24ca1ea0db321a8943db6aed6298c81c897a5351 (diff) |
Carpet: Measure M/h only for evolution, disregarding initialisation
Diffstat (limited to 'Carpet')
-rw-r--r-- | Carpet/Carpet/src/Evolve.cc | 1 | ||||
-rw-r--r-- | Carpet/Carpet/src/Timing.cc | 16 | ||||
-rw-r--r-- | Carpet/Carpet/src/functions.hh | 1 |
3 files changed, 15 insertions, 3 deletions
diff --git a/Carpet/Carpet/src/Evolve.cc b/Carpet/Carpet/src/Evolve.cc index b19f12da9..5b9d8ff96 100644 --- a/Carpet/Carpet/src/Evolve.cc +++ b/Carpet/Carpet/src/Evolve.cc @@ -57,6 +57,7 @@ namespace Carpet { do_taper = use_tapered_grids; // Main loop + BeginTiming (cctkGH); static Timer timer ("Evolve"); timer.start(); while (not do_terminate (cctkGH)) { diff --git a/Carpet/Carpet/src/Timing.cc b/Carpet/Carpet/src/Timing.cc index f767f1ea5..6c4102733 100644 --- a/Carpet/Carpet/src/Timing.cc +++ b/Carpet/Carpet/src/Timing.cc @@ -136,9 +136,6 @@ namespace Carpet { { DECLARE_CCTK_ARGUMENTS; - initial_walltime = get_walltime(); - initial_phystime = cctkGH->cctk_time; - * physical_time_per_hour = 0.0; * time_total = 0.0; @@ -171,6 +168,19 @@ namespace Carpet { + // Begin timing (to be called after initialisation, just before the + // main evolution begins) + void + BeginTiming (cGH const * const cctkGH) + { + DECLARE_CCTK_ARGUMENTS; + + initial_walltime = get_walltime(); + initial_phystime = cctkGH->cctk_time; + } + + + // Take a step on the current refinement and multigrid level (to be // called when EVOL is scheduled) void diff --git a/Carpet/Carpet/src/functions.hh b/Carpet/Carpet/src/functions.hh index 0d1e9104b..d8b508441 100644 --- a/Carpet/Carpet/src/functions.hh +++ b/Carpet/Carpet/src/functions.hh @@ -177,6 +177,7 @@ namespace Carpet { // Timing statistics functions void InitTimingStats (cGH const * cctkGH); + void BeginTiming (cGH const * cctkGH); void StepTiming (cGH const * cctkGH); void BeginTimingIO (cGH const * cctkGH); void EndTimingIO (cGH const * cctkGH, |