Restarting Parameter Fits¶
The rsdfit
executable includes a restart
sub-command for restarting
parameter fits from existing parameter fit, which can be either a MCMC or NLOPT
.npz
result file. To restart from a specific result, simply pass the name
of the result file and specify the appropriate model to load and the
number of additional iterations to run.
The calling sequence is:
$ rsdfit restart -h
usage: rsdfit [-h] [--version] {mcmc,nlopt,restart,analyze} ...
From more help on each of the subcommands, type:
rsdfit mcmc -h
rsdfit nlopt -h
rsdfit restart -h
rsdfit analyze -h restart
[-h] -m MODEL -i ITERATIONS [-b BURNIN] [--silent] [--debug]
restart_files [restart_files ...]
positional arguments:
restart_files the name of the existing results file to restart from;
multiple files can be restarted at once, but as many
parallel processes as files must be present
optional arguments:
-h, --help show this help message and exit
-m MODEL, --model MODEL
file name holding the model path to load (required)
-i ITERATIONS the number of additional iterations to run (required)
-b BURNIN the number of steps to consider burnin, if running
MCMC
--silent silence the standard output to the console
--debug whether to print more info about the mpi4py.Pool
object
The code will run the number of additional iterations specified by the user
via the -i
flag. Upon finishing, a new results file holding the
concatenation of the result that was restarted and the new result will
be written to file. Then, lastly, the original result file that was restarted
will be deleted.
Note
It is possible to specify multiple result files on the command line to restart. In this case, a parameter fit will be restarted for each file passed, and the fits will run in parallel. Thus, there must be enough parallel MPI processes available to run each restart file specified on the command line. If this isn’t the case, the code will crash with an error.