aboutsummaryrefslogtreecommitdiff
path: root/Carpet/Carpet/src
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2008-10-23 11:58:11 +0200
committerErik Schnetter <schnetter@cct.lsu.edu>2008-10-23 11:58:11 +0200
commit3be7da787d9d608d1fedf678ed06f457808f8dc8 (patch)
treed8c9e1fd4d2345c57fd66cf3b77f17ad43309d78 /Carpet/Carpet/src
parent24ca1ea0db321a8943db6aed6298c81c897a5351 (diff)
Carpet: Measure M/h only for evolution, disregarding initialisation
Diffstat (limited to 'Carpet/Carpet/src')
-rw-r--r--Carpet/Carpet/src/Evolve.cc1
-rw-r--r--Carpet/Carpet/src/Timing.cc16
-rw-r--r--Carpet/Carpet/src/functions.hh1
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,