Create a gist now

Instantly share code, notes, and snippets.

@Phhere / Secret
Created May 29, 2017

What would you like to do?
Job Move Hook
import pbs
import sys
event = pbs.event()
if (event.type is pbs.QUEUEJOB):
if hasattr(event, 'job'):
job = event.job
chunks = parse_select(job.Resource_List)
if not chunks['arch']:
if chunks['max_ncpus'] > 24 or chunks['max_mem'] > 112096796672:
chunks['arch'] = 'uv2000'
if chunks['arch'] == 'uv2000':
q_uv2000 = pbs.server().queue('UV2000')
job.queue = q_uv2000
except SystemExit:
# The e.accept() and e.reject() methods generate a SystemExit
# exception.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment