runtraj.execution.pbs.job_script#

runtraj.execution.pbs.job_script(project, execution, folder, n_tasks, *, skip_existing=True, compute_root=None)[source]#

Return the qsub script of a job array whose subjobs each run a share of the releases.

Subjob i runs runtraj run <project> --releases <folder>/releases.parquet --task i/n_tasks --execution <folder>/execution.yaml --cpus <cpus> with the Python that called this, and writes its log to <folder>/<i>.log. The #PBS lines come from execution’s pbs block: -J 0-<n_tasks - 1>%<n_workers> (no -J for one task), a chunk of ncpus=<cpus> and mem, walltime, queue, account, -V (the submitting shell’s environment, as Slurm passes it), -r y, and every other PBS resource of the block. Its setup commands run before the subjob, after the script exports OMP_NUM_THREADS=1. With skip_existing=False only a subjob’s first start runs again what exists; a subjob PBS starts again after a preemption skips it.

Return type:

str

Parameters: