The makeClusterMPI()
function creates an MPI cluster of R workers
for parallel processing. This function utilizes
makeCluster(..., type = "MPI")
of the parallel package and
tweaks the cluster in an attempt to avoid
stopCluster()
from hanging [1].
WARNING: This function is very much in a beta version and should
only be used if parallel::makeCluster(..., type = "MPI")
fails.
makeClusterMPI(workers, ..., autoStop = FALSE,
verbose = getOption("future.debug", FALSE))
The number workers (as a positive integer).
Optional arguments passed to
makeCluster(workers, type = "MPI", ...)
.
If TRUE, the cluster will be automatically stopped
If TRUE, informative messages are outputted.
An object of class "FutureMPIcluster"
consisting
of a list of "MPInode"
workers.
Creating MPI clusters requires the Rmpi package.
[1] R-sig-hpc thread Rmpi: mpi.close.Rslaves() 'hangs' on 2017-09-28.
makeClusterPSOCK()
and
parallel::makeCluster()
.