-
Notifications
You must be signed in to change notification settings - Fork 10
/
torque.tmpl
29 lines (23 loc) · 835 Bytes
/
torque.tmpl
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
#!/bin/bash
######################################################################
# A batchtools launch script template for Torque/PBS
#
# Author: Henrik Bengtsson
######################################################################
## Job name:
#PBS -N <%= if (exists("job.name", mode = "character")) job.name else job.hash %>
## Direct streams to logfile:
#PBS -o <%= log.file %>
## Merge standard error and output:
#PBS -j oe
## Email on abort (a) and termination (e), but not when starting (b)
#PBS -m ae
## Resources needed:
<% if (length(resources) > 0) {
opts <- unlist(resources, use.names = TRUE)
opts <- sprintf("%s=%s", names(opts), opts)
opts <- paste(opts, collapse = ",") %>
#PBS -l <%= opts %>
<% } %>
## Launch R and evaluated the batchtools R job
Rscript -e 'batchtools::doJobCollection("<%= uri %>")'