Before each time step CO5BOLD checks in the working directory
whether the file rhd.stop
exists.
If it has been generated (e.g. with touch rhd.stop
),
the code exits gracefully, i.e. it produces a
proper final model, which can be used to restart the code.
This method of stopping a simulation is to be preferred over
a simple kill
or qdel
command because it allows
to analyze the state of the model just at the end of the simulation
and a smooth restart.
Before the restart the rhd.stop
file has to be deleted!
The simulation can be continued by just initiating a new run.
If the file rhd.cont
exists at the beginning of a
simulation, the code tries to resume an interrupted computation:
The initial model will not be taken from the start model file
(infile_start
) but from the final model (outfile_end
).
The data for the full and the mean file is not written into new files
but will be appended to the existing ones.
In this way a simulation can be interrupted and continued in a fairly
safe way. It is possible to analyze the final model and to changes
values in the parameter file.
Keep in mind that after a restart with rhd.cont
the specifications
about the length of the job (e.g. the number of time steps) will be
counted from the restart point and not from the beginning of the original
simulation.
To interrupt a job with rhd.stop
can be very handy.
The continuation with rhd.cont
and the old parameter file
is not to be preferred over an ordinary restart with a new parameter file.
At the beginning of every time step CO5BOLD checks in the working directory
whether the file rhd.dump
exists.
If it has been generated (e.g. with touch rhd.dump
)
and the file rhd.snap
does not exist, the current model is written
into rhd.snap
. It has the same file properties (format and conversion)
as the regular rhd.end
file.
The run of the simulation itself is not modified. This feature
might be useful for debugging purposes.