This function checks if parallel processing can be set up and enables it. Ideally this is done by the user for more control! In the package parallelization is usually only used for predictions and projections, but not for inference in which case parallel inference should be handled by the engine.
Arguments
- plan_exists
A
logical
check on whether an existingfuture
plan exists (Default:FALSE
).- cores
A
numeric
number stating the number of cores to use.- strategy
A
character
denoting the strategy to be used for future. See help offuture
for options. (Default:"multisession"
).- workers
An optional list of remote machines or workers, e.g.
"c(remote.server.org)"
. Alternatively a"cluster"
object can be provided.
Details
Currently supported strategies are:
"sequential"
= Resolves futures sequentially in the current R process (Package default)."multisession"
= Resolves futures asynchronously across'cores'
sessions."multicore"
= Resolves futures asynchronously across on forked processes. Only works on UNIX systems!"cluster"
= Resolves futures asynchronously in sessions on this or more machines."slurm"
= To be implemented: Slurm linkage via batchtools.