diff --git a/da/platform/jet.py b/da/platform/jet.py index 5194f1c4cf34c6a208584b575a11f7aaae1bfaa8..50a0f47f97e0651820af8209e572da093185c217 100755 --- a/da/platform/jet.py +++ b/da/platform/jet.py @@ -64,10 +64,10 @@ class JetPlatForm(PlatForm): except: return os.getpid() - def SubmitJob(self,jobfile): + def SubmitJob(self,jobcommand): """ This method submits a jobfile to the queue, and returns the queue ID """ - cmd = ['qsub',jobfile] + cmd = ['qsub',jobcommand] output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0] ; logging.info(output) retcode = output.split()[-1] diff --git a/da/tools/initexit.py b/da/tools/initexit.py index cf65a06cb5eecb2b20a40afedddcbf08296e4bdc..313e81c5f5f4399016a65d5af55b19490c057939 100755 --- a/da/tools/initexit.py +++ b/da/tools/initexit.py @@ -495,10 +495,9 @@ class CycleControl(dict): def SubmitNextCycle(self): """ Submit the next job of a DA cycle, this consists of - * getting a job template as returned by :meth:`~da.tools.baseclasses.platform.GetJobTemplate` - * adding the lines needed to start a next run with a newly created rc-file - * Writing the jobfile as done by :meth:`~da.tools.baseclasses.platform.WriteJob` - * Submitting the jobfile as done by :meth:`~da.tools.baseclasses.platform.WriteJob` + * Changing to the working directory from which the job was started initially + * create a line to start the master script again with a newly created rc-file + * Submitting the jobfile If the end of the cycle series is reached, no new job is submitted. @@ -511,14 +510,9 @@ class CycleControl(dict): if self['time.start'] < self['time.finish']: - jobparams = {'jobname':'das','jobaccount':'co2','jobnodes':'nserial 1','jobtime':'06:00:00','jobshell':'/bin/sh'} - template = DaPlatForm.GetJobTemplate(jobparams) - template += 'cd %s\n'%os.getcwd() - template += '%s rc=%s'% (sys.argv[0], self['da.restart.fname'], ) ) - - cd = self['time.end'].strftime('%Y%m%d') - jobfile = DaPlatForm.WriteJob(self,template,'cycle.%s.das'%cd) - jobid = DaPlatForm.SubmitJob(jobfile) + jobcommand = '%s rc=%s'% (sys.argv[0], self['da.restart.fname'], ) ) + dummy = os.chdir(self['dir.da_submit'] ) + jobid = DaPlatForm.SubmitJob(jobcommand) else: logging.info('Final date reached, no new cycle started')