R/job_loop.R
job_loop.Rd
This function builds a bash script functioning as an array job that loops over a set of variables with pre-specified values.
job_loop(
loops,
name,
create_shell = FALSE,
partition = "shared",
memory = "10G",
cores = 1L,
tc = 20,
email = "ALL",
logdir = "logs"
)
A named list
where each of the elements are character vectors.
The names of loops
specify the variables used for the loops and the
contents specify the options to loop through for each variable.
A character(1)
vector giving either the name or path (relative
or absolute) to the shell script to create.
A logical(1)
vector specifying whether to create a
shell file for the script.
A character(1)
vector with the name of the SLURM
partition. Check how busy a given partition is by running
squeue -p [partition]
.
character(1): the amount of memory in total to request, as a number and unit accepted by the '--mem' SLURM parameter (e.g. '10G')
The number of cores to request. Note that the total memory
your job will request is cores
multiplied by memory
.
If task_num
is specified, this option controls the number of
concurrent tasks.
The email reporting option for the email address ("BEGIN", "END", "FAIL", or "ALL")
The directory to contain the log, as an absolute or relative path.
A length-2 list of character vectors containing the contents of the R and shell scripts
Other shell-script creation and submission functions:
array_submit()
,
job_single()