batch_writer | R Documentation |
A wrapper around writing the script given the desired command, a short name for the job, and many optional parameters. Defaults are for my current setup (latest R version on cluster).
batch_writer(
commands,
name,
R = "4.0.0",
mem = NA,
time = NA,
nodes = 1,
threads = 1,
array = NA,
partition = "biostat",
account = NA,
email = NA
)
commands |
A character vector of commands to run, one per line. |
name |
Short name for for batch script file, job, and stdout/stderr output paths |
R |
Specify R version, to load module ( |
mem |
Memory limit.
|
time |
Time limit.
|
nodes |
Number of nodes to use (default 1). |
threads |
Number of tasks per node (default 1). |
array |
Value for array jobs (default NA is not an array job; typical values are numeric ranges passed as strings, such as "1-50", "0-90", or discontinuous ranges such as "1,4,10-20"). |
partition |
The partition to submit to, by default |
account |
Account to use.
|
email |
Address to receive emails about job completion. |
batch_submit()
to submit slurm batch scripts.
batch_cleanup()
to remove slurm batch scripts.
# set desired parameters
commands <- 'time echo "Hello world!"'
name <- 'hola'
# writes file `hola.q`
batch_writer(
commands,
name
)
# cleanup
batch_cleanup( name )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.