asyncmd.slurm

asyncmd.slurm#

This module contains the implementation of the classes to interact with Slurm.

The SlurmClusterMediator is a singleton class (handling all sacct calls in a coordinated fashion) for all SlurmProcess instances. The SlurmProcess is a drop-in replacement for asyncio.subprocess.Subprocess and in this spirit this module also contains the function create_slurmprocess_submit, which similarly to asyncio.create_subprocess_exec, creates a SlurmProcess and directly submits the job. Finally this module contains two functions to set the configuration of this module, set_all_slurm_settings and set_slurm_settings.

Functions

create_slurmprocess_submit(jobname, ...[, ...])

Create and submit a SlurmProcess.

set_all_slurm_settings([sinfo_executable, ...])

(Re) initialize all settings relevant for SLURM job control.

set_slurm_settings([sinfo_executable, ...])

Set single or multiple settings relevant for SLURM job control.

Classes

SlurmClusterMediator(**kwargs)

Singleton class to be used by all SlurmProcess for sacct/sinfo calls.

SlurmProcess(jobname, sbatch_script[, ...])

Generic wrapper around SLURM submissions.

Exceptions

SlurmCancelationError

Error raised when something goes wrong canceling a SLURM job.

SlurmError

Generic error superclass for all SLURM errors.

SlurmSubmissionError

Error raised when something goes wrong submitting a SLURM job.