View source: R/batchtools_multicore.R
| batchtools_multicore | R Documentation |
A batchtools backend that resolves futures in parallel via forked background R processes
batchtools_multicore(
...,
workers = availableCores(constraints = "multicore"),
fs.latency = 0,
delete = getOption("future.batchtools.delete", "on-success")
)
workers |
The number of multicore processes to be available for concurrent batchtools multicore futures. |
fs.latency |
[ |
delete |
Controls if and when the batchtools job registry folder is
deleted.
If |
... |
Not used. |
Batchtools multicore futures use batchtools cluster functions
created by batchtools::makeClusterFunctionsMulticore() with
ncpus = workers.
An alternative to the batchtools multicore backend is to use
plan(future::multicore).
Nothing.
library(future)
plan(future.batchtools::batchtools_multicore, workers = 2)
message("Main process ID: ", Sys.getpid())
f <- future({
data.frame(
hostname = Sys.info()[["nodename"]],
os = Sys.info()[["sysname"]],
cores = unname(parallelly::availableCores()),
pid = Sys.getpid(),
modules = Sys.getenv("LOADEDMODULES")
)
})
info <- value(f)
print(info)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.