Learn R Programming

ergm (version 3.0-3)

ergm-parallel: Parallel Processing in the ergm Package

Description

ergm can take advantage of multiple CPUs or CPU cores on the system on which it runs, as well as computing clusters.

This entry describes the APIs it can use, as well as common problems and workarounds associated with parallel processing in ergm.

Arguments

MPI

To use MPI to accellerate ERGM sampling, pass the control parameter parallel.type="MPI". ergm and snow use Rmpi package to communicate with an MPI cluster. ergm will check if an MPI cluster already exists and will create one if one doesn't.

On some installations, the function stopCluster does not work properly for MPI clusters. Because ergm creates a cluster every time it needs an MCMC sample and disbands it once it finishes, using MPI on these installations may fail. A workaround is to start the cluster outside of ergm (e.g., dummy <- makeCluster(nnodes, type="MPI")). ergm will notice the preexisting preexisting cluster and make use of it, but it will not stop it.