Difference between revisions of "Python DRMAA"

From wiki
Jump to: navigation, search
(Created page with "=Introduction= A python interface that uses the DRMAA C-binding API to automate parts of running queue jobs, to make the process a bit more mangeable. It is not terribly sop...")
(No difference)

Revision as of 19:15, 5 December 2016

Introduction

A python interface that uses the DRMAA C-binding API to automate parts of running queue jobs, to make the process a bit more mangeable.

It is not terribly sophisticated, so is not capable of miracles, though one or two of its abilities may come in handy.

Key insight

When a jobTemplate is defined, the queue options under which the job will be run are put into an opaque string, similar to how you would enter the details to qsub on the command line. You set it like this:

s = drmaa.Session()
s.initialize()
jt = s.createJobTemplate()
jt.nativeSpecification='-q single.q -pe multi 2'

So this will run the script on the single.q queue with two threads per script.

So the script can be a normal bash without any pragma (i.e. #$ ) options for the script.