Parameters for bsub
bsub_opt(..., RESET = FALSE, READ.ONLY = NULL, LOCAL = FALSE, ADD = FALSE)Arguments for the parameters, see "details" section
reset to default values
please ignore
please ignore
please ignore
The corresponding option values.
There are following parameters:
packagesA character vector with package names that will be loaded before running the script.
imageA character vector of RData/rda files that will be loaded before running the script.
temp_dirPath of temporary folder where the temporary R/bash scripts will be put.
output_dirPath of output folder where the output/flag files will be put.
enforceIf a flag file for the job is found, whether to enforce to rerun the job.
R_versionThe version of R.
working_dirThe working directory.
ignoreWhether ignore bsub_chunk, bsub_script and bsub_cmd.
localRun job locally (not submitting to the LSF cluster)?
call_RscriptHow to call Rscript by specifying an R version number.
submission_nodeA list of node names for submitting jobs.
login_nodeThis value basically is the same as submission_node unless the login nodes are different from submission nodes.
sh_headCommands that are written as head of the sh script.
userUsername on the submission node.
groupThe user group
ssh_envirThe commands for setting bash environment for successfully running bjobs, bsub, ...
bsub_templateTemplate for constructing bsub command.
parse_timeA function that parses time string from the LSF bjobs command to a POSIXct object.
verboseWhether to print more messages.
ssh_envir should be properly set so that LSF binaries such as bsub or bjobs can be properly found.
There are some environment variables initialized when logging in the bash terminal while they are not initialized with the
ssh connection. Thus, some environment variables should be manually set.
An example for ssh_envir is as follows. The LSF_ENVDIR and LSF_SERVERDIR should be defined and exported.
c("source /etc/profile",
"export LSF_ENVDIR=/opt/lsf/conf",
"export LSF_SERVERDIR=/opt/lsf/10.1/linux3.10-glibc2.17-x86_64/etc") The values of these two variables can be obtained by entering following commands in your bash terminal (on the submission node):
echo $LSF_ENVDIR
echo $LSF_SERVERDIR The time strings by LSF bjobs command might be different for different configurations. The **bsub**
package needs to convert the time strings to POSIXlt objects for calculating the time difference. Thus, if
the default time string parsing fails, users need to provide a user-defined function and set with parse_time
option in bsub_opt. The function accepts a vector of time strings and returns a POSIXlt object. For example,
if the time string returned from bjobs command is in a form of Dec 1 18:00:00 2019, the parsing function
can be defined as:
bsub_opt$parse_time = function(x) {
as.POSIXlt(x, format = "\
} # NOT RUN {
# The default bsub_opt
bsub_opt
# }
Run the code above in your browser using DataLab