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

resubmission made platform independent now

parent bc7ff5b6
Branches
No related tags found
No related merge requests found
......@@ -489,15 +489,18 @@ class CycleControl(object):
import os
DaPlatForm = self.DaPlatForm
if self.da_settings['time.start'] < self.da_settings['time.finish']:
#code = subprocess.call(['qsub',sys.argv[0],'rc=%s' % rc_da_shell['da.restart.fname']] )
code = subprocess.Popen([os.getcwd()+'/das.py','rc=%s' % self.da_settings['da.restart.fname'],"process=all"] )
code=0
if code == 0:
logging.info('Submitted next cycle succesfully ')
else:
logging.error('Error in submitting next cycle, return code: %s ' % code)
raise OSError
cd = self.da_settings['time.end'].strftime('%Y%m%d')
jobparams = {'jobname':'das.%s'%cd,'jobaccount':'co2','jobnodes':'nserial 1','jobtime':'00:30:00','jobshell':'/bin/sh'}
template = DaPlatForm.GetJobTemplate(jobparams)
template += 'cd %s\n'%os.getcwd()
template += './das.py','rc=%s' % self.da_settings['da.restart.fname']
jobfile = DaPlatForm.WriteJob(self,template,'cycle.%s.das'%cd)
jobid = DaPlatForm.SubmitJob(jobfile)
else:
logging.info('Final date reached, no new cycle started')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment