[R-sig-hpc] Plain: Problem with Rmpi

Stephen Weston stephen.b.weston at gmail.com
Mon Jan 18 16:35:45 CET 2010


Why are you calling mpi.close.Rslaves?  I believe that you should
only do that if you've started the slaves via mpi.spawn.Rslaves.

I'm not sure if that has any bearing on your problem, however.
But I wouldn't draw too many conclusions based on not seeing
messages to stdout from the slaves right before quitting,
especially messages that are produced on different machines.
To improve the chances of it working, I suggest that you
add a call to flush(stdout()) after the cat.  But you might want
to do something else to prove whether the slaves are really
running.

- Steve


On Mon, Jan 18, 2010 at 8:42 AM,  <sebastian.rohrer at basf.com> wrote:
> Dear List,
>
> I have the following problem with R (2.10.0) Rmpi using OpenMPI 1.3.3.:
>
> I use Dirk Eddelbuettels test script for testing if Rmpi works.
> (http://dirk.eddelbuettel.com/papers/ismNov2009introHPCwithR.pdf, the
> example is on Slide 96)
>
> The script looks as follows:
>
> require(Rmpi)
> rk <- mpi.comm.rank(0)
> sz <- mpi.comm.size(0)
>
> name <- mpi.get.processor.name()
> cat("Hello, rank", rk, "size", sz, "on", name, "\n")
>
> mpi.close.Rslaves()
> mpi.quit()
>
> According to Dirk's slides, the output should look something like:
> Hello, rank 4 size 8 on ron
> Hello, rank 0 size 8 on ron
> Hello, rank 3 size 8 on mccoy
> Hello, rank 7 size 8 on mccoy
> Hello, rank Hello, rank 21 size 8 on joe
> size 8 on tony
> Hello, rank 6 size 8 on tony
> Hello, rank 5 size 8 on joe
>
> I call the script:
>
> /programs/openmpi-1.3.3/bin/orterun -host node02,node03 -n 4
> /programs/R/R-2.10.0/bin/Rscript mpiTest_03.R
>
> The output looks like:
>
> master (rank 0, comm 1) of size 4 is running on: node02
> slave1 (rank 1, comm 1) of size 4 is running on: node03
> slave2 (rank 2, comm 1) of size 4 is running on: node02
> slave3 (rank 3, comm 1) of size 4 is running on: node03
> Hello, rank 0 size 4 on node02
>
> So, in my understanding there is a master and 3 slaves are spawned. But
> the call for the processor name is executed only on the master. Right?
> Any suggestions on what could be the problem?
>
> Thanks a lot!
>
> Sebastian
>
>
>
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-hpc mailing list
> R-sig-hpc at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
>



More information about the R-sig-hpc mailing list