job_single | R Documentation |
This function builds a template for a Son of Grid Ending (SGE) job script including array jobs. Check this blog post by John Muschelli to learn more about array jobs: https://hopstat.wordpress.com/2013/11/05/array-and-sequential-cluster-jobs/.
job_single(
name,
create_shell = FALSE,
queue = "shared",
memory = "10G",
cores = 1L,
email = "e",
logdir = "logs",
filesize = "100G",
task_num = NULL,
tc = 20,
command = "Rscript -e \"options(width = 120); sessioninfo::session_info()\"",
create_logdir = TRUE
)
name |
A |
create_shell |
A |
queue |
A |
memory |
The amount of memory per core to request in SGE syntax. You
can check how much a current job is utilizing using the |
cores |
The number of cores to request. Note that the total memory
your job will request is |
email |
The email reporting option for the email. For more information check https://jhpce.jhu.edu/knowledge-base/how-to/#Email. |
logdir |
The directory for the SGE log files relative to the current working directory. |
filesize |
The maximum file size in SGE format. |
task_num |
The number of tasks for your job, which will make it into an
array job. If |
tc |
If |
command |
An example command to start your script. |
create_logdir |
A |
For a given SGE job that is currently running you can alter
the options using qalter
.
A character vector with the script contents. If create_shell
was
specified then it also creates the actual script in the current
working directory.
Leonardo Collado-Torres
## A regular job
job_single("jhpce_job", create_logdir = FALSE)
## A regular job with 10 cores on the 'imaginary' queue
job_single("jhpce_job",
cores = 10, queue = "imaginary",
create_logdir = FALSE
)
## An array job
job_single("jhpce_job_array", task_num = 20, create_logdir = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.