Problem while running B1 example

Hello all,

After installing Geant4 with qt5, I tried to run example B1 and this report occurred:

-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : PART70000
issued by : G4NuclideTable
G4ENSDFSTATEDATA environment variable must be set
*** Fatal Exception *** core dump ***
**** Track information is not available at this moment
**** Step information is not available at this moment

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

*** G4Exception: Aborting execution ***

I use M1 MAC, Geant4 11.0.3 with qt5, and this is the first time running geant4.
Seems I missed G4ENSDFSTATEDATA environment variable, may I ask how can I add it to solve this error?

Thank you,

Thank you.

basically, for every terminal you open you need to run


once, within the correct folder.

Thank you for your reply.

I checked that the CMAKE_INSTALL_PREFIX directory is /usr/local, then I sourced in the terminal /usr/local/bin. However the same error occurred when I run the example again. Sorry for being stupid, please let me know what I am doing wrong.


when you close the terminal or open a second one, you need to source the file again in that terminal.

edit: sorry, thought you made it run once, but not again. in this case, the next post is a solution, or you could use the install option to automatically download the datasets:


think you need to re-run the cmake command only with the updated option and building should be quite fast afterwards

cmake --build . --target install

download the G4ENSDFSTATEDATA data from the geant4 website and paste it in your install directory as ~/genat4****-install/share/Genat4-v11-***/data/
if data folder is not there first create and paste the extracted folder there.

1 Like

Thank you very much. It works!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.