Logfile Control#

The user has a lot of control over what text appears in the logfile, or what is written to the screen during an ATS run. Typically one will forward this to a file, e.g.:

ats --verbosity=LEVEL path_to_input.xml &> out.log

The verbosity LEVEL controls how much is written to the logfile:

  • “none” Literally nothing. This is useful for large ensembles of runs, but is not recommended.

  • “low” Very little – effectively just a summary of each timestep with no PK-level granularity.

  • “medium” All of the above plus each PK provides a summary for each timestep.

  • “high” All of the above plus each iteration in a solve of each PK at each timestep. This also turns on debug cells.

  • “extreme” All of the above plus each evaluator will provide a summary of whether it gets updated or not. Recommended only for input file debugging.

This option sets the default verbosity of all evaluators, PKs, operators, solvers, etc of the simulation. For more fine-grained control, each component also accepts a Verbose Object spec which overrides the global verbosity to control output from that component.

Verbose Object#

src/utils/VerboseObject.hh

This allows control of log-file verbosity for a wide variety of objects and physics.

verbose-object-spec

  • “verbosity level[string] GLOBAL_VERBOSITY, “low”, “medium”, “high”, “extreme” The default is set by the global verbosity spec, (fix me!) Typically, “low” prints out minimal information, “medium” prints out errors and overall high level information, “high” prints out basic debugging, and “extreme” prints out local debugging information.

  • “write on rank[int] 0 VerboseObjects only write on a single rank – by deafult the 0th rank. However, sometimes it is useful for debugging to write from another rank due to a need for cleaner output or writing a specific cell/entity information.

  • “output filename[string] optional Redirect this output to a specific file rather than writing to screen. Note this will be done by-the-instance, so this may not catch as much as one might think.

Example:

<ParameterList name="verbose object">
  <Parameter name="verbosity level" type="string" value="medium"/>
  <Parameter name="name" type="string" value="my header"/>
  <Parameter name="hide line prefix" type="bool" value="false"/>
  <Parameter name="write on rank" type="int" value="0"/>
</ParameterList>

Debugger#

src/state/Debugger.hh

A utility for printing field values at specific IDs controlled by the user.

This is a utility that makes it easier for the user to control output written to the screen. It allows the user to provide element IDs, and then provides functionality for a PK to write mesh geometry information and vector values of those elements to screen based upon verbosity levels.

Note, most information is only written if the owning object’s verbosity level from the “verbose object” spec is set to “high” or higher.

debugger-spec

  • “debug cells[Array(int)] optional For each global ID of a cell provided here, controls writing of vectors inside of the using PK.

  • “debug faces[Array(int)] optional For each global ID of a face provided here, writes all adjoining cell information as if each cell was included in “debug cells”.

Residual Debugger#

src/solvers/ResidualDebugger.hh

Debugging object for writing vectors to file within an iterative process for use with vis tools.

residual-debugger-spec

  • “file name base[string] amanzi_dbg Prefix for output filenames.

INCLUDES: