Replies: 2 comments
-
|
This might be problem specific to running inside a Linux Container (Singularity/Apptainer) - I'm not sure. Yeah, it could be a matter of binding the proper folders. future.batchtools 0.20.0 is on CRAN as of 2025-08-25. It comes with lots of improvements (https://future.batchtools.futureverse.org/news/index.html). It should also give a bit more information when there are errors. Note also how the built-in templates are now more powerful, so you probably don't need your own custom one, e.g. https://future.batchtools.futureverse.org/reference/batchtools_slurm.html Please retry with this version and see if it works or if there are more clues in what's going on. |
Beta Was this translation helpful? Give feedback.
-
|
Update on 2025-09-14. The development version of future.batchtools and its new built-in job script templates gained new skills that allows you to run R in Linux containers and set environment variables. Importantly, it also patches a bug in batchtools that may cause the "expiration" error. Install it as: remotes::install_github("futureverse/future.batchtools", ref="develop")See https://future.batchtools.futureverse.org/reference/batchtools_slurm.html for an example. See also futureverse/future.batchtools#100. @tmspvn, looking at your example, try: library(future)
plan(future.batchtools::batchtools_slurm, resources = list(
time = "01:30:00", mem = "1G", nodes = 1, "cpus-per-task" = 1,
modules = c("r-full/4.4.1")
))
f <- future(sessionInfo())
info <- value(f)
print(info)If that doesn't work, you should get a more informative error message now. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear developers,
I am trying to run some code by using future.batchtools on a slurm HPC but I keep having the following error:
Error: BatchtoolsExpiration: Future ('doFuture2-1') expired (registry path /scratch/tpavan1/scripts_tommaso/test_batchtools/.future/20240710_190527-gmNN9y/doFuture2-1_1056043333).. The last few lines of the logged output:However, the logged output changes while sometimes with a warming:
Some other times nothing, and rarely it runs. I haven't been able to solve or figure out the reason why it's not running since it worked for a while and now it return the error above.
This is the test code i am running:
R is loadel via module load r-full/4.4.1 which loads a container with the R installation. To make R communicate with slurm I exported the following paths:
export SINGULARITY_BINDPATH="$SINGULARITY_BINDPATH,/etc/passwd,/var/run/munge,/usr/lib64/libmunge.so.2.0.0:/usr/lib64/libmunge.so.2,/run/slurm/conf/slurm.conf:/etc/slurm/slurm.conf,/usr/lib64/slurm,/usr/bin/sbatch,/usr/bin/squeue,/usr/bin/scancel"After which I run the test code, which ran in my initial testing but the it started throwing errors.
the template:
This is the session info:
Do you have any idea of why it stopped working?
Beta Was this translation helpful? Give feedback.
All reactions