Skip to content
Prev 874 / 2152 Next

doSNOW + foreach = embarrassingly frustrating computation

On 12/21/2010 10:59 AM, Marius Hofert wrote:
I would confirm that your or the site's R environment file is not doing
anything unusual; I'm surprised that you need this set. More below...
This part of the 'minimal' example doesn't seem minimal, I'd remove it,
but follow it's advice and conclude your scripts with

  mpi.close.Rslaves()
  mpi.quit()
here I think you are begin told to end your script with

  mpi.quit()
here snow is determining the size of the cluster with mpi.comm.size()
(which returns 0) whereas I think you want to do something like

   n = mpi.universe.size()
   cl = makeCluster(n, type="MPI")

likewise below. In some cases mpi.universe.size() uses a system call to
'lamnodes', which will fail on systems without a lamnodes command; the
cheap workaround is to create an executable file called lamnodes that
does nothing and is on your PATH.

Martin