Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUse SLURM dependencies to wait for jobs before getting output #2
Conversation
| # Submit a dummy job with dependency to block R script | ||
| wait_for_job <- function(slr_job) { | ||
| srun <- sprintf( | ||
| 'srun -n1 -t0:1 -o/dev/null -Q -dafterany:%d /bin/hostname', |
msmorul
Mar 6, 2017
This will work, however may want to use --dependency= as there is a discrepency between the llnl docs say (-P) https://computing.llnl.gov/tutorials/linux_clusters/man/srun.txt and what srun on our cluster accepts (-d).
This will work, however may want to use --dependency= as there is a discrepency between the llnl docs say (-P) https://computing.llnl.gov/tutorials/linux_clusters/man/srun.txt and what srun on our cluster accepts (-d).
@msmorul After you mentioned today that
srunblocks until the job is done, I realized this provides a mechanism to block the R process too viasystem('srun ...'). Just had to make a slurm_job's output collection function execute a dummy job with srun that has the parent job as a dependency. I don’t believe it locks up a cluster node, but let me know what you think of this solution.