Message: Re: Question about saving Random Number Status Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Re: Question about saving Random Number Status 

Keywords: random number
Forum: Run Management
Re: Question Question about saving Random Number Status (Ioannis Sechopoulos)
Date: 18 May, 2006
From: Emanuele Leonardi <Emanuele Leonardi>

I have some additional questions on the same subject.

According to the novice example N03, if I enable saving the random number by calling

  G4RunManager::GetRunManager()->SetRandomNumberStore(true);

inside BeginOfRunAction, the random generator status is saved at the beginning of each run to currentRun.rndm and of each event to currentEvent.rndm.

If I then use the final version of the currentEvent.rndm coming from an old run to initialize the seed of a new run using the

  /random/resetEngineFrom  currentEvent.rndm

command, the first event of the new run will be identical to the last event of the old run. Is this correct? Is there any way to save to final state of the random engine just before the program exits, so that the new run will be the natural continuation of the old one?

Another question: I would like to run several copies of the same program in parallel. In order to have independent results, I want to initialize the random engine of each copy with a different (independent) seed. I gave a look into a currentEvent.rndm file and it has a format like

 Uvec
 1878463799
 0
 1487912126
 868880632

What is the meaning of the four numbers and how should I generate them in order to obtain independent seeds?

             Emanuele Leonardi

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Question about saving Random Number Status   (michel maire - 12 Jun, 2006)
3 More: Re: Question about saving Random Number Status   (Gabriele Cosmo - 12 Jun, 2006)
 Add Message Add Message
to: "Re: Question about saving Random Number Status"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]