Problem 71

Summary: Cannot store random number status
Product: Geant4 Reporter: seligman
Component: runAssignee: Makoto.Asai
Status: CLOSED WORKSFORME    
Severity: normal    
Priority: P2    
Version: other   
Hardware: PC   
OS: Linux   

Description seligman 2000-03-20 10:03:24 CET
There are commands

 /run/storeRandomNumberStatus Frequency
 /run/restoreRandomNumberStatus FileName

These commands save and restore the state of the random number engine in G4.

However an attempt to use the first command in Geant 4.1.1 with any Frequency
(-2,-1,1,2) leads to

...
/run/storeRandomNumberStatus -2
/run/beamOn 1
### Run 0 start.
Energies per event for Run #0(10 GeV e-)
Segmentation fault (core dumped)

This has been confirmed both in the LAR simulation that we run at Nevis, and in
Example N02.  We therefore assume that this problem is not particular to our
simulation code.

I've verified that we're running CLHEP 1.4.0.  I've traced the problem, and I
believe it may arise in $CLHEP_BASE_DIR/Random/Random.cc (since the output file
is created, but no bytes are written to it before the seg fault).
Comment 1 Gabriele Cosmo 2000-03-23 09:38:59 CET
If running on a Linux system, please make sure that both CLHEP and G4
libraries have been compiled using the same OS/compiler version.
A problem of this kind arises if for example you built CLHEP with
RedHat 5.1, while Geant4 with RedHat 6.X.
It is due to a binary incompatibility between the standard libC
in the two systems.