# Install Dependencies AdePT requires the following software stack: - CMake >= 3.25.2 - C/C++ compiler with C++20 support - CUDA toolkit (CUDA 12+ recommended) - Geant4 > 11.0 - VecCore - VecGeom (with CUDA support) - G4HepEm (with CUDA support) - Optional: HepMC3 ## Recommended: CVMFS Environment If CVMFS is available, this is the fastest way to get a compatible stack: ```console source /cvmfs/sft.cern.ch/lcg/views/devAdePT/latest/x86_64-el9-gcc13-opt/setup.sh ``` This requires both the `/cvmfs/sft.cern.ch` and `/cvmfs/projects.cern.ch/` to be available. The latter is only exposed within the CERN network, which contains CUDA itself, as it cannot be published for proprietary reasons. Therefore, outside of the CERN network, it is recommended to source the environment above and then build the same CUDA version from the LCG view locally. The current LCG view uses the CUDA version given in [this link](https://gitlab.cern.ch/sft/stacks/lcgcmake/-/blob/master/cmake/toolchain/heptools-devAdePT.cmake?ref_type=heads#L6). Then, one can proceed to build AdePT itself. ## Manual Dependency Builds (Developer Path) Use this when you need full control over versions and build options. ### VecCore ```console cmake -S . -B ./veccore-build \ -DCMAKE_INSTALL_PREFIX= cmake --build ./veccore-build --target install -- -j6 ``` ### VecGeom ```console cmake -S . -B ./vecgeom-build \ -DCMAKE_INSTALL_PREFIX= \ -DCMAKE_PREFIX_PATH= \ -DVECGEOM_ENABLE_CUDA=ON \ -DVECGEOM_GDML=ON \ -DBACKEND=Scalar \ -DCMAKE_CUDA_ARCHITECTURES= \ -DCMAKE_BUILD_TYPE=Release cmake --build ./vecgeom-build --target install -- -j6 ``` Tip: you can set `-DVECGEOM_NAV=` to tune memory/speed trade-offs. - Use `-DVECGEOM_NAV=index` when geometry is sufficiently small. It uses more memory to build the geometry tree, but is faster at runtime. - Use `-DVECGEOM_NAV=tuple` for larger geometries or tighter memory budgets. It uses less memory, but is slightly slower. ### Geant4 ```console cmake -S . -B ./geant4-build \ -DCMAKE_INSTALL_PREFIX= \ -DGEANT4_USE_SYSTEM_EXPAT=OFF \ -DGEANT4_USE_GDML=ON \ -DGEANT4_INSTALL_DATA=ON \ -DGEANT4_USE_USOLIDS=OFF cmake --build ./geant4-build --target install -- -j6 ``` ### G4HepEm ```console cmake -S . -B ./g4hepem-build \ -DCMAKE_INSTALL_PREFIX= \ -DCMAKE_PREFIX_PATH= \ -DG4HepEm_EARLY_TRACKING_EXIT=ON \ -DG4HepEm_CUDA_BUILD=ON cmake --build ./g4hepem-build --target install -- -j6 ``` ### Optional: HepMC3 ```console cmake -S . -B ./hepmc3-build \ -DCMAKE_INSTALL_PREFIX= \ -DHEPMC3_ENABLE_ROOTIO=OFF \ -DHEPMC3_ENABLE_PYTHON=OFF cmake --build ./hepmc3-build --target install -- -j6 ```