enjoy_slurm.Job#

class enjoy_slurm.Job(job=None, jobid=None, interpreter=None, shebang=None, verbose=False, **kwargs)[source]#

Slurm Job class.

The Job class can manage meta data and submission of a Slurm job.

Parameters:
  • job (str) – Path to jobscript or a command that should be wrapped.

  • jobid (int) – Jobid to create a Job instance from.

Returns:

job – Job instance either created from jobid or jobscript.

Return type:

Job

__init__(job=None, jobid=None, interpreter=None, shebang=None, verbose=False, **kwargs)[source]#

Methods

__init__([job, jobid, interpreter, shebang, ...])

jobinfo(**kwargs)

Jobinfo as dictionary

run()

Run the script without submitting it so Slurm.

sacct(**kwargs)

Get accounting for this job

sbatch(**kwargs)

Submit job to Slurm

Attributes

fields

Available job attributes

script

property fields#

Available job attributes

jobinfo(**kwargs)[source]#

Jobinfo as dictionary

run()[source]#

Run the script without submitting it so Slurm.

sacct(**kwargs)[source]#

Get accounting for this job

sbatch(**kwargs)[source]#

Submit job to Slurm

property script#