a cluster object, created by this package or by package snow. If NULL , use the registered default cluster.

Details

clusterCall calls a function fun with identical arguments ... on each node.

clusterEvalQ evaluates a literal expression on each cluster node. It is a parallel version of evalq , and is a convenience function invoking clusterCall .

clusterApply calls fun on the first node with arguments seq[[1]] and ... , on the second node with seq[[2]] and ... , and so on, recycling nodes as needed.

clusterApplyLB is a load balancing version of clusterApply . If the length p of seq is not greater than the number of nodes n , then a job is sent to p nodes. Otherwise the first n jobs are placed in order on the n nodes. When the first job completes, the next job is placed on the node that has become free; this continues until all jobs are complete. Using clusterApplyLB can result in better cluster utilization than using clusterApply , but increased communication can reduce performance. Furthermore, the node that executes a particular job is non-deterministic.

clusterMap is a multi-argument version of clusterApply , analogous to mapply and Map . If RECYCLE is true shorter arguments are recycled (and either none or all must be of length zero); otherwise, the result length is the length of the shortest argument. Nodes are recycled if the length of the result is greater than the number of nodes. ( mapply always uses RECYCLE = TRUE , and has argument SIMPLIFY = TRUE . Map always uses RECYCLE = TRUE .)

clusterExport assigns the values on the master R process of the variables named in varlist to variables of the same names in the global environment (aka ‘workspace’) of each node. The environment on the master from which variables are exported defaults to the global environment.

clusterSplit splits seq into a consecutive piece for each cluster and returns the result as a list with length equal to the number of nodes. Currently the pieces are chosen to be close to equal in length: the computation is done on the master.

parLapply , parSapply , and parApply are parallel versions of lapply , sapply and apply . parLapplyLB , parSapplyLB are load-balancing versions, intended for use when applying FUN to different elements of X takes quite variable amounts of time, and either the function is deterministic or reproducible results are not required.