Open nick-youngblut opened 5 years ago
Do you have the same issue if w/o future? Could you run btlapply()
instead of future_lapply()
?
This issue was posted on 2019-08-13. At that time, future.batchtools 0.8.0 was available. In that version, workers = +Inf
was the default. Because of this, map-reduce functions such as future.apply::future_lapply(X, ...)
and furrr::future_map(X, ...)
would produce one future per element in X
, which means there would also be one job per element in X
.
Whenever I run approx. > 200 jobs on our SGE cluster, I get the following error: ...
This sounds like length(X)
> 200.
If I manually batch the jobs into smaller groups (eg., 50 or 100 jobs), then I don't get this error. … plan(batchtools_sge, resources=resources, workers=50)
Yes, one can limit the number of workers that Futureverse sees. To set a smaller number of workers, say, 100, use:
plan(batchtools_sge, workers = 100)
That would cause future_lapply()
to split up X
into 100 equally-sized chunks, and submit each chunk as a job to the scheduler.
One can also control the number of default workers to, say 50, using R option future.batchtools.workers=50
or environment variable R_FUTURE_BATCHTOOLS_WORKERS=50
, cf. https://future.batchtools.futureverse.org/reference/future.batchtools.options.html.
Note that, in future.tests 0.9.0 (2020-04-14), I changed workers
to default to workers = 100
.
Whenever I run approx. > 200 jobs on our SGE cluster, I get the following error:
If I manually batch the jobs into smaller groups (eg., 50 or 100 jobs), then I don't get this error.
Version:
r-batchtools 0.9.11 r341hc070d10_0 conda-forge
~/.batchtools.conf.R
file:.batchtools.tmpl
file:Example of resources used:
I'm using
future_lapply()
to run a function that callssystem2()