parallelize: Setup parallel processing using snow.

View source: R/parallelize.R

parallelizeR Documentation

Setup parallel processing using snow.

Description

By default it uses a multinode cluster if available, otherwise sets up multicore via doMC. Libraries required: parallel, doSNOW, RhpcBLASctl, foreach. As of Feb. 2020 no longer supports doMC.

Usage

parallelize(
  type = "any",
  max_cores = NULL,
  allow_multinode = TRUE,
  machine_list = Sys.getenv("SLURM_NODELIST"),
  cpus_per_node = as.numeric(Sys.getenv("SLURM_CPUS_ON_NODE")),
  outfile = "",
  verbose = FALSE
)

Arguments

type

"any", "cluster"/"doSNOW", "doParallel", "doMC", or "seq". doMC now sets up a snow cluster as of Feb. 2020.

max_cores

Restrict to this many cores, even if more are available.

allow_multinode

If T will use multiple nodes if detected. If F will not use multiple machines even if they are available.

machine_list

List of networked computers for multinode computation.

cpus_per_node

Number of processes to run on each node, if using multinode parallelization.

outfile

File to collect output across workers. IF "" then results are printed to the console.

verbose

If TRUE display additional output during execution.

Value

obj Cluster object that can be passed to stop_cluster().

See Also

stop_cluster


ck37/ckTools documentation built on April 29, 2023, 11:47 p.m.