[R-sig-hpc] using a macines file from within R

Paul Johnson pauljohn32 at gmail.com
Sat Feb 11 23:10:23 CET 2012


On Fri, Feb 10, 2012 at 3:31 PM, Hodgess, Erin <HodgessE at uhd.edu> wrote:
> Hi again!
>
>
> If I use mpi.spawn.Rslaves(nslaves=4), it spawns 4 slaves on the same
> node.
>
>
Greetings. I've been testing that out on our cluster.

I believe the machines file is only meaningful to the OpenMPI
framework upon which R sits. So in the submission script, suppose you
put ppn=1.

That restricts MPI to use 1 process per node, and so when RMPI spawns
nodes, it will spawn one per node.


On the other hand, if the submission script has ppn=6 on, for example,
3 compute  nodes, for example, and your R command has

mpi.spawn.Rslaves(nslaves=14),

That will spawn the 14 slaves like this (machine names are compute-0,
compute-1, compute-2, etc)

compute-0-0
compute-0-1
compute-0-2
compute-0-3
compute-0-4
compute-0-5
compute-1-0
compute-1-1
compute-1-2
compute-1-3
compute-1-4
compute-1-5
compute-2-0
compute-2-1

that is to say, if your submission allows ppn=6, MPI will spawn 6
slaves on the first node it finds, and 6 more on 2nd one, and 2 on
last one, so there are 14 in all.

I think if you got into the very fine-grained communication between R
and the openMPI network, you might be able to fiddle with that, but it
won't be pretty and I don't think they recommend we (novices) do it.

Hope this is not telling you what you already know, as I so often do!


>
> Is there a way to access the machines file from there, please?
>
>
>
> Thanks,
>
> Erin
>
>
>
>
>
> Erin M. Hodgess, Ph.D.
>
> Associate Professor
>
> Department of Computer and Mathematical Sciences
>
> University of Houston - Downtown
>
> mailto: hodgesse at uhd.edu
>
>
>
>
>        [[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



-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas



More information about the R-sig-hpc mailing list