-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Building a non-10.2.3 version of Geant4 with the LDMX_CUSTOM_GEANT4 setup works but requires a lot of faff by the user. It boils down to the following
CMAKE_PREFIX_PATHprioritizes the Geant4 build in the container- The various environment variables pointing to the Geant4 datasets are pointing to the datasets in the container. Newer versions of Geant4 may require more up to date datasets.
Geant4 assumes that if the corresponding environment variable (e.g. G4NEUTRONHPDATA) is set then that version should be prioritized. If the environment variable is not set, it will search GEANT4_DATA_DIR for the versions that it is expecting.
There are also some other concerns when working with different Geant4 versions that I will be documenting in the docs page (although maybe part of this documentation belongs on the main documentation page? Or maybe the main documentation page could include the docs from here?).
The former is simple to deal with, just set CMAKE_PREFIX_PATH as part of the LDMX_CUSTOM_GEANT4 part of the entry script.
The latter can be dealt with a couple of ways.
- We could unset the various environment variables that we defined in the container environment and rely on GEANT4_DATA_DIR to pick up the right thing
- We could remove the environment variables outright and define GEANT4_DATA_DIR in the container and use the same method for both. Is there a reason for why we are explicitly marking out the G4 dataset versions and not the GEANT4_DATA_DIR @tomeichlersmith @bryngemark ?