## Default resources can be set in your .batchtools.conf.R by defining the variable
## 'default.resources' as a named list.

## Remove [*] if arrayjobs are not supported
#BSUB-J <%= job.name %>[1-<%= nrow(jobs) %>]        # name of the job / number of jobs in chunk
#BSUB-o <%= log.file %>                             # output is sent to logfile, stdout + stderr by default
#BSUB-q <%= resources$queue %>                      # Job queue
#BSUB-W <%= resources$walltime %>                   # Walltime in minutes
#BSUB-M <%= resources$memory %>                     # Memory requirements in Kbytes

## Export value of DEBUGME environemnt var to slave
export DEBUGME=<%= Sys.getenv("DEBUGME") %>

<%= sprintf("export OMP_NUM_THREADS=%i", resources$omp.threads) -%>
<%= sprintf("export OPENBLAS_NUM_THREADS=%i", resources$blas.threads) -%>
<%= sprintf("export MKL_NUM_THREADS=%i", resources$blas.threads) -%>

Rscript -e 'batchtools::doJobCollection("<%= uri %>")'
