J
ust to add to this (new to me) conversation in case someone looks at this
email chain in the future. If you were not married to using the low-level
MPI interface R functions (e.g., mpi.remote.exec())  and wanted to just use
the foreach package (
http://cran.r-project.org/web/packages/foreach/index.html) with an MPI
backend (http://cran.r-project.org/web/packages/doMPI/index.html), you only
need to look at doRNG (
http://cran.r-project.org/web/packages/doRNG/index.html) for sane RNG.

This approach has the advantage of running without MPI backend with only
*minimal* changes to the code-base.

-Jonathan



-------------------------------------------------------------------------
J.P. Olmsted

029 Corwin (Office)
130 Corwin Hall (Mail)

Politics Department
Princeton University
Princeton, NJ 08544


t: 609.258.6202
f: 609.258.1110
jolmsted@princeton.edu
http://about.me/olmjo
-------------------------------------------------------------------------


On Fri, Jul 19, 2013 at 7:41 PM, Hodgess, Erin <HodgessE@uhd.edu> wrote:

> Apologies to all...I had changed the function name!
>
>
> ________________________________________
> From: Dirk Eddelbuettel [edd@debian.org]
> Sent: Friday, July 19, 2013 4:58 PM
> To: Hodgess, Erin
> Cc: r-sig-hpc@r-project.org
> Subject: Re: [R-sig-hpc] Rmpi and random number generation
>
> On 19 July 2013 at 21:30, Hodgess, Erin wrote:
> | Here is an Rmpi question, please:  I am trying to do a little demo
> program in which I generate a few random numbers.
> [...]
> | All of the random numbers are the same across the various variables.
>  Has anyone run into this, please?
>
> 1) See eg 'Section 6: Random-number generation' in the vignette of the
>    package "parallel" (part of base R) for an introduction.
>
> 2) Even the most naive Google search for 'Rmpi parallel RNG' (and you
> surely
>    tried something like that first, yes?) leads to this fine poster by the
>    author of the Rmpi package:
>
>       http://www.stats.uwo.ca/faculty/yu/Rmpi/download/rsr/poster.pdf
>
>    which contains an example.
>
> Dirk
>
> --
> Dirk Eddelbuettel | edd@debian.org | http://dirk.eddelbuettel.com
>
> _______________________________________________
> R-sig-hpc mailing list
> R-sig-hpc@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
>

	[[alternative HTML version deleted]]

