Installation of data files

Please fill out the following information to help in answering your question, and also see tips for posting code snippets

Geant4 Version:
Operating System: Ubuntu 20
Compiler/Version: gcc 9.4.0

I’ve been trying to install the data files (like G4NDL etc) upon installation. Have tried to do it two ways:

  1. cmake -DGEANT4_INSTALL_DATA=ON . after the main cmake command but before making and
  2. within the main cmake command like cmake -DGEANT4_INSTALL_DATA=ON -DCMAKE_INSTALL_PREFIX=/path/to/geant4-v11.1.0-install /path/to/geant4-v11.1.0

Both of these seem to lead to an install that has the directories associated with the data files, but has not downloaded the actual data files (therefore leading to a seg fault on running). What am I doing wrong? Do I absolutely have to install all the data files by hand?

It’s been a long time since I’ve let Geant4 do the downloads for me (you end up with separate copies of all those datasets every time you do a built). I think the downloads don’t happen until you run the make install step; the cmake part just sets things up for you.

when you specify an existing location with pre-downloaded datasets from prior installations, it will reuse the set (if the version matches i think)

Ah, yes. You have to set the DATADIR as well to use a shared area.

I have found that yes, the data files seem to download on the make step, and then install to correct locations on the make install step.

I don’t know why I ended up with empty directories in my first tries, although at that point I was doing cmake -DGEANT4_INSTALL_DATA=ON . separately before make -jN, maybe that had something to do with it. I’m still a little confused but I think you guys have solved it for me, thanks!

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