mllg / batchtools

Tools for computation on batch systems
https://mllg.github.io/batchtools/
GNU Lesser General Public License v3.0
171 stars 51 forks source link

Support job depencencies #190

Open mllg opened 6 years ago

mllg commented 6 years ago

https://hpc.nih.gov/docs/job_dependencies.html

jgrn307 commented 6 years ago

I think this would be great. You could create/submit the jobs, and then when all of the jobs are completed have a "merge" job trigger without having the "submitter" job idling.

wlandau commented 6 years ago

Yes, thanks @mllg! This could make drake a lot more powerful, especially if future.batchtools adopts the functionality too. cc @HenrikBengtsson

jgrn307 commented 6 years ago

By the way, I'm happy to help test this out on a SLURM machine. It seems a good first step would be to focus on batchtools combine-type functions.

jgrn307 commented 6 years ago

Small correction with the above link -- when submitting the job via slurm, you will want to sbatch using the --parsable flag, e.g.: sbatch --parsable [blah blah] This will return ONLY the jobid and (optionally) the cluster name separated by a semicolon (the jobid is what you will need for job dependencies in SLURM -- if the semicolon is not in the string than the entire string should be the jobid). Without it, different slurm systems may output different text. We tried the NIH link above initially and it didn't work due to the lack of the --parsable, we had it return something like "Your job ID is [jobid]", the text of which may differ from system to system.

See: https://slurm.schedmd.com/sbatch.html