stilt.execution.run_simulations#

stilt.execution.run_simulations(model, sim_ids, *, n_cores=1, skip_existing=None)[source]#

Run a list of simulation ids for model, inline or in a process pool.

Pool workers rebuild the model from model.project.root, so the project’s inputs must already be persisted (Model.register() does this; Model.run() calls it). A SIGTERM (Slurm preemption or wall-time) is turned into an interrupted result and stops the batch.

Parameters:
  • model (Model) – The model the simulations belong to.

  • sim_ids (list[str]) – Simulation ids to run.

  • n_cores (int) – Worker processes. 1 runs inline in this process.

  • skip_existing (Optional[bool]) – Skip outputs that already exist. Defaults to config.skip_existing.

Returns:

One result per id, in input order (truncated after an interruption).

Return type:

list[SimulationResult]