Using the sacct function, it checks the status of a particular job and returns information about its current state, with details regarding the jobs (if an array) that are done, running, pending, or failed.
status(x)
# S3 method for slurm_job
status(x)
# S3 method for default
status(x)
# S3 method for slurm_status
$(x, name)
Either a Job id, an object of class slurm_job
, or an object of
class slurm_status
.
Character scalar. List of status to retrieve. This can be any of
"done"
, "failed"
, "running"
, or "pending"
.
An integer with attributes of class slurm_status
. The attributes
are integer vectors indicating which jobs fail in the categories of done
,
failed
, pending
, and running
(see JOB_STATE_CODES). Possible return
values are:
-1
: No job found. This may be a false negative as the job may still be
on it's way to be submitted.
0
: Job completed.
1
: All jobs are pending resource allocation or are on it's way to start.
2
: All jobs are currently running.
3
: One or more jobs are still running.
99
: One or more jobs failed.
If the job is not an array, then function will return the corresponding code but the attributes will only have a single number, 1, according to the state of the job (completed, failed, pending).
Other utilities:
Slurm_clean()
,
Slurm_env()
,
Slurm_log()
,
WhoAmI()
,
parse_flags()
,
snames()
Other post submission:
Slurm_clean()
,
Slurm_collect()
,
Slurm_log()
if (FALSE) {
x <- Slurm_EvalQ(Sys.sleep(100), njobs = 2)
status(x) # A possible result: An integer with attributes
# Status: All jobs are pending resource allocation or are on it's way to start. (Code 1)
# This is a job array. The status of each job, by array id, is the following:
# done : -
# failed : -
# pending : 1, 2.
# running : -
}