Message: Random number generators misbehaving in MT Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Random number generators misbehaving in MT 

Forum: Multithreading
Date: 19 Sep, 2014
From: Andrew Green <Andrew Green>

Hello everyone,

I've been doing some simulations where I split runs across several computers, then combine the results into a single file at the end. Of course when doing this I set different random seeds for each of the runs using the /random/setSeeds UI command in a macro.

I ran into a couple of problems:

- First of all, I got the same results from each split regardless of the random number seed used. I fixed this by following the advice posted here: http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1657

- After doing this, I tested again running different splits with the same seeds, and now the results are different.

Is this expected behaviour? I understand that the seeding of random numbers is a little different in MT than in sequential mode...

PS
In case it makes any difference, I switched to the Mersenne Twister engine like this:

CLHEP::HepRandomEngine* MTengine = new CLHEP::MTwistEngine(seed);
G4Random::setTheEngine(MTengine);

Is my syntax okay? The macro file is executed after this, so it should be okay right?

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

1 Idea: Re: Random number generators misbehaving in MT   (Andrea Dotti - 19 Sep, 2014)
 Add Message Add Message
to: "Random number generators misbehaving in MT"

 Subscribe Subscribe

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