Skip to content

Commit 03cb67b

Browse files
Merge branch 'develop' of github.com:HenrikBengtsson/future.batchtools into develop
2 parents 3c88d54 + 770d5aa commit 03cb67b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

inst/templates/slurm.tmpl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
######################################################################
3+
# A batchtools launch script template for Slurm
4+
#
5+
# Author: Henrik Bengtsson
6+
######################################################################
7+
8+
#SBATCH --job-name=<%= if (exists("job.name", mode = "character")) job.name else job.hash %>
9+
#SBATCH --output=<%= log.file %>-%j.out
10+
#SBATCH --mail-type=END,FAIL
11+
#SBATCH --nodes=1
12+
#SBATCH --time=00:05:00
13+
14+
## Resources needed:
15+
<% if (length(resources) > 0) {
16+
opts <- unlist(resources, use.names = TRUE)
17+
opts <- sprintf("--%s=%s", names(opts), opts)
18+
opts <- paste(opts, collapse = ",") %>
19+
#SBATCH <%= opts %>
20+
<% } %>
21+
22+
## Launch R and evaluated the batchtools R job
23+
Rscript -e 'batchtools::doJobCollection("<%= uri %>")'

0 commit comments

Comments
 (0)