1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
#!/usr/bin/env bash
## Job name:
#PBS -N fbt-<%= job.hash %>
## Merge standard error and output:
#PBS -j oe
## Direct streams to logfile:
#PBS -o <%= log.file %>
## Email on abort (a) and termination (e), but not when starting (b)
#PBS -m ae
## Mirror environment variables
#PBS -V
## Resources needed:
<% if (exists("resources", mode = "list") && length(resources) > 0) {
if (isTRUE(getOption("future.debug"))) {
R.utils::mcat("resources:")
R.utils::mstr(resources)
}
opts <- unlist(resources, use.names = TRUE)
opts <- sprintf("%s=%s", names(opts), opts)
opts <- paste(opts, collapse = ",") %>
#PBS -l <%= opts %>
<% } %>
## SPECIAL: For R CMD check package testing on HPC environments, which
## typically uses a temporary working directory that is local, we force
## it to use HPC-wide working directory
#PBS -d <%= normalizePath(file.path("~", "tmp")) %>
## SPECIAL: Since we change working directory, the 'startup.Rs' file used
## by R CMD check is no longer found
export R_TESTS=
# For troubleshooting if there are errors
date
hostname
which Rscript
Rscript --version
Rscript -e ".libPaths()"
echo "Command: Rscript -e 'batchtools::doJobCollection("<%= uri %>")' ..."
Rscript -e 'batchtools::doJobCollection("<%= uri %>")'
echo "Command: Rscript -e 'batchtools::doJobCollection("<%= uri %>")' ... done"
|