setRngDoMPI function initializes the workers
of a doMPI cluster to use parallel random number generation.
To do this, it uses the
RNG support provided by the base and parallel packages.
nextRNGStream function is used to assign
each worker in the cluster to a different stream of random numbers.
This function follows the outline presented in section 6 of the vignette for the parallel package written by R-Core.
Note that the goal of
setRngDoMPI is to insure that the cluster
workers each generate different streams of random numbers, not to
insure repeatable results. For repeatable results, use the
seed option via the foreach
.options.mpi argument. See
The doMPI cluster to initialize.
Used to seed the random number generators on the
cluster workers if not
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.