Skip to content
Snippets Groups Projects
Commit 4b9333eb authored by Peters, Wouter's avatar Peters, Wouter
Browse files

added standard options for jet platform, including hold_jid

parent 3f158d64
Branches
No related tags found
No related merge requests found
......@@ -16,6 +16,8 @@ import subprocess
from da.baseclasses.platform import PlatForm
std_joboptions={'jobname':'test','jobaccount':'co2','jobnodes':'nserial 1','jobshell':'/bin/sh','depends':'','jobtime':'00:30:00'}
class JetPlatForm(PlatForm):
def __init__(self):
self.Identifier = 'NOAA jet' # the identifier gives the platform name
......@@ -35,13 +37,21 @@ class JetPlatForm(PlatForm):
"""#$ -S jobshell \n"""+ \
"""#$ -cwd \n"""+ \
"""#$ -r y \n"""+ \
"""#$ -j y \n"""+ \
"""\n"""
"""#$ -j y \n"""
if 'depends' in joboptions:
template += """#$ -hold_jid depends \n"""
# First replace from passed dictionary
for k,v in joboptions.iteritems():
while k in template:
template = template.replace(k,v)
# Fill remaining values with std_options
for k,v in std_joboptions.iteritems():
while k in template:
template = template.replace(k,v)
return template
def SubmitJob(self,jobfile):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment