qsub_file: This function submits a single script using the qsub command....

View source: R/qsub_file.R

qsub_fileR Documentation

This function submits a single script using the qsub command. It accepts a vector PBS arguments to be passed to the scheduler and a vector of environment variables that should be passed to the compute node at job execution.

Description

The function returns the jobid of the scheduled job.

Usage

qsub_file(
  script,
  pbs_args = NULL,
  env_variables = NULL,
  echo = TRUE,
  fail_on_error = FALSE
)

Arguments

script

A script that should be executed by the PBS scheduler. This can contain PBS directives, but in the case of conflicts, the directives passed with pbs_args will take precedence.

pbs_args

A character vector of arguments to be included in the qsub command. Typically these will begin with '-l' such as '-l walltime=10:00:00'.

env_variables

A named character vector containing environment variables and their values to be passed to the script at execution time using the '-v' directive. The names of this vector are the environment variable names and the values of the vector are the environment variable values to be passed in.

echo

Whether to echo the qsub command to the terminal at the time it is scheduled. Default: TRUE.

fail_on_error

Whether to stop execution of the script (TRUE), or issue a warning (FALSE) if the qsub fails. Defaults to FALSE (i.e., issue a warning).

Value

A character string containing the jobid of the scheduled job.

Author(s)

Michael Hallquist

Examples

## Not run: 
  qsub_file('myscript.bash', pbs_args=c('-l walltime=10:00:00', '-l nodes=1:ppn=20'),
     env_variables=c(RUN_INDEX=2, MODEL_NAME='FSE21'))

## End(Not run)


PennStateDEPENdLab/dependlab documentation built on Sept. 26, 2024, 8:40 p.m.