runtraj.execution.worker.run_releases#

runtraj.execution.worker.run_releases(project, release_ids, *, compute_root, execution=None, skip_existing=True)[source]#

Run a list of releases, in this process or in a process pool.

The variants of a batched transport model run first, one model call for all the releases that need their particles. Then each release runs its other variants. Pool workers open the project again from its directory, with the same output directory. Ctrl-C, or a SIGTERM such as Slurm preemption or a stopped pod, stops the batch: the transport model runs in progress are ended, the workers exit, and this logs how many releases had finished and returns. What finished is in the output directory, with a failure record for each simulation that failed; a run that was cut off leaves only its log line, so it is interrupted in runtraj.Project.status().

An error that escapes a release’s own handling (run_release() records a failure for one and goes on; this is anything outside that, such as a shared resource that stops answering) stops the batch too: the pool is terminated and the error raised to the caller.

Parameters:
  • project (runtraj.project.Project) – Project the releases belong to.

  • release_ids (list[str]) – Releases to run.

  • compute_root (Path) – Directory the workdirs are made in, a new one for each run, as resolve_compute_root() returns it.

  • execution (ExecutionConfig | None) – Execution settings: cpus is the number of worker processes (1 runs in this process), and timeout and keep_workdir apply to each run. Defaults to the project’s.

  • skip_existing (bool) – Keep particles and stage files that already exist.

Return type:

None