Change in branches/4.6.x for comment and suggestions:
util/Makefile.common now has parameters
CLAW_OVERWRITE ?= True
CLAW_RESTART ?= False
The former was there before and if set to False, the output directory
specified by CLAW_OUTDIR will be moved before the code is run so it is
CLAW_RESTART is new and if set to True, the current fort.* files
CLAW_OUTDIR will be kept, so that for a restart these will be
augmented by new ones and the resulting directory will contain the
full time series.
Normally this should be set to true if and only if the setrun function contains
clawdata.restart = True
but I haven't come up with a good way to enforce this. The parameter
in setrun is used to generate the input file for the Fortran code,
whereas the value in the Makefile is used by python/pyclaw/runclaw.py
and passed in to python/pyclaw/controller.py and these functions don't
directly execute setrun (which is done by 'make .data').
So the upshot is that if you want to do a restart, you need to
remember to change both setrun.py and the Makefile, and of course copy
a checkpoint file of the form fort.chkXXXX to restart.data in the
If CLAW_RESTART == False and clawdata.restart == True, then the code
will run the restart and at the end the directory CLAW_OUTDIR will
contain only the fort.* files since the restart time. The original
files will have been removed (but may have first been copied elsewhere
if CLAW_OVERWRITE == False).
If CLAW_RESTART == True and clawdata.restart == False, then the code
will run from the start, but any old fort.* files in the outdir will
be preserved initially, and might or might not be overwritten
depending on how many output times the new run produces.
In any case, if CLAW_OVERWRITE == False and the directory specified by
CLAW_OUTDIR already exists, the original contents are moved to a file
of the form $(CLAW_OUTDIR)_<datetime> where <datetime> is the last
modification time of the original output directory, before running the
I'll write up some documentation on all this, but first people might
want to try it out and send suggestions for improvement.