Newsgroups: comp.parallel.pvm
From: lovato@biostat.washington.edu (James Lovato)
Subject: random number seeds
Organization: University of Washington, Dept. of Biostatistics
Date: 8 Mar 1995 02:32:19 GMT
Message-ID: <3jj4vj$c43@nntp3.u.washington.edu>

I'm sure this has been solved.
What is the best way to keep track of random number generator seeds
across slave programs?

I am running a simulation that spawns slave programs that call a random
number generator k times.

How can I set up the program so that I have reproducible results?

The only way I can think of is

      do 30 i = 1, n
           call pvmfspawn(slave, ...)
           seed = advsd(seed,k)
           pvmfinitsend(PVMDEFAULT,ibuff)
           pvmfpack(REAL8,seed,1,1,ierr)
  30  continue

where advsd(seed,k) advances the seed k places.
That is, send each slave a seed that is k places from the last seed.

Please reply to lovato@panda.fhcrc.org. I'll summarizes and post any replys.
Thanks
James

