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

Mapped missing Slurm job state codes #277

Merged
merged 1 commit into from
Jul 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions R/clusterFunctionsSlurm.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,26 @@ makeClusterFunctionsSlurm = function(template = "slurm", array.jobs = TRUE, node
if (length(clusters)) tail(res$output, -1L) else res$output
}


# Full List of Slurm job state codes:
# https://slurm.schedmd.com/squeue.html
# BF,CA,CD,CF,CG,DL,F,NF,OOM,PD,PR,R,RD,RF,RH,RS,RV,SI,SE,SO,ST,S,TO
# Querying by RD (RESV_DEL_HOLD) status throwing error on slurm v20.11.4


listJobsQueued = function(reg) {
args = c(quote("--user=$USER"), "--states=PD")
args = c(quote("--user=$USER"), "--states=PD,CF,RF,RH,RQ,SE")
listJobs(reg, args)
}

listJobsRunning = function(reg) {
args = c(quote("--user=$USER"), "--states=R,S,CG")
args = c(quote("--user=$USER"), "--states=R,S,CG,RS,SI,SO,ST")
listJobs(reg, args)
}

# Slurm job state codes that will result in an expired status:
# BF,CA,CD,DL,F,NF,OOM,PR,RV,TO,RD

killJob = function(reg, batch.id) {
assertRegistry(reg, writeable = TRUE)
assertString(batch.id)
Expand Down