Core dump only on building hadron physics lists and not EM

Hello, I am having a G4 Exception - core dump on a specific cross section loading case (Hadr014), which is causing any application that used hadron physics lists to fail with the following error stream below. The build configuration and environment variables are also listed.

This is a new build and install for version 10.7p1, thus is not previously working code. No cross section data was transferred over from earlier use.

Condensed Error Output:

====================================================================
HADRONIC PROCESSES SUMMARY (verbose level 1)


                       Hadronic Processes for neutron

                       Hadronic Processes for sigma-

Process: hadElastic
Model: hElasticLHEP: 0 eV —> 100 TeV
Cr_sctns: Glauber-Gribov: 0 eV —> 100 TeV

Process: sigma-Inelastic
Model: FTFP: 3 GeV —> 100 TeV
Model: BertiniCascade: 0 eV —> 6 GeV
Cr_sctns: Glauber-Gribov: 0 eV —> 100 TeV

Process: hBertiniCaptureAtRest


                       Hadronic Processes for triton

Process: hadElastic
Model: hElasticLHEP: 0 eV /n —> 100 TeV/n
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV —> 25.6 PeV

Process: tInelastic
Model: Binary Light Ion Cascade: 0 eV /n —> 6 GeV/n
Model: FTFP: 3 GeV/n —> 100 TeV/n
Cr_sctns: G4ParticleInelasticXS: 0 eV —> 25.6 PeV

================================================================

-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : had014
issued by : G4LevelReader::LevelManager(…)
for Z= 1 A= 1 is not opened!

*** Fatal Exception *** core dump ***
**** Track information is not available at this moment
**** Step information is not available at this moment

-------- EEEE -------- G4Exception-END --------- EEEE -------

I have tested:

  1. The electromagnetic physics lists such as Em Opt0 EmOpt4 , and other example apps that do not use hadron physics lists and they work fine.

  2. Hadr01 - If I run Hadr01 without testing the physics lists, i.e. the example input file Hadr01.in without /testhadr/ it works fine.

Environment variables
$ env | grep G4 | sort | sed ‘s/=/ /’ | column -t
G4ABLADATA /opt/Geant4/geant4_data/G4ABLA3.1
G4ENSDFSTATEDATA /opt/Geant4/geant4_data/G4ENSDFSTATE2.3
G4INCLDATA /opt/Geant4/geant4_data/G4INCL1.0
G4LEDATA /opt/Geant4/geant4_data/G4EMLOW7.13
G4LEVELGAMMADATA /opt/Geant4/geant4_data/G4PhotonEvaporation5.7
G4NEUTRONHPDATA /opt/Geant4/geant4_data/G4NDL4.6
G4PARTICLEHPDATA /opt/Geant4/geant4_data/G4TENDL1.3.2
G4PARTICLEXSDATA /opt/Geant4/geant4_data/G4PARTICLEXS3.1.1
G4PIIDATA /opt/Geant4/geant4_data/G4PII1.3
G4RADIOACTIVEDATA /opt/Geant4/geant4_data/RadioactiveDecay5.6
G4REALSURFACEDATA /opt/Geant4/geant4_data/G4RealSurface2.2
G4SAIDXSDATA /opt/Geant4/geant4_data/G4SAIDDATA2.0

Also, I traced back the call for Hadr014 to geant4.10.07.p01/source/processes/hadronic/cross_sections/src where the code states:

indent preformatted text by 4 spaces if (!(filein)) {
G4ExceptionDescription ed;
ed << "Data file <" << ost.str().c_str()
   << "> is not opened!";
G4Exception("G4NeutronElasticXS::Initialise(..)","had014",
            FatalException, ed, "Check G4PARTICLEXSDATA");
return; }

Here is my build configuration:

– The C compiler identification is GNU 9.3.1
– The CXX compiler identification is GNU 9.3.1
– Check for working C compiler: /opt/root/bin/gcc
– Check for working C compiler: /opt/root/bin/gcc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /opt/root/bin/g++
– Check for working CXX compiler: /opt/root/bin/g++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Performing Test HAVE_TLS
– Performing Test HAVE_TLS - Success
– Found EXPAT: /usr/lib64/libexpat.so (found version “2.1.0”)
– Found XercesC: /opt/Geant4/geant4_dependencies/lib/libxerces-c.so (found version “3.2.3”)
– Found OpenGL: /usr/lib64/libOpenGL.so
– Pre-configuring dataset G4NDL (4.6)
– Pre-configuring dataset G4EMLOW (7.13)
– Pre-configuring dataset PhotonEvaporation (5.7)
– Pre-configuring dataset RadioactiveDecay (5.6)
– Pre-configuring dataset G4PARTICLEXS (3.1.1)
– Pre-configuring dataset G4PII (1.3)
– Pre-configuring dataset RealSurface (2.2)
– Pre-configuring dataset G4SAIDDATA (2.0)
– Pre-configuring dataset G4ABLA (3.1)
– Pre-configuring dataset G4INCL (1.0)
– Pre-configuring dataset G4ENSDFSTATE (2.3)
– Looking for sys/types.h
– Looking for sys/types.h - found
– Looking for stdint.h
– Looking for stdint.h - found
– Looking for stddef.h
– Looking for stddef.h - found
– Check size of off64_t
– Check size of off64_t - done
– Looking for fseeko
– Looking for fseeko - found
– Looking for unistd.h
– Looking for unistd.h - found
– Looking for pthread.h
– Looking for pthread.h - found
– Looking for pthread_create
– Looking for pthread_create - not found
– Check if compiler accepts -pthread
– Check if compiler accepts -pthread - yes
– Found Threads: TRUE
– The following Geant4 features are enabled:
GEANT4_BUILD_CXXSTD: Compiling against C++ Standard ‘11’
GEANT4_BUILD_MULTITHREADED: Build multithread enabled libraries
GEANT4_BUILD_TLS_MODEL: Building with TLS model ‘initial-exec’
GEANT4_USE_SYSTEM_EXPAT: Using system EXPAT library
GEANT4_USE_GDML: Building Geant4 with GDML support
GEANT4_USE_QT: Build Geant4 with Qt support

– Configuring done
– Generating done
– Build files have been written to: /opt/Geant4/geant4_build_4

There were no apparent failures in extraction of the relevent cross section data files for NDL, TENDL, and PARTICLEXS folders. I had also tried without the TENDL data as it’s stated these are optional online.

Thanks for any potential feedback

I have the same problem.
when I try to run the B2a example, after compiling it and doing $./exampleB2a, the visualization opens all right and when I click the Beam-On button, it produces the following output:

What shall we do?
[ I have installed and set up the environmental variables as in Postinstall Setup — Geant4 Installation Guide 10.7 documentation ]
Many thanks!

@iouatu sadly for me it was an environment variable issue, one of the cross sections paths was written wrong, double check which path variables doesn’t lead with G4

@marmolRBG , thanks for posting the solution!
For me it was the fact that I didn’t download and install al the datafiles from geant4.web.cern.ch , but only the ones I ‘‘believed’’ will do the job.
For future reference, just download and install all datafiles from the start to avoid possible complications!