From 57e66ad6c345bcc1e7f805ce95ac0ca39bc6184d Mon Sep 17 00:00:00 2001 From: jthorn Date: Tue, 14 Jun 2005 13:46:07 +0000 Subject: * implement new verbose_level option "no output" * decrease the default verbose_level from "algorithm highlights" down to "physics details" git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@1423 f88db872-0e4f-0410-b76b-b9085cfa78c5 --- doc/documentation.tex | 5 ++++- param.ccl | 6 ++++-- src/driver/Newton.cc | 21 ++++++++++++--------- src/driver/driver.hh | 1 + src/driver/setup.cc | 4 +++- 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/doc/documentation.tex b/doc/documentation.tex index 7b62027..4d7e0fc 100644 --- a/doc/documentation.tex +++ b/doc/documentation.tex @@ -433,6 +433,9 @@ section~\ref{AHFinderDirect/sect-examples} should make this clear. doing. In order from tersest to most verbose, the allowable values are \begin{description} + \item[\code{"no output"}] + \mbox{}\\ + Don't print anything. \item[\code{"physics highlights"}] \mbox{}\\ Print only a single line each time @@ -442,12 +445,12 @@ section~\ref{AHFinderDirect/sect-examples} should make this clear. \mbox{}\\ Print two lines for each horizon found, giving the horizon area, centroid position, and irreducible mass. + This is the default. \item[\code{"algorithm highlights"}] \mbox{}\\ Also print a single line for each Newton iteration giving the 2-norm and $\infty$-norm of the $\Theta(h)$ function defined by equation~\eqref{AHFinderDirect/eqn-horizon}. - This is the default. \item[\code{"algorithm details"}] \mbox{}\\ Print lots of detailed messages tracing what the code diff --git a/param.ccl b/param.ccl index ac30220..eb712a4 100644 --- a/param.ccl +++ b/param.ccl @@ -165,10 +165,12 @@ Boolean always_broadcast_horizon_shape \ keyword verbose_level \ "controls which (how many) messages to print describing AH finding" { +"no output" :: "don't print anything" + # 1 line each time step giving which horizons were found "physics highlights" :: "just a few physics messages" -# 1 line for each horizon giving position/mass/area, + a summary line or two +# 2 lines for each horizon giving position/mass/area, + a summary line or two "physics details" :: "more detailed physics messages" # 1 line giving Theta(h) norms at each Newton iteration @@ -182,7 +184,7 @@ keyword verbose_level \ # even more details tracing what the code is doing :) "algorithm debug" :: \ "physics details + lots and lots of messages about the AH-finding algorithm" -} "algorithm highlights" +} "physics details" # n.b. printing timing stats is independent of verbose_level Boolean print_timing_stats \ diff --git a/src/driver/Newton.cc b/src/driver/Newton.cc index aaf918c..2a54d17 100644 --- a/src/driver/Newton.cc +++ b/src/driver/Newton.cc @@ -110,15 +110,18 @@ const bool my_active_flag = hs.has_genuine_horizons(); const int N_horizons = hs.N_horizons(); // print out which horizons we're finding on this processor -if (hs.has_genuine_horizons()) - then CCTK_VInfo(CCTK_THORNSTRING, - "proc %d: searching for horizon%s %s/%d", - my_proc, - (hs.my_N_horizons() > 1 ? "s" : ""), - hs.sequence_string(","), N_horizons); - else CCTK_VInfo(CCTK_THORNSTRING, - "proc %d: dummy horizon(s) only", - my_proc); +if (verbose_info.print_physics_details) + then { + if (hs.has_genuine_horizons()) + then CCTK_VInfo(CCTK_THORNSTRING, + "proc %d: searching for horizon%s %s/%d", + my_proc, + (hs.my_N_horizons() > 1 ? "s" : ""), + hs.sequence_string(","), N_horizons); + else CCTK_VInfo(CCTK_THORNSTRING, + "proc %d: dummy horizon(s) only", + my_proc); + } // // each pass through this loop finds a single horizon, diff --git a/src/driver/driver.hh b/src/driver/driver.hh index d951f97..ae169fd 100644 --- a/src/driver/driver.hh +++ b/src/driver/driver.hh @@ -34,6 +34,7 @@ enum method // enum verbose_level { + verbose_level__no_output, verbose_level__physics_highlights, verbose_level__physics_details, verbose_level__algorithm_highlights, diff --git a/src/driver/setup.cc b/src/driver/setup.cc index 44c0d65..d010d32 100644 --- a/src/driver/setup.cc +++ b/src/driver/setup.cc @@ -677,7 +677,9 @@ namespace { enum verbose_level decode_verbose_level(const char verbose_level_string[]) { -if (STRING_EQUAL(verbose_level_string, "physics highlights")) +if (STRING_EQUAL(verbose_level_string, "no output")) + then return verbose_level__no_output; +else if (STRING_EQUAL(verbose_level_string, "physics highlights")) then return verbose_level__physics_highlights; else if (STRING_EQUAL(verbose_level_string, "physics details")) then return verbose_level__physics_details; -- cgit v1.2.3