parallel: Generate a suitable parallel processing plan

suitableParallelPlanR Documentation

Generate a suitable parallel processing plan

Description

Generate a suitable parallel processing future plan for your session. See ?future::plan for more details on future plans.

Usage

suitableParallelPlan(
  strategy = suitableParallelStrategy(),
  workers = suitableParallelWorkers(),
  ...
)

suitableParallelStrategy()

suitableParallelWorkers(RAM_per_worker = 8, proportion_max_workers = 0.75)

Arguments

strategy

The parallel strategy to use. See ?future::plan for details.

workers

The number of workers to use.

...

Arguments to pass to future::plan().

RAM_per_worker

The memory (in gigabytes) to allocate to each worker when calculating a suitable number of workers.

proportion_max_workers

A value between 0 and 1. The maximum number of workers to allocate as a proportion of the total number of workers available (as detected by future::availableCores()).

Examples

## Return a suitable parallel strategy for the current session
suitableParallelStrategy()

## Return a suitable number parallel workers based on the system resources.
suitableParallelWorkers()

## Not run: 
## Generate a suitable parallel plan
suitableParallelPlan()

## End(Not run)

jasenfinch/jfmisc documentation built on Feb. 21, 2024, 7:10 a.m.