| Summary: | MPI not Distributing Different Random Number Seeds to Each Rank | ||
|---|---|---|---|
| Product: | Examples/Extended | Reporter: | Matthew Lund <matthewl.lund> |
| Component: | paralle/MPI | Assignee: | Andrea Dotti <andrea.dotti> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | asai, matthewl.lund |
| Priority: | P5 | ||
| Version: | 10.0 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
|
Description
Matthew Lund
2014-07-07 22:21:56 CEST
Thank you for reporting this. In the latest releases of 10.0 through 10.0-p02, we identified a bug in manually setting random number seeds in multithreaded application. Your issue seems to be caused by this same bug. We will verify it and update you. Hello Matthew,
thank you for reporting this.
I am sorry about this problem. However I need some more information before proposing a fix. In particular:
1- which version of Geant4 are you using exactly?
2- have you compiled Geant4 in multi-threading mode or sequential mode (it can be seen from the Geant4 banner of G4 when you start an application. It should read (version number/date is different, but please note the "<< in Multi-threaded mode >>" line
*************************************************************
Geant4 version Name: geant4-10-00-ref-07 [MT] (31-July-2014)
<< in Multi-threaded mode >>
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
*************************************************************
3- Finally do you use a UI command to set the random-seed? Or, more in general, how do you set the random seed?
Thank you for your help and your patience,
Andrea
Possible solution being tested in tag. Note this pug affects only 10.1.beta and not 10.0 series Sorry my previous comment is wrong: bug is also present in 10.0 series. Thus the fix will go into a possible 10.0 patch MPI Libraries set the seed in G4MPImanager.cc. There are two errors in the current file
Line 290 reads
CLHEP::HepRandom::setTheSeed(seed_list[rank_]);
should be
G4Random::setTheSeed(seed_list[rank_]);
Line 301 read
<< " seed= " << CLHEP::HepRandom::getTheSeed()
should be
<< " seed= " << G4Random::getTheSeed()
I'm applying the fix listed in 1657 G4RunMessenger.cc to see if it fixes the setting random number.
Solved in MPI-V10-00-02. Will be included in revised MPI in 10.1 |