aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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,