Changing priority of job in SGE using python drmaa wrapper

174 views Asked by At

When I try to submit a job using the python drmaa wrapper, I get a DeniedByDrmException: code 17: job rejected: positive submission priority requires operator privileges.

How do I change the priority of jobs that I submit using the Python DRMAA wrapper?

2

There are 2 answers

0
Sandman On BEST ANSWER

Created a ~/.sge_request file with a -p parameter set to 0.

0
sk8asd123 On

You can submit native options to drmaa.

documentation http://drmaa-python.readthedocs.io/en/latest/drmaa.html#drmaa.JobTemplate.nativeSpecification

example:

with drmaa.Session() as s:    
    jt = s.createJobTemplate()
    # set priority and any other options
    jt.nativeSpecification = '-p 5'
    jt.remoteCommand = <job_script>