polaris.job.submit_job

polaris.job.submit_job(job_script, work_dir, system, dependency=None, extra_args=None)[source]

Submit a job script from its work directory

Polaris job scripts change to the directory they were submitted from, so the script is always submitted from work_dir.

Parameters:
  • job_script (str) – The job script to submit, relative to work_dir or absolute

  • work_dir (str) – The directory to submit the job from

  • system ({'slurm', 'pbs'}) – The scheduler, as in the [parallel] system config option

  • dependency (str, optional) – A job id that must finish, successfully or not, before this job starts

  • extra_args (list of str, optional) – More options for sbatch or qsub, which override those in the job script

Returns:

job_id (str) – The id of the submitted job

Raises:

polaris.job.SubmissionError – If the scheduler refuses the job, with its message