How to do that? By using sfClusterSetupRNGstream or sfClusterSetupRNG, it
can reproduces the same parallel result, but it cannot give me the same
result as sequential mode.

Libo

On Sat, Feb 11, 2012 at 4:26 PM, Dirk Eddelbuettel <edd@debian.org> wrote:

>
> On 11 February 2012 at 15:27, Libo Sun wrote:
> | Hi All,
> |
> | I have a question about R parallel computing by using snowfall.
> |
> | How can I set the seeds on parallel workers to get the same result as
> | sequential mode?
> |
> | For example:
> |
> | > sfSapply(c(1,1),rnorm)
> | [1]  1.823082 -2.222052
> | > rnorm(2)
> | [1] -0.5179967 -1.0807196
> |
> | How to get the identical result?
>
> By making sure the RNG streams are initialised identically on all nodes.
>
> Dirk
>
> --
> "Outside of a dog, a book is a man's best friend. Inside of a dog, it is
> too
> dark to read." -- Groucho Marx
>

	[[alternative HTML version deleted]]

