Job control on SLURM clusters (possibly connecting to the front-end via SSH).

class gc3libs.backends.slurm.SlurmLrms(name, architecture, max_cores, max_cores_per_job, max_memory_per_core, max_walltime, auth, frontend, transport, **extra_args)

Job control on SLURM clusters (possibly by connecting via SSH to a submit node).

get_resource_status(*args, **kwargs)

Update the status of the resource associated with this LRMS instance in-place. Return updated Resource object.

gc3libs.backends.slurm.count_jobs(squeue_output, whoami)

Parse SLURM’s squeue output and return a quadruple (R, Q, r, q) where:

  • R is the total number of running jobs (from any user);
  • Q is the total number of queued jobs (from any user);
  • r is the number of running jobs submitted by user whoami;
  • q is the number of queued jobs submitted by user whoami

The squeue_output must contain the results of an invocation of squeue --noheader --format='%i^%T^%u^%U^%r^%R'.