Run Time Problems¶
Q: On Linux, I get a segmentation fault as soon as I run one of the official examples.
A: Check that the CLHEP library has been installed and compiled coherently with the same compiler you use for installing Geant4 and for the same version of Linux distribution. For example, a binary object produced with Red-Hat 7.X is not fully compatible with binaries running on RH 9.X or higher, due to different libc used in the two configurations.
Q: I installed Geant4 libraries and built my application, when I try to run it I get:
error in loading shared libraries: libCLHEP.so: cannot open shared object file: No such file or directory.
A: Your installation of CLHEP includes shared libraries. You need to
specify the path where libCLHEP.so is installed through your environment
variable LD_LIBRARY_PATH
. For example, in tcsh UNIX shell:
setenv LD\_LIBRARY\_PATH ${LD\_LIBRARY\_PATH}:$CLHEP\_BASE\_DIR/lib
Q: On my system I get a Floating Point Exception (FPE) since some
physics processes sometimes return DBL_MAX
as interaction length and
this number is afterwards multiplied by a number greater than 1.
A: Geant4 coding conventions and installation setup explicitly follow the ANSI/IEEE-754 Standard for the initialization of floating-point arithmetic hardware and portability. The Standard foresees floating-point arithmetic to be nonstop and underflows to be gradual. On DEC platforms, for example, the ANSI/IEEE-754 Standard compliance needs to be explicitly set (since deactivated by default); in this case we use infact the option “-ieee” on the DEC/cxx native C++ compiler to achieve this. You should check if your compiler provides compilation options for activating Standard initialization of FP arithmetic (it may be platform specific).