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

added non-blocking option for submitting next cycle

parent dcae8161
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ class JetPlatForm(PlatForm):
msg2 = '%s version: %s'%(self.Identifier,self.Version) ; logging.debug(msg2)
def GetJobTemplate(self,joboptions={}):
def GetJobTemplate(self,joboptions={},block=False):
""" Return the job template for a given computing system, and fill it with options from the dictionary provided as argument"""
template = """#$ -N jobname \n"""+ \
......@@ -37,13 +37,15 @@ class JetPlatForm(PlatForm):
"""#$ -S jobshell \n"""+ \
"""#$ -o joblog \n"""+ \
"""#$ -cwd\n"""+ \
"""#$ -sync y\n"""+ \
"""#$ -r n\n"""+ \
"""#$ -j y\n"""
if 'depends' in joboptions:
template += """#$ -hold_jid depends \n"""
if block:
template += """#$ -sync y\n"""
# First replace from passed dictionary
for k,v in joboptions.iteritems():
while k in template:
......@@ -67,9 +69,9 @@ class JetPlatForm(PlatForm):
cmd = ['qsub',jobfile]
output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0] ; logging.info(output)
retcode = output.split()[-1][0]
retcode = output.split()[-1]
msg = 'Job completed with return code %s'%retcode ; logging.debug(msg)
msg = 'Job returned: %s'%retcode ; logging.debug(msg)
return retcode
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment