Skip to content

Commit ef8defd

Browse files
Fix built-in templates
1 parent 2d453d9 commit ef8defd

File tree

6 files changed

+11
-13
lines changed

6 files changed

+11
-13
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: future.batchtools
2-
Version: 0.12.2-9928
2+
Version: 0.12.2-9929
33
Depends:
44
R (>= 3.2.0),
55
parallelly,

inst/templates/lsf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
opts <- unlist(resources, use.names = TRUE)
1717
opts <- sprintf("-%s=%s", names(opts), opts)
1818
cat(sprintf("#BSUB %s\n", opts))
19-
<% } %>
19+
} %>
2020

2121
echo "Batchtools job name: '<%= job.name %>'"
2222

inst/templates/openlava.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
opts <- unlist(resources, use.names = TRUE)
1717
opts <- sprintf("-%s=%s", names(opts), opts)
1818
cat(sprintf("#BSUB %s\n", opts))
19-
<% } %>
19+
} %>
2020

2121
echo "Batchtools job name: '<%= job.name %>'"
2222

inst/templates/sge.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#$ -V
2525

2626
## Resources needed:
27-
<% if (exists("resources", mode = "list") && length(resources) > 0) {
27+
<% if (length(resources) > 0) {
2828
## As-is resource specifications, e.g.
2929
## sge_options <- c("-pe smp 2", "-R yes")
3030
## plan(batchtools_sge, resources = list(asis = sge_options))

inst/templates/slurm.tmpl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
# Author: Henrik Bengtsson
66
######################################################################
77

8-
<% Slurm defaults
8+
9+
#SBATCH --job-name=<%= job.name %>
10+
#SBATCH --output=<%= log.file %>
11+
<%
912
defaults <- list(
1013
nodes = 1, # single-host processing
1114
time = "00:05:00", # 5-min runtime
@@ -14,13 +17,9 @@ defaults <- list(
1417
resources <- c(resources, defaults[setdiff(names(defaults), names(resources))])
1518
opts <- unlist(resources, use.names = TRUE)
1619
opts <- sprintf("--%s=%s", names(opts), opts)
17-
opts <- paste(opts, collapse = " ") %>
20+
cat(sprintf("#SBATCH %s\n", opts))
1821
%>
1922

20-
#SBATCH --job-name=<%= job.name %>
21-
#SBATCH --output=<%= log.file %>
22-
#SBATCH <%= opts %>
23-
2423
echo "Batchtools job name: '<%= job.name %>'"
2524

2625
echo "Session information:"

inst/templates/torque.tmpl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121
<% if (length(resources) > 0) {
2222
opts <- unlist(resources, use.names = TRUE)
2323
opts <- sprintf("%s=%s", names(opts), opts)
24-
opts <- paste(opts, collapse = ",") %>
25-
#PBS -l <%= opts %>
26-
<% } %>
24+
cat(sprintf("#PBS -l %s\n", opts))
25+
} %>
2726

2827
echo "Batchtools job name: '<%= job.name %>'"
2928

0 commit comments

Comments
 (0)