[Gate-users] Same runing on GATE 4.0...

Simon Stute gate.stute at gmail.com
Thu Apr 9 12:16:46 CEST 2009


Hi MJ,

In Gate_v4 the random generator has changed. Now this is the Mersenne
Twister, that is more stable, longer period and faster than the old one
(JamesRandom).
Unfortunately people who changed this stuff forgot to update the gjs
program. So the gjs program still products JamesRandom seed files, and those
files are ignored by the Mersenne Twister generator ... That is why you
always get the default seed value (fixed in CLHEP) and the same results for
all splited macros.

To fix it:

In the main program, Gate.cc file, there are few lines at the beginning of
the main concerning the random generator:

//
// random engine
//

  //CLHEP::HepJamesRandom randomEngine;
  //CLHEP::Ranlux64Engine randomEngine;
    CLHEP::MTwistEngine randomEngine;
    CLHEP::HepRandom::setTheEngine(&randomEngine);

So just comment the line concerning the Mersenne Twister and uncomment the
line concerning the JamesRandom engine, and recompile:

//
// random engine
//

  CLHEP::HepJamesRandom randomEngine;
  //CLHEP::Ranlux64Engine randomEngine;
  //CLHEP::MTwistEngine randomEngine;
    CLHEP::HepRandom::setTheEngine(&randomEngine);

So you will use the old generator but it will work with the gjs random seed
files...

And don't worry, this is fixed for the next version and new macro commands
to control everything concerning the random generators will be provided
(type of generator, automatic randomized seed, fixed seed, use of seed
files, etc...). Coming soon.

Cheers,
Simon



On Thu, Apr 9, 2009 at 8:01 AM, Park MinJae <MJ at toti.us> wrote:

>
> Dear Gaters,
>
> Long time, no see~ :)
>
>
> I recently changed 3.12 to 4.00 on x64...
>
> Everything of Gate works fine...but the split jobs generated SAME
> results...
>
> I checked the seed-files...Initial Seed were same...9876...
>
> I took a look into the source files of Gate and tried to put one more
> randomization step at the initial seeds...I couldn't...
>
> Thank you for any information about it...:)
>
> Cordially yours,
> MJ
>
> //=================================================
> //  Park MinJae
> //  SNU BME Ph.D. Candidate
> //
> //  DialTo:+82-17-711-7809
> //  MailTo:MJ at ToTi.us
> //
> //  Make the Dream True...
> //=================================================
>
>
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.healthgrid.org
> http://lists.healthgrid.org/mailman/listinfo/gate-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20090409/bad4be86/attachment.htm>


More information about the Gate-users mailing list