Description Usage Format Value Usage Method description Examples
R6 Class providing an essential platform to process SLURM jobs. This class should not be explicitly used by the user. To create, manipulate, and submit SLURM jobs please refer to the Job and JobArray classes
1 |
R6 class
R6Class
with methods and fields for SLURM job manipulation
x <- JobInfo$new(jobName = NULL, outDir = NULL, partition = NULL, time = NULL, mem = NULL, proc = NULL, totalProc = NULL, nodes = NULL, email = NULL)
x$wait(stopIfFailed = F, verbose = T)
x$cancel()
x$getState(simplify = F)
x$clean()
Initialize
x <- JobInfo$new(jobName = NULL, outDir = NULL, partition = NULL, time = NULL, mem = NULL, proc = NULL, totalProc = NULL, nodes = NULL, email = NULL)
Parameters:
jobName : character - Name of job, if NULL one will be generated of the form rSubmitter_job_[random_alphanumeric]. Equivalent to --job-name
of SLURM sbatch. Most output files use it as a suffix
outDir : character - writeable path for the sabtch script as well as the SLRUM STDERR and STDOUT files. If NULL the current working directory will be used
partition : character - Partition to use. Equivalent to --partition
of SLURM sbatch
time : character - Time requested for job execution, one accepted format is "HH:MM:SS". Equivalent to --time
of SLURM sbatch
mem : character - Memory requested for job execution, one accepted format is "xG" or "xMB". Equivalent to --mem
of SLURM sbatch
proc : integer - Number of processors requested per task. Equivalent to --cpus-per-task
of SLURM sbatch
totalProc : integer - Number of tasks requested for job. Equivalent to --ntasks
of SLURM sbatch
nodes : integer - Number of nodes requested for job. Equivalent to --nodes
of SLURM sbatch
email : character - email address to send info when job is done. Equivalent to --nodes
of SLURM sbatch
Return:
object of class Job
Wait for job(s) to finish
x$wait(stopIfFailed = F, verbose = T)
Time between each job state check is defined in the entry TIME_WAIT_JOB_STATUS:seconds in the config file located at ~/.rSubmitter
Parameters:
stopIfFailed : logical - if TRUE stops when one job has failed (only useful for JobArray) it then cancels the rest of the pending and running jobs. If FALSE and one or more Jobs failed it raises a warning for each failed job
verbose : logical - if TRUE prints the job state(s) at every check
Return:
self - for method concatenation
Cancel job(s)
x$cancel()
Return:
self - for method concatenation
Get job(s) state
x$getState(simplify = F)
Parameters:
simplify : logical - if TRUE returns a freqeuncy data.frame of job states, otherwise returns individual jobs and their associated job names, job ids, and states
Return:
data.frame - With SLURM states
Remove SLURM-associated files
x$clean(script = TRUE, out = TRUE, err = TRUE)
Parameters:
script : logical - if TRUE deletes sbatch submission script(s) associated to this object
out : logical - if TRUE deletes STDOUT file(s) from SLURM associated to this object
err : logical - if TRUE deletes STDERR file(s) from SLURM associated to this object
Return:
self - for method concatenation
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.