Learn R Programming

ck37r (version 1.0.0)

parallelize: Setup parallel processing, either multinode or multicore.

Description

By default it uses a multinode cluster if available, otherwise sets up multicore via doMC. Libraries required: parallel, doSNOW, doMC, RhpcBLASctl, foreach

Usage

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

Arguments

type

"any", "cluster"/"doSNOW", "doParallel", "doMC", or "seq"

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