[Gate-users] Problem with MersenneTwister random number generator

Patay Gergely patay.gergely at mediso.hu
Thu Sep 4 10:33:58 CEST 2014


Hello,

this is caused by a bug in CLHEP. It was corrected since 2.2.0.0, but
unfortunately Geant4.9.6 includes the 2.1.3.1 version.
http://git.cern.ch/pubweb/CLHEP.git/blob/refs/heads/CLHEP_2_200_branch:/ChangeLog#l56

Since this is a quite harmless bug otherwise and it occurs only at the call to the
MTwistEngine::showStatus() function, a trivial workaround is to comment out the
" /gate/random/verbose 1" command when you use the MersenneTwister generator.

The choice of the RNG is more or less a matter of taste (all these algorithms are
state-of-the-art quality). The different generators *should* produce the same
results in a statistical sense, but of course, on an event-by-event basis they
will differ.
http://proj-clhep.web.cern.ch/proj-clhep/manual/UserGuide/Random/Random.html

good luck
  Gergely



On 2014-09-04 10:01, Paweł Kowalski wrote:
> Hello,
>
> After succesful compilation of GATE (GATE version 7.0 - official,
> Geant 4.9.6.p03 - with built in CLHEP, gcc 4.8.3, Fedora 20) I tried
> to run benchPET benchmark (I have also tried with external clhep in
> version 2.1.3.1).
> When random number generator is set to MersenneTwister, I have strange
> output and error (files output.txt and error.txt).
> When I change generator to JamesRandom there is no problem with
> simulation (output2.txt and error2.txt).
> When generator is set to Runlux64, there is no problem by simulations
> seems to be extremely slow.
>
> What may be the problem with MersenneTwister generator?
>
> I would like to also ask, what is the difference between these three
> generators? Why MersenneTwister is set as default generator in all
> examples?
> Does type of generator influence on final results?
>
> Best regards,
> Paweł Kowalski
>
>
>
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>


More information about the Gate-users mailing list