Esempio n. 1
0
 def startJob(self, params):
     work_dir = params['working_directory']
     use_machine(self.machine)
     self.cdir = CreateDirectory("remote", work_dir)
     trans = TransferFiles("remote",
                           params['input_directory'],
                           work_dir,
                           dependencies=[self.cdir])
     self.job = PBSScript("remote",
                          params['command'],
                          work_dir,
                          dependencies=[trans],
                          **params['additional_arguments'])
     self.job.run()
     try:
         ret = self.job._ret
         if ret:
             job_id = int(ret)
     except ValueError:
         end_machine()
         raise ModuleError(self, "Error submitting job: %s" % ret)
     return params