Message: Re: /random/setSeeds question Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Idea Re: /random/setSeeds question 

Forum: Run Management
Re: Question /random/setSeeds question (Stefan E. Mueller)
Re: Disagree Re: /random/setSeeds question (Gumplinger Peter)
Re: More Re: /random/setSeeds question (Stefan E. Mueller)
Date: 14 Jul, 2014
From: C Mos <C Mos>

I have had some issues along the same lines before, specifically defining the random seeds so to be able to run parallel jobs (read as "same job in different computers, no MPI") and merging results at the end of the session.

I do not have any experience using these functions in the macro file. However I do know base on documentation I read regarding the Ranecu Engine and from my own experience that there are two methods to define the seeds:

  void 	setSeed (long index, int dum=0)
  void 	setSeeds (const long *seeds, int index=-1)

Please refer to the following link for further explanation:

And this following link brings together some discussion related to this topic (you may or may not have run into this before):

I won't be able to explain the technicalities of these structures as I have not studied the full documentation to a proper extend. However I would like to emphasize from my own observations that using setSeeds() seems to provide the results you are looking for. I do initialization of my seeds USING hard code in my BeginOfRunAction() method instead of the main file. This will ensure every time I call the /run/beanOn I get different results:

    G4Random::setTheEngine(new CLHEP::RanecuEngine);

    long seeds[2];
    systime = time(NULL);
    seeds[0] = (long) systime;
    seeds[1] = (long) (systime*G4UniformRand());

I hope this helps!


C Mos

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

1 More: Re: /random/setSeeds question   (Stefan E. Mueller - 15 Jul, 2014)
(_ News: Re: /random/setSeeds question   (Stefan E. Mueller - 17 Jul, 2014)
(_ Feedback: Re: /random/setSeeds question   (David - 15 Aug, 2014)
 Add Message Add Message
to: "Re: /random/setSeeds question"

 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 ]