[R-sig-hpc] Plain: Problem with Rmpi
hyu at stats.uwo.ca
Mon Jan 18 19:43:33 CET 2010
mpi.spawn.Rslaves is not needed since orterun is used to create 1 master
and 3 slaves.
I assume Rprofile in Rmpi is used. Then all slaves are in infinite loop
waiting for master instructions. They will not take any R scripts through
BATCH mode (only master will process them).
You may use mpi.remote.exec to get what you want or modify slave.hostinfo.
Stephen Weston wrote:
> 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
> - 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:
>> rk <- mpi.comm.rank(0)
>> sz <- mpi.comm.size(0)
>> name <- mpi.get.processor.name()
>> cat("Hello, rank", rk, "size", sz, "on", name, "\n")
>> 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!
>> [[alternative HTML version deleted]]
>> R-sig-hpc mailing list
>> R-sig-hpc at r-project.org
> R-sig-hpc mailing list
> R-sig-hpc at r-project.org
Department of Statistics & Actuarial Sciences
The University of Western Ontario
London, Ontario N6A 5B7
More information about the R-sig-hpc