Closed fboehm closed 3 years ago
Hi there, On our LSF cluster this works with the default template file batchtools.openlava.tmpl in the same directory
$ module unload R; module load R/3.6.1;Rscript -e 'library(future.batchtools);plan(batchtools_openlava);plan(batchtools_openlava); x %<-% { Sys.sleep(5); 3.14 }; y %<-% { Sys.sleep(5); 100 };x+y'
Loading required package: future
[1] 103.14
Thank you, @cfljam! I recently changed jobs, so I no longer have access to an LSF cluster, so I can't try it right now. Regardless, I really appreciate your reply!
I'd like to use futures on a LSF computing cluster. I see that one may use
plan("batchtools_lsf")
ahead of functions that use futures.
I'm struggling to identify the needed directory path for the file lsf.tmpl. I'm also struggling to understand the role of the template file.
Right now, my workflow involves typing
at the shell prompt to submit jobs.
The text in mysubmit.bsub is:
where I use R futures in the ../Rmd/bivariate-mapping-greenyellow-magenta-Chr10.Rmd file. I also call
plan("batchtools_lsf")
in advance of using futures in the Rmd's R code.I get an R error message; here is the full output in the .err file:
Apparently, the *lsf.tmpl file is not found.
I currently have a text file, lsf.tmpl, without a preceding period, in the same directory as mysubmit.bsub. lsf.tmpl contains the text:
I copied lsf.tmpl verbatim from https://github.com/mllg/batchtools/blob/master/inst/templates/lsf-simple.tmpl
I'm not using a configuration file currently.
Should my workflow still begin with me submitting, via bsub, mysubmit.bsub? Or do I need to alter the workflow when using
plan("batchtools_lsf")
?Is it correct to use, without modifications, the current version of lsf.tmpl? Or do I need to somehow tailor it to my uses? I'm not sure exactly what role the template file plays.
I appreciate any suggestions that you offer. Thank you!