mache.parallel.slurm.get_slurm_version

mache.parallel.slurm.get_slurm_version() tuple[int, int] | None[source]

Get the major and minor version of the Slurm installed on this machine.

The version is read from srun itself rather than from a machine’s config, because a site can be upgraded across the 20.11 change in job step behavior without its mache config changing. It is looked up at most once per process.

Returns:

version (tuple of int or None) – The major and minor version, or None if srun is missing or reports a version that cannot be parsed.