qsub_utils: SGE Job Submission

Description Usage Arguments Value Examples

Description

Submit jobs to IHME's SGE computing cluster for scheduling. Builds a qsub string and submits either a normal or array job, inserting the code file, jobs to hold on, arguments to pass, number of slots and memory, logging locations, intel instructions, project to run under, and shell to use.

Usage

1
2
3
4
5
6
7
qsub(jobname, code, hold = NULL, pass = NULL, slots = 1, mem = 0,
  submit = F, log = T, intel = F, proj = "proj_mortenvelope",
  shell = NULL)

array_qsub(jobname, code, hold = NULL, pass = NULL, slots = 1, mem = 0,
  submit = F, log = T, intel = F, proj = "proj_mortenvelope",
  num_tasks = 1, hold_jid_ad = NULL, shell = NULL)

Arguments

jobname

character, Name for job, must start with a letter

hold

character, Optional comma-separated string of jobnames to hold the job on i.e. "hold_name_1, hold_name_2, ..."

pass

list (NOT character or numeric vector), arguments to pass on to the recieving script. e.g. list(arg1, arg2, arg3)

slots

integer, number of computing slots to request.

mem

integer, number of gb to request to be associated with this job. Defaults to 2 * slots (default is calculated in construct_qsub_string function). Specify a non-0 number if you want a specific memory allocation other than 2 * slots.

submit

logical, whether to submit the job to the system. If F, will print out the command to be submitted

log

logical, if T save in "/share/temp/sgeoutput/user/errors" and "/share/temp/sgeoutput/user/output"

intel

logical, if T, add flag to request a node with Intel CPUs

proj

character, project name to submit the job under

shell

character, filepath to a user-defined shell. Default: search for "r_shell.sh", "python_shell.sh", or "stata_shell.sh" within working directory (shell name based on script ending).

num_tasks

integer, for array_qsub only – number of array tasks to submit

hold_jid_ad

character, for array_qsub only – optional comma-separated string of jobnames to use array holds on i.e. "hold_name_1, hold_name_2, ..."

filepath

character, Filepath to code file

Value

None

Examples

1
2
3
4
5
6
## Not run: 
hold_jobs <- c("job1", "job2")
args <- list(arg1, arg2)
qsub(jobname = "my_job", filepath = "code_dir/01_run_model.R", hold = paste(hold_jobs, collapse = ","), pass = args, slots = 10, submit = F, intel = T, log = T, shell = "code_dir/r_shell.sh")

## End(Not run)

ShadeWilson/ihme documentation built on May 20, 2019, 8:47 a.m.