array_submit | R Documentation |
Given a bash script that specifies the SGE option -t (that is, an array job),
this function submits that job using qsub
for a given list of task
IDs. This function is useful in case some tasks for a given job failed which
you can find using qstat | grep Eqw
or other options.
array_submit(
job_bash,
task_ids,
submit =
file.exists("/cm/shared/apps/sge/sge-8.1.9/default/common/accounting_20191007_0300.txt"),
restore = TRUE
)
job_bash |
A |
task_ids |
A set of task ids that will get parsed by parse_task_ids. |
submit |
A |
restore |
A |
The path to job_bash
.
Leonardo Collado-Torres
## Choose a script name
job_name <- paste0("array_submit_example_", Sys.Date())
## Create an array job on the temporary directory
with_wd(tempdir(), {
## Create an array job script to use for this example
job_single(
name = job_name,
create_shell = TRUE,
task_num = 100
)
## Now we can submit the SGE job for a set of task IDs
array_submit(
job_bash = paste0(job_name, ".sh"),
task_ids = "225019-225038:1,225040,225043",
submit = FALSE
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.