Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SLURM dependencies to wait for jobs before getting output #2

Merged
merged 6 commits into from Mar 7, 2017
Merged

Conversation

@itcarroll
Copy link
Contributor

@itcarroll itcarroll commented Jan 25, 2017

@msmorul After you mentioned today that srun blocks until the job is done, I realized this provides a mechanism to block the R process too via system('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.

# 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',

This comment has been minimized.

@msmorul

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).

Ian Carroll added 2 commits Mar 7, 2017
@itcarroll itcarroll merged commit 19f5e71 into master Mar 7, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@itcarroll itcarroll deleted the wait branch Mar 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.