makeCluster {ParallelLogger} | R Documentation |
Create a cluster of nodes for parallel computation
Description
Create a cluster of nodes for parallel computation
Usage
makeCluster(
numberOfThreads,
singleThreadToMain = TRUE,
setAndromedaTempFolder = TRUE,
setAndromedaMemoryLimit = TRUE
)
Arguments
numberOfThreads |
Number of parallel threads. |
singleThreadToMain |
If |
setAndromedaTempFolder |
When TRUE, the andromedaTempFolder option will be copied to each thread. |
setAndromedaMemoryLimit |
When TRUE, the andromedaMemoryLimit option will be set in each thread to be either the global andromedaMemoryLimit / numberOfThreads or 75 percent of the system memory / number of threads. |
Value
An object representing the cluster.
Examples
fun <- function(x) {
return (x^2)
}
cluster <- makeCluster(numberOfThreads = 3)
clusterApply(cluster, 1:10, fun)
stopCluster(cluster)
[Package ParallelLogger version 3.4.2 Index]