profit.run.slurm

Scheduling runs on a HPC cluster with SLURM

  • targeted towards aCluster@tugraz.at

  • each run is submitted as a job using a slurm batch script

  • run arrays are submitted as a slurm job array

  • by default completed runs are recognised by the interface, but the scheduler is polled as a fallback (less often)

Module Contents

Classes

SlurmRunner

Runner which submits each run as a job to the SLURM scheduler on a cluster

class profit.run.slurm.SlurmRunner(*, interface='zeromq', cpus=1, openmp=False, custom=False, path='slurm.bash', options=None, command='srun profit-worker', **kwargs)[source]

Bases: profit.run.runner.Runner

Runner which submits each run as a job to the SLURM scheduler on a cluster

  • generates a slurm batch script with the given configuration

  • can also be used with a custom script

  • supports OpenMP

  • tries to minimize overhead by using job arrays

  • polls the scheduler only at longer intervals

property config
__repr__()[source]

Return repr(self).

spawn(params=None, wait=False)[source]

spawn a single run

Parameters:
  • params – a mapping which defines input parameters to be set

  • wait – whether to wait for the run to complete

spawn_array(params_array, wait=False, progress=False)[source]

spawn an array of runs

maximum ‘parallel’ at the same time blocking until all are submitted

poll(run_id)[source]

check the status of the run directly

poll_all()[source]
cancel(run_id)[source]
cancel_all()[source]
clean()[source]

remove generated scripts and any slurm-stdout-files which match slurm-*.out

generate_script()[source]