diff options
author | Thomas Radke <tradke@aei.mpg.de> | 2008-10-30 14:47:44 +0100 |
---|---|---|
committer | Thomas Radke <tradke@aei.mpg.de> | 2008-10-30 14:47:44 +0100 |
commit | bf6e1eff14c7dc6bf378d14bf4759c43e4751296 (patch) | |
tree | 62a8344f13a7c139c993a15dd8bcaa815dda1ff0 /Carpet/Carpet | |
parent | 26c6930be5de786aba2078e829c38b1ed911070d (diff) | |
parent | 4c6758fe5f7d509d7be68a024006d40edcb3b217 (diff) |
Merge branch 'master' of carpetgit@carpetcode.dyndns.org:carpet
Diffstat (limited to 'Carpet/Carpet')
-rw-r--r-- | Carpet/Carpet/src/Evolve.cc | 1 | ||||
-rw-r--r-- | Carpet/Carpet/src/Recompose.cc | 7 | ||||
-rw-r--r-- | Carpet/Carpet/src/Timing.cc | 16 | ||||
-rw-r--r-- | Carpet/Carpet/src/functions.hh | 1 |
4 files changed, 22 insertions, 3 deletions
diff --git a/Carpet/Carpet/src/Evolve.cc b/Carpet/Carpet/src/Evolve.cc index ec3eeb32e..05931fb52 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/Recompose.cc b/Carpet/Carpet/src/Recompose.cc index 62e6c6e43..958a5d058 100644 --- a/Carpet/Carpet/src/Recompose.cc +++ b/Carpet/Carpet/src/Recompose.cc @@ -1,6 +1,7 @@ #include <algorithm> #include <cassert> #include <cmath> +#include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> @@ -861,6 +862,12 @@ namespace Carpet { double (num_active_array_points / 1000000), double (num_total_array_points / 1000000), double (num_total_array_points / num_active_array_points * 100 - 100)); + + // After this, we will begin to allocate memory for the grid + // structure. If we run out of memory, ensure that this output + // still makes it to disk. + fflush (stdout); + fflush (stderr); } 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, |