Closed wlandau-lilly closed 7 years ago
Here's what I use for SLURM fyi: https://github.com/ck37/savio-xsede-notes/blob/master/batchtools.slurm.tmpl
Thanks, @ck37! @jarad, @emittman, @nachalca, and @raymondkww, please let me know if you happen to try @ck37's SLURM template file with development drake (re: wlandau-lilly/drake#42).
library(future)
library(future.batchtools)
library(drake)
backend(batchtools_slurm) # same as future::plan()
# Alternatively, plan to send targets to SLURM and then give each target multiple cores.
# This should work if you use `future_lapply()` somewhere within a target's command.
# backend(list(batchtools_slurm, multicore))
# Cap the max jobs with options(mc.cores = 2) or something similar from ?future.options
load_basic_example()
make(my_plan, parallelism = "future_lapply")
By the way: I am trying to collect high-performance computing examples for wlandau-lilly/drake/issues/113, so there can never be too many template files.
I found https://github.com/mllg/batchtools/tree/master/inst/templates, which should be enough to close this issue. But I am always open to more.
Ideally I think template files that are useful for others should end up in batchtools - there they'll help the most users. (I debated with myself whether I should add templates to future.batchtools or not; I basically ended up adding the torque.tmpl
one because that's what I've tested for a long time and also because I wanted to make it super easy for other users on our in-house cluster to run their analysis.)
It's a little bit tricky to come up with "generic" template files that works for most users, because different HPC environments have slightly different configs, e.g. what resources can be requested and so on. But either way, I think the discussion for these really belongs to https://github.com/mllg/batchtools/.
I should say though, that it's ok to have such templates 'mature" in future.batchtools for a while before proposing them to batchtools, if that's what @mllg would prefer.
That makes sense. I actually opened this issue before I found batchtools/inst/templates. I really like the simplicity of your TORQUE file, so I am glad you have that one.
As I say in wlandau-lilly/drake#113, I think I will include examples of batchtools files accompanied by Docker images for which they work. I think batchtools itself should do something similar.
I like that you have a template file for TORQUE. I only have access to SGE at the moment, so I am wondering if you would add other template files. I have colleagues who use SLURM, and I use the Sun/Univa Grid Engine.