Beispiel #1
0
 def run_locally(self, steps=None, **kwargs):
     """A convenience method to run the same result as a SLURM job
     but locally in a non-blocking way."""
     self.slurm_job = LoggedJobSLURM(self.command(steps),
                                     base_dir = self.parent.p.logs_dir,
                                     modules  = self.modules,
                                     **kwargs)
     self.slurm_job.run_locally()
Beispiel #2
0
 def run_slurm(self, steps=None, **kwargs):
     """Run the steps via the SLURM queue."""
     # Optional extra SLURM parameters #
     params = self.extra_slurm_params
     params.update(kwargs)
     # Mandatory extra SLURM parameters #
     if 'time'       not in params: params['time']       = self.default_time
     if 'job_name'   not in params: params['job_name']   = self.job_name
     if 'email'      not in params: params['email']      = None
     if 'dependency' not in params: params['dependency'] = 'singleton'
     # Send it #
     self.slurm_job = LoggedJobSLURM(self.command(steps),
                                     base_dir = self.parent.p.logs_dir,
                                     modules  = self.modules,
                                     **params)
     # Return the Job ID #
     return self.slurm_job.run()