The settings described on this page regulate the name and very specific content of the output file generated by DREAM.
At the end of a simulation, DREAM will save data from the simulation to an
output file. By default, this file is named output.h5
and is created
right before DREAM exits. The user can specify a custom name for the output
file by calling the setFilename()
method on the Output
object of the
DREAMSettings
object:
ds = DREAMSettings()
...
ds.output.setFilename("custom-output-filename.h5")
DREAM automatically monitors the execution time of certain critical parts of
the simulation. Information about the execution time can be output to stdout
at the end of a successfull simulation, and can also be stored in the final
output file.
Measurement of execution time is regulated by the setTiming()
method which
takes two booleans as arguments: stdout
, whether details about execution
time should be printed to stdout
at the end of the simulation, and file
,
whether the details should be stored in the final output file generated.
ds = DREAMSettings()
...
# Print timing info to stdout AND store in output file
ds.output.setTiming(stdout=True, file=True)
By default, no timing information is created.
Tip
Simulation output will generally be stored even if DREAM crashes. The named output file will then be created (or overwritten if it already exists) and contain data from all time steps that finished successfully. The data file can be loaded as usual with the DREAM Python output interface.