wait_slurm | R Documentation |
Wait for a Slurm job to be completed
wait_slurm(x, ...)
## S3 method for class 'slurm_job'
wait_slurm(x, ...)
## S3 method for class 'integer'
wait_slurm(x, timeout = -1, freq = 0.1, force = TRUE, ...)
x |
Either a job id number, or an object of class slurm_job. |
... |
Further arguments passed to the method |
timeout |
Integer. Maximum wait time in seconds. If |
freq |
Frequency in seconds to query for the state of the job. |
force |
Logical scalar. When |
Invisible NULL
.
# Waiting is only available if there are Slurm clusters
if (slurm_available()) {
job <- Slurm_EvalQ(Sys.sleep(1000), plan = "submit", njobs = 2)
wait_slurm(job, timeout = 1) # This will return a warning
scancel(job)
Slurm_clean(job)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.