aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Carpet/Carpet/param.ccl8
-rw-r--r--Carpet/Carpet/src/Evolve.cc5
-rw-r--r--Carpet/Carpet/src/Timing.cc58
3 files changed, 36 insertions, 35 deletions
diff --git a/Carpet/Carpet/param.ccl b/Carpet/Carpet/param.ccl
index 7244d43a5..3bb90b3e4 100644
--- a/Carpet/Carpet/param.ccl
+++ b/Carpet/Carpet/param.ccl
@@ -317,10 +317,6 @@ BOOLEAN suppress_restriction "Suppress the restriction operations. This makes t
-BOOLEAN silent "Display no info on the screen" STEERABLE=always
-{
-} "no"
-
BOOLEAN verbose "Display more info on the screen" STEERABLE=always
{
} "no"
@@ -347,12 +343,14 @@ BOOLEAN output_internal_data "Periodically print internal data to the screen for
INT print_timestats_every "Print interesting timing statistics periodically" STEERABLE=always
{
+ -1 :: "don't report"
0 :: "don't report"
1:* :: "report every so many iterations"
-} 1
+} 0
INT output_timers_every "Print detailed statistics periodically" STEERABLE=always
{
+ -1 :: "don't report"
0 :: "don't report"
1:* :: "report every so many iterations"
} 0
diff --git a/Carpet/Carpet/src/Evolve.cc b/Carpet/Carpet/src/Evolve.cc
index 687b725c0..15c63999a 100644
--- a/Carpet/Carpet/src/Evolve.cc
+++ b/Carpet/Carpet/src/Evolve.cc
@@ -467,10 +467,7 @@ namespace Carpet {
// Checking
CheckChecksums (cctkGH, alltimes);
- if (do_global_mode and
- print_timestats_every > 0 and
- cctkGH->cctk_iteration % print_timestats_every == 0)
- {
+ if (do_global_mode) {
// Timing statistics
PrintTimingStats (cctkGH);
}
diff --git a/Carpet/Carpet/src/Timing.cc b/Carpet/Carpet/src/Timing.cc
index ce1f13617..c66ec1fb2 100644
--- a/Carpet/Carpet/src/Timing.cc
+++ b/Carpet/Carpet/src/Timing.cc
@@ -176,42 +176,46 @@ namespace Carpet {
* grid_points_per_second = * local_grid_points_per_second;
- if (not silent) {
+ if (print_timestats_every > 0 and
+ cctkGH->cctk_iteration % print_timestats_every == 0)
+ {
+
CCTK_VInfo (CCTK_THORNSTRING,
"This processor's grid point updates per second (local): %g",
double (* local_grid_points_per_second));
CCTK_VInfo (CCTK_THORNSTRING,
"Overall grid point updates per second (total) : %g",
double (* total_grid_points_per_second));
- }
#if 0
- CCTK_REAL const updates_per_second_2 = ipow (updates_per_second, 2);
-
- struct {
- CCTK_REAL ups, ups2;
- } local, global;
- local.ups = updates_per_second;
- local.ups2 = updates_per_second_2;
- MPI_Allreduce (& local, & global, 2,
- dist::datatype (global.ups), MPI_SUM, dist::comm());
-
- int const count = dist::size();
- CCTK_REAL const avg = global.ups / count;
- CCTK_REAL const stddev = sqrt (abs (global.ups2 - ipow (avg,2)) / count);
-
- CCTK_VInfo (CCTK_THORNSTRING,
- "Local updates per second: %g", double (updates_per_second));
- CCTK_VInfo (CCTK_THORNSTRING,
- "Global updates per second: %g", double (global.ups));
-
- if (verbose) {
+ CCTK_REAL const updates_per_second_2 = ipow (updates_per_second, 2);
+
+ struct {
+ CCTK_REAL ups, ups2;
+ } local, global;
+ local.ups = updates_per_second;
+ local.ups2 = updates_per_second_2;
+ MPI_Allreduce (& local, & global, 2,
+ dist::datatype (global.ups), MPI_SUM, dist::comm());
+
+ int const count = dist::size();
+ CCTK_REAL const avg = global.ups / count;
+ CCTK_REAL const stddev = sqrt (abs (global.ups2 - ipow (avg,2)) / count);
+
CCTK_VInfo (CCTK_THORNSTRING,
- "Average updates per second: %g", double (avg));
+ "Local updates per second: %g", double (updates_per_second));
CCTK_VInfo (CCTK_THORNSTRING,
- "Standard deviation: %g", double (stddev));
- }
+ "Global updates per second: %g", double (global.ups));
+
+ if (verbose) {
+ CCTK_VInfo (CCTK_THORNSTRING,
+ "Average updates per second: %g", double (avg));
+ CCTK_VInfo (CCTK_THORNSTRING,
+ "Standard deviation: %g", double (stddev));
+ }
#endif
+
+ }
}
@@ -233,7 +237,9 @@ namespace Carpet {
* physical_time_per_hour =
physical_time / elapsed_walltime * CCTK_REAL (3600.0);
- if (not silent) {
+ if (print_timestats_every > 0 and
+ cctkGH->cctk_iteration % print_timestats_every == 0)
+ {
CCTK_VInfo (CCTK_THORNSTRING,
"Physical time per hour: %g",
double (* physical_time_per_hour));