qsub: Submit jobs to qsub over ssh

Description Usage Arguments Examples

View source: R/submitter.R

Description

This function submits commands to qsub (SGE) over ssh. It assumes password-less ssh keys are set up.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
qsub(
  command,
  remote,
  parallel = FALSE,
  remote_cwd = NULL,
  runtime_folder = "qsub_records",
  wait = TRUE,
  cores = 1,
  queue = NULL,
  print_track = FALSE,
  print_info = TRUE,
  echo = TRUE,
  stdout = FALSE,
  stderr = FALSE,
  max_print = 10000
)

Arguments

command

(character) One or more commands to run

remote

(remote_server) The remote server information.

parallel

(logical of length 1) If TRUE, run jobs in parallel. Default: FALSE

remote_cwd

(character of length 1) What to set the current working directory to on the remote server before running jobs. Default: The home directory on the remote server.

runtime_folder

(character of length 1) The location to save the runtime error, output, and qsub submission script. Default: A unique name with timestamp, random string, and first command in job.

wait

(logical of length 1) If TRUE, the function will wait for all jobs to complete before exiting. Default: TRUE

cores

(numeric) The number of cores to use. Default: 1

queue

(numeric) The name of the queue to use. Default: Use any available queue.

print_track

(logical of length 1) If TRUE, the progress of the jobs is periodically printed. Default: TRUE

print_info

(logical of length 1) If TRUE, information on the job is printed Default: TRUE

echo

(logical of length 1) If TRUE, the command to be executed is printed Default: TRUE

stdout

(logical or character of length 1) If TRUE, print or save the standard output of the job.

stderr

(logical or character of length 1) If TRUE, print or save the standard error of the job.

max_print

(numeric) The maximum number of characters to print each time something is printed.

Examples

1
2
3
4
5
6
## Not run: 

remote <- remote_server$new(server = "shell.somewhere.edu", user = "joeshmo", port = 345)
qsub(c('echo "test 1" > test1.txt', 'echo "test 2" > test2.txt'), remote, runtime_folder = "~/test/out")

## End(Not run)

zachary-foster/qsubmitter documentation built on Nov. 27, 2020, 3:23 a.m.