We have found that virtually all Rmpi jobs need to be started with

$ mpirun -np 1 R CMD BATCH ....

This is, as I understand it, because the first R will initialize the
MPI environment and then when you create the cluster, it wants to be
able to start the rest of the processes.  When you intialize the rest
of the workers, it should be with one less than the total number of
processors.  Something like

mpi.spawn.Rslaves(nslaves=mpi.universe.size()-1)

We have a very trivial example at

http://arc-ts.umich.edu/software/rmpi/

I have also found that making sure to add the profile that is included
with Rmpi is also needed.  I do this by adding two lines to the R
executable script near the top to set and export the and renaming that
Rmpi.  The profile should be in the Rmpi installation directory.  In
our case, that makes the first few lines of the R startup script look
like

#!/bin/sh
# Shell wrapper for R executable.
R_PROFILE=/usr/cac/rhel6/Rmpi/R-3.2.2/0.6-5/Rmpi/Rprofile
export R_PROFILE
R_HOME_DIR=/usr/cac/rhel6/R/3.2.2/lib64/R
....

Things get dicier if you are using doMPI on top of Rmpi rather than Rmpi itself.

Just in case that is of any help,

-- bennet




On Mon, Jul 11, 2016 at 7:52 PM, Gilles Gouaillardet <gil...@rist.or.jp> wrote:
> Note this is just a workaround, this simply disables the mxm mtl (e.g.
> Mellanox optimized infiniband driver).
>
>
> basically, there are two ways to run a single task mpi program (a.out)
>
> - mpirun -np 1 ./a.out (this is the "standard" way)
>
> - ./a.out (aka singleton mode)
>
> the logs you posted do not specify how the test was launch (e.g. with or
> without mpirun)
>
>
> bottom line, if you hit a singleton limitation (e.g. mxm/mtl is not working
> in singleton mode), then you can simply
>
> mpirun -np <n> a.out
>
> your Rmpi applications, and this should be just fine.
>
>
> if not, you need to
>
> export OMPI_MCA_pml=ob1
>
> regardless you are using mpirun or not.
>
> /* and for the sake of completion, if you are using mpirun, an equivalent
> option is to
>
> mpirun --mca pml ob1 ...
>
> */
>
>
> Cheers,
>
> Gilles
>
> On 7/12/2016 1:34 AM, pan yang wrote:
>
> Dear Gilles,
>
> I tried export OMPI_MCA_pml=ob1, and it worked! Thank you very much for your
> brilliant suggestion.
>
> By the way, I don't really understand what do you mean by 'can you also
> extract the command tha launch the test ?'...
>
> Cheers,
> Pan
>
>
>
>
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> Subscription: https://www.open-mpi.org/mailman/listinfo.cgi/users
> Link to this post:
> http://www.open-mpi.org/community/lists/users/2016/07/29640.php
>
>
>
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> Subscription: https://www.open-mpi.org/mailman/listinfo.cgi/users
> Link to this post:
> http://www.open-mpi.org/community/lists/users/2016/07/29643.php

Reply via email to