Skip to content

Plain: Problem with Rmpi

6 messages · sebastian.rohrer at basf.com, Stephen Weston, Hao Yu +1 more

#
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:
#
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.

Hao
Stephen Weston wrote:

  
    
#
cluster workers into a "worker loop" or "task loop", allowing you to use
the higher level functions in Rmpi when spawn isn't supported, or if you
choose to start your workers using orterun, perhaps for performance
reasons.  From your message, I see that you are starting the workers
using orterun, since you specified "-n 4".

Rmpi's Rprofile definitely isn't compatible with the doMPI package, since
it puts all of the workers into an Rmpi worker loop, ready to execute
"Rmpi tasks", thus preventing them from executing "doMPI tasks".
In doMPI, the startMPIcluster function plays a very similar role as
.Rprofile in Rmpi.  That is, it puts all of the workers into a doMPI worker
loop, allowing them to execute tasks sent to them from foreach/%dopar%.

Note that doMPI and snow only use the "low level" functions in Rmpi,
and never make use of Rprofile.  They use Rmpi for communication,
not execution purposes.

I hope that explains a bit of what is going on.

- Steve
On Tue, Jan 19, 2010 at 8:58 AM, <sebastian.rohrer at basf.com> wrote:
#
On Tue, 2010-01-19 at 14:58 +0100, sebastian.rohrer at basf.com wrote:
You are not necessarily getting the Rmpi .Rprofile.  To use it, you need
to copy it to your startup directory, or link from there.  Or you need
to set an environment variable or use an R command line option.

On Debian Lenny, r-cran-rmpi (thanks to Dirk for the packaging) has the
file at /usr/lib/R/site-library/Rmpi/Rprofile

As others have said, you don't necessarily want to use that profile; it
depends on how you want to use Rmpi.

Ross Boylan