runtraj.execution.SlurmConfig#

class runtraj.execution.SlurmConfig(*, n_workers: Annotated[int, Ge(ge=1)] = 1, cpus: Annotated[int, Ge(ge=1)] = 1, time: str | int | None = None, mem: str | None = None, partition: str | None = None, account: str | None = None, qos: str | None = None, array_parallelism: Annotated[int | None, Ge(ge=1)] = None, setup: list[str] = <factory>, fetch: runtraj.execution.config.FetchConfig | Literal[False] = <factory>, **extra_data: Any) → None[source]#

The Slurm job array a project’s releases run as: the slurm block of execution.

The releases are split among n_workers tasks, and each task runs cpus of them at once. Any key that is not a setting below is an sbatch option by its name, such as exclude: node1 or constraint: skl, written to the job script as given (true writes the bare flag) and able to replace a line the script would write. The fetch job takes clusters of these, and no other.

Parameters#

Parameter

Description

Default

n_workers

Number of array tasks, which the releases are split evenly among.

1

cpus

Releases each task runs at once, and the CPUs each task asks for.

1

time

Time limit per task, as HH:MM:SS, D-HH:MM:SS, or minutes. Required with backend: slurm: without it a task gets the partition’s default, which can be days.

None

mem

Memory per task, such as 8G.

None

partition

Slurm partition.

None

account

Slurm account.

None

qos

Slurm quality of service.

None

array_parallelism

Most tasks running at once. Unset leaves it to Slurm.

None

setup

Shell commands run in each task before the worker, such as module load lines. They run after the script exports OMP_NUM_THREADS, one thread per worker, so a line here can change it. The worker itself runs with the Python that submitted it.

[]

fetch

Get the met files a met with download lacks once, in a job of its own that the array waits for, with these resources (FetchConfig). false leaves each run to download what it needs, as when something else fills the met directory.

FetchConfig(partition=None, account=None, qos=None, time=None, mem=None)

Attributes#

options

every key of the block that is not one of its settings.