|Message: Re: random number generation||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
Hi Carter, > I'm trying to simulate a large number of events, something like several > billion. I've been doing this by running multiple jobs in parallel, > using the ranecu engine and setting a unique initial seed for each job > with HepRandom::setTheSeed(seed). > > But I've just realized that this doesn't work so well. One problem is > that the ranecu engine uses a table of initial seeds of length 215, > and HepRandom::setTheSeed(seed) just picks an entry in this table. > So it's not possible to have more than 215 independent jobs running > in parallel - I had been attempting to run 2000 jobs. > > Another problem seems to be that random numbers are repeating even > within the first 215 jobs. > > Is there another engine I can use to get more independent random > numbers? Are there any examples illustrating the use of other engines? this question should have been posted in the CLHEP mailing list since it is mainly related to the usage of the random generators defined in CLHEP... Anyhow, by using the static HepRandom interface for setting the single seed, the initial seeds get retrieved, as you observed, from a table of 255 entries which corresponds to couples of uncorrelated numbers according to the Marsaglia algorithm. If you need more seeds (and do not really care about perfect internal uncorrelation), you can directly initialise your RanecuEngine with a couple of numbers of your choice. You can do that either with: HepRandom::setTheSeeds(mySeeds); or with: RanecuEngine* theEngine=HepRandom::getTheEngine(); theEngine->setSeeds(mySeeds); where 'mySeeds' is an array of 2 longs, which are the numbers you've chosen. Other engines in CLHEP follow a similar technique, but may require more than 2 numbers for the seeds initialisation. Cheers, Gabriele
|Inline Depth:||Outline Depth:||Add message:|