np - an enzo progress meter.
Author: Britton D. Smith <email@example.com>
Date: January 26, 2009.
Affiliation: Michigan State University
np is a progress meter for Enzo, inspired by John Wise's progress script.
np works with both cosmological and non-cosmological Enzo simulations,
providing a useful breakdown of the progress of a currently running simulation.
np gathers information about the parameters of the simulation and the current
state of the AMR hierarchy by parsing the files, amr.out and
OutputLevelInformation.out, which are created automatically by Enzo.
Additionally, np is able to report more up to date information, such as the
current level being evolved or rebuilt as well as the creation of any
additional levels of refinement created since the last top grid timestep.
This is done by piping a 'tail -f' process performed on the Enzo standard
output file. This requires the user to be piping any Enzo output to a file.
This can be accomplished in the following manner:
./enzo -d my_parameter_file >& enzo_output.dat
The & symbol ensures that the stderr output is piped to the same file as the
stdout. This is useful as most Enzo output actually goes to stderr.
II. RUNNING NP
np comes with a few options that can be changed with various command line
flags. Calling './np -h' will print a description of them all.
-h: print this help output.
-hf <filename>: hierarchy file (default: OutputLevelInformation.out).
-l <number of output lines>: print enzo standard out lines (default: 0).
-of <filename>: enzo standard out file (default: estd.out).
-pf <filename>: parameter file (default: amr.out).
-t <title>: title of simulation.
-w <seconds>: change number of seconds between output (default: 1).
III. NP OUTPUT
The output of np is divided into four sections: Time, Redshift, Output, and Hierachy.
Time: the initial, current, and final time of the simulation in code units and years.
Redshift: the initial, current, and final redshift of the simulation. For
non-cosmological simulations, this will disappear.
Output: the time (in code units) and the redshift (if a cosmological simulation) of
the next and last data output. This includes both dt outputs and redshift
Hierachy: information on the current state of the AMR hierarchy.
Level: refinement level.
Grids: number of grids on that level at the end of the last top grid
Volume: the fractional volume of the computational domain on that level.
Sub: the fraction of the parent grid's timestep over which that level
Iter: total number of iterations on that level.
Last column: an arrow indicating the level on which computation is being
performed at that moment.
E: evolve level
R: rebuild hierarchy
IV. CUSTOMIZING NP OUTPUT
The order and orientation of the four sections can be changed by altering the array
called "format" in the section title "Output format", starting on line 46. The
default is an attractive 2 x 2, defined as:
# Nice 2 x 2.
@format = ([\@timeSection,\@outputSection],
Examples for fully horizontal and vertical formatting are provided as well. Further
customization is possible following the examples provided. If outputting of the
Enzo output is enable with the -l flag, it will always appear at the very bottom.