Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 836 Bytes

README.rst

File metadata and controls

29 lines (19 loc) · 836 Bytes
https://travis-ci.com/ACRC/slurm-job-submit-python.svg?branch=master

Python Job Submit plugin for Slurm

Similar the now built-in plugin for Lua, this plugin allows the use of Python scripts to control job submission.

For example, a plugin file called /etc/slurm/job_submit.py with:

def job_submit(job_desc, submit_uid):
    job_desc.partition = "debug"
    return 0

will set the partition of all jobs to be debug.

Or, a plugin like:

def job_submit(job_desc, submit_uid):
    job_desc.environment["NEW_ENV_VAR"] = "a new env var"
    return 0

will set an environment variable called NEW_ENV_VAR with the value a new env var in all jobs.