Message: Re: understand weird random seed issue Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Re: understand weird random seed issue 

Forum: Event and Track Management
Re: None understand weird random seed issue (Zhiyi Liu)
Re: Feedback Re: understand weird random seed issue (Gumplinger Peter)
Date: 14 Feb, 2016
From: Azam Zabihi <Azam Zabihi>

Hi Dear

I used MPI to run the program! Now random numbers for parallel implementations are the same!

    G4Random::setTheEngine(new CLHEP::RanecuEngine);
    G4long seeds[2];
    time_t systime = time(NULL);
    seeds[0] = (long) systime;
    seeds[1] = (long) (systime*G4UniformRand());
    G4Random::setTheSeeds(seeds);

Output:

1:randx 69.2253 2:randx 69.2253 1:randy 63.0333 2:randy 63.0333 .............!!!!!!

Please help me!

 Add Message Add Message
to: "Re: understand weird random seed issue"

 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 ]