[R] newbie question on snow/Rmpi

Dirk Eddelbuettel edd at debian.org
Tue Dec 16 00:31:25 CET 2008

On Mon, Dec 15, 2008 at 01:16:46PM -0500, Whit Armstrong wrote:
> I have a network of four machines set up.  I'm having trouble spawning
> my slaves on these machines.
> All the examples I have found so far use makeCluster with type="MPI",
> and I guess I'm missing some kind of cluster configuration in my
> environment variables because all my clusters are formed on the
> machine where my initial session is running.
> Can anyone refer me to a link that illustrates how to set up the
> environment for MPI (listing node names, number of slots, etc) that
> will allow the makeCluster command take advantage of the other nodes?

It depends on which MPI library you use. I like Open MPI.

> Thanks,
> Whit
> simple example:
> library(Rmpi)
> library(snow)
> cl <- makeCluster(2, type = "MPI")

You must call R (or r or Rscript) 'inside' orterun (or mpirun) which
allows you to set hostnames on that invocation.  See my UseR 2008
tutorial for some examples.  


Three out of two people have difficulties with fractions.

More information about the R-help mailing list