Given the size of a problem, it may not be useful to create a cluster. This will make a Fork cluster (so Linux only)

makeOptimalCluster(
  useParallel = getOption("pemisc.useParallel", FALSE),
  MBper = 500,
  maxNumClusters = parallel::detectCores(),
  assumeHyperThreads = FALSE,
  ...
)

Arguments

useParallel

Logical or numeric. If FALSE, returns NULL. If numeric, then will return a cluster object with this many cores, up to maxNumClusters

MBper

Numeric. Passed to memRequiredMB in optimalClusterNum()

maxNumClusters

Numeric or Integer. The theoretical upper limit for number of clusters to create (e.g., because there are only 3 problems to solve, not parallel::detectCores)

assumeHyperThreads

Logical. If TRUE, then it will more efficiently divide the maxNumClusters by useParallel, so that there is a lower number of cores used. This calculation may not be the ideal balance. A message will indicate the change from maxNumClusters, if there is one.

...

Passed to makeForkClusterRandom. Only relevant for iseed.