makeCluster: Create a cluster of nodes for parallel computation

Description Usage Arguments Value Examples

View source: R/Cluster.R

Description

Create a cluster of nodes for parallel computation

Usage

1
2
3
4
5
makeCluster(
  numberOfThreads,
  singleThreadToMain = TRUE,
  setAndromedaTempFolder = TRUE
)

Arguments

numberOfThreads

Number of parallel threads.

singleThreadToMain

If numberOfThreads is 1, should we fall back to running the process in the main thread?

setAndromedaTempFolder

When TRUE, the andromedaTempFolder option will be copied to each thread.

Value

An object representing the cluster.

Examples

1
2
3
4
5
6
7
fun <- function(x) {
  return (x^2)
}

cluster <- makeCluster(numberOfThreads = 3)
clusterApply(cluster, 1:10, fun)
stopCluster(cluster)

ParallelLogger documentation built on July 16, 2021, 9:07 a.m.