-
As a workaround to #602, I am working on https://github.com/wlandau/crew/tree/11. https://github.com/wlandau/crew/blob/11/R/class_queue_future.R is a task queue of transient futures which contains a local multi-process task queue to launch and poll those futures asynchronously. It works with sequential futures, but not with fun <- function() {
plan <- future::tweak(
future.batchtools::batchtools_sge,
template = "sge.tmpl"
)
future::plan(plan)
future::future("x")
}
px <- callr::r_session$new()
px$call(func = fun, args = list())
out <- px$read()
This happens both in the RStudio IDE and in a terminal. In both cases, it works with
However, I would rather stick with Here is my #!/bin/bash
#$ -cwd
#$ -j y
#$ -o <%= log.file %>
#$ -V
#$ -N <%= job.name %>
module load R/4.1.2
Rscript -e 'batchtools::doJobCollection("<%= uri %>")'
exit 0 and my session info:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Well, I figured out how to reproduce the same error without fun <- function() system2("qsub", "job.sh")
px <- callr::r_session$new()
px$call(func = fun, args = list())
out <- px$read()
out |
Beta Was this translation helpful? Give feedback.
-
Fixed in r-lib/processx@1082c9d |
Beta Was this translation helpful? Give feedback.
Fixed in r-lib/processx@1082c9d