Skip to content
davidressman edited this page Mar 21, 2013 · 7 revisions

FAQ Here are some questions that we've faced over the years. Hopefully this helps other people too:

How do I add the python environment to the job?

Add os.environ to Job.environment (thanks to Nick Schurch)

I have a comment about the documentation. Although the examples listed above are good to get me started. I see there are bunch of other functions that API exposes but I dont see any documentation/examples for them. Any page where we can find that?

s = drmaa.Session() s.initialize() jt = s.createJobTemplate()

Here is a list of methods I saw that were available. jt.

jt.HOME_DIRECTORY jt.deadlineTime jt.inputPath jt.nativeSpecification jt.transferFiles jt.PARAMETRIC_INDEX jt.delete jt.jobCategory jt.outputPath jt.workingDirectory jt.WORKING_DIRECTORY jt.email jt.jobEnvironment jt.remoteCommand jt.args jt.errorPath jt.jobName jt.softRunDurationLimit jt.attributeNames jt.hardRunDurationLimit jt.jobSubmissionState jt.softWallclockTimeLimit jt.blockEmail jt.hardWallclockTimeLimit jt.joinFiles jt.startTime

The details of the undocumented interfaces are just exposed from the underlying C definition. For example you can see the IDL definitions at OGF

I have a job script on SGE which has the following line embedded to specify the -pe option: "# -pe smp 8" How can I make DRMAA book the slots in SGE correctly?

If there are platform (SGE) specific things that you want to pass on that are not in the general drmaa interface, you can use the nativeSpecification field to pass any string that you like. E.g. job.nativeSpecification = "-pe smp 8"

Clone this wiki locally