runtraj.execution.submit#
- runtraj.execution.submit(project, *, releases=None, execution=None, skip_existing=True, compute_root=None)[source]#
Submit every simulation of a project that has not finished to Slurm.
The releases with missing results are split among up to
n_workerstasks of one job array, and this returns once it is submitted. The submission is a folder_slurm/<date_time>_<id>/in the project:releases.txtlists the releases to run,releases.parquetholds their checked rows fromreleases.csv,execution.yamlholds the execution settings,job.shis the script given tosbatch, and<task>.logis each task’s log. Taskirunsruntraj run <project> --releases releases.parquet --task i/N, so it does not read and check all ofreleases.csvagain. A task that is preempted or nears its time limit requeues itself and skips what it finished (seerun()).When a met the unfinished simulations use downloads its files, a fetch job goes first: one task that runs
runtraj fetch <project> --releases releases.parquet(fetch_script()), written tofetch.shwith its log infetch.log, with the resources ofexecution.slurm.fetch. The array waits for it to end (--dependency=afterany), however it ended, so the runs whose met it got go ahead, and each task downloads what is still missing. Withskip_existing=Falseit gets the met of every run the array makes again. Ifsbatchrefuses the array, the fetch job is cancelled. Setexecution.slurm.fetchtofalsefor no fetch job.- Parameters:
- Returns:
The Slurm job id of the array, or
Nonewhen nothing needs to run.squeue -j <id>follows it andscancel <id>stops it. A fetch job is a job of its own: its id is logged and written tofetch.idin the submission folder, andscancelstops it too.- Return type:
- Raises:
ValueError – If the execution backend is not Slurm.