utopya run-existing [Advanced]

utopya run-existing [Advanced]#

The utopya run-existing can be helpful to complete interrupted runs, in particular to complete universes that have not been worked on. However, the use of utopya run is always preferential, if possible.


The utopya run-existing is an advanced and experimental feature. It is not possible to change any (meta-) configuration entries, not even those associated with worker and runtime control.

utopya run-existing#

[EXPERIMENTAL] (Re-)Run universes of an existing simulation run.

Restores a run of MODEL_NAME from the given RUN_DIR. Subsequently, individual universes can be (re-)run.

Note that this feature is currently experimental, meaning that the interface may still change a lot.

utopya run-existing [OPTIONS] MODEL_NAME RUN_DIR


--label <label>#

For model names that have multiple info bundles registered, a label is needed to unambiguously select the desired one. Alternatively, use the utopya models set-default CLI command to set a default label for a model.

-u, --uni, --universe <universes>#

Which universes to run (e.g.: 00154). Note that leading zeros need to be added. To supply multiple, use the -u option multiple times. If no universes are specified, a run on all universes is performed.

-c, --clear-existing#

Whether to clear existing output files from universes. Set this option to re-run universes that were previously run. Cannot be used together with –skip-existing.

-s, --skip-existing#

Whether to skip universes with existing output. Set this option to complete universes from a previous run. Cannot be used together with –uni or –clear-existing.

-W, --num-workers <num_workers>#

Shortcut for meta-config entry worker_manager.num_workers, which sets the number of worker processes. Can be an integer; if negative, will deduce the number from the number of available CPUs.



Required argument


Required argument

Usecase: Distributed computation#

Another usecase where run-existing can be helpful is on distributed computers, e.g. clusters. In the slurm cluster this has been tested sucessfully. The pipeline is the following

  1. Perform utopya run .. --no-work, creating all universe configurations without working on them. Best to backup the executable.

  2. After completion, gather the paths of the universe output (data) directories in an array.

  3. Submit a sbatch array=1-N job, where the $SLURM_ARRAY_TASK_ID (from 1 to N) can be used as an index on the array of output directories: utopya run-existing MODEL_NAME FOLDER --uni UNIVERSES_ARRAY[ $SLURM_ARRAY_TASK_ID ].