stilt.execution.wait#

stilt.execution.wait(job_id, poll=30.0, *, cluster=None)[source]#

Wait until every task of a Slurm job array has ended, and return how each ended.

Polls sacct every poll seconds. A task that ended other than complete, or with failed simulations (exit 1) or interrupted ones (exit 3), is logged with its state; its simulations stay pending in the status table.

Parameters:
  • job_id (str) – The job array’s id.

  • poll (float) – Seconds between sacct calls.

  • cluster (str | None) – The Slurm cluster the job is on, when it is not the default one (clusters in the Slurm options).

Returns:

{task: (state, exit code)} as sacct gives them, such as {"123_0": ("COMPLETED", "0:0")}.

Return type:

dict[str, tuple[str, str]]