Installation - ATTPC/ATTPCROOTv2 Wiki

Installation instructions

Dependencies

The ATTPCROOT code depends on the following external packages, with tested version numbers:

  • Required dependencies
    • Compiler with support for C++14 standard (gcc 9+, <8 is not supported)
    • CMake 3.15 or higher
    • Xerces (3.2.3)
    • FairSoft (apr21 with ROOT fftw3 module)
    • FairRoot (18.6.5)
    • HDF5 (1.10.4)
    • For developers
  • Optional dependencies
  • Deprecated dependencies

Installation on FRIB cluster

ROOT and FairROOT are already installed on the system. As of 1/14/2021 the IT department has decided they no longer want to maintain the installation, the the process has changed. The perquisites for installation can now bew found in the directory /mnt/simulation/attpcroot/fair_install_18.6/. It is recommended to use the env_fishtank.sh script to set the required modules and environment variables that used to be handled just through the fishtank module system.

If you are going to be developing with the code read Preparing the environment and setup your repository like it describes. Otherwise you can clone the main repository.

After cloning the repo:

cd ATTPCROOTv2
source env_fishtank.sh
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=/mnt/simulations/attpcroot/fair_install_18.6/ ../
make install -j 4 
source config.sh

You can change the install path in the normal CMake way by running:

cmake -DCMAKE_PREFIX_PATH=/mnt/simulations/attpcroot/fair_install_18.6/ -DCMAKE_INSTALL_PATH=pathToInstall ../
make install -j 4

Installation on other systems

Copied below are the instructions for building and installing the perquisites on FRIB fishtank. Hopefully they will be of use installing the software on other systems:

FairSoft

We will be following a modified version of the FairSoft installation directions here.

Step 1 is to install the dependencies. FairSoft provides macros for those with sudo privileges. On fishtank without root access you must do:

module purge
module load gnu/gcc/9.3
module load xerces/3.2.3
export XercesC_ROOT=/mnt/misc/sw/x86_64/Debian/10/xerces/3.2.3/

Follow the directions in step 2 to clone FairSoft for the release apr21_patches. Something like:

git clone -b apr21_patches https://github.com/FairRootGroup/FairSoft

Before configuring the installation in step 3 you will probably have to bootstrap cmake to get the correct version. You will also want to set the installation path by editing the file FairSoftConfig.cmake.

After configuring FairSoft but before building we are going to make some tweaks to the root configuration. We are going to enable fftw3. In the file <buildDir>/Stamp/root/root-configure-RelWithDebInfo.cmake edit the line that sets the command, adding the following option -Dbuiltin_fftw3=ON;. You may also want to disable XRootD by changing the parameter -Dxrootd=ON to -Dxrootd=OFF.

Now we can execute the build step (step 4 in the FairSoft documentation).

If it fails when it gets to installing root, because it can't build XROOTD or some other component, you can enable/disbale components by editing both the CMakeCache.txt for root and the root-configure-RelWithDebInfo.cmake. For example to disable xrootd and enable fftw3 if it wasn't done before, we would modify cmake cache file for root, found at Build/root/CMakeCache.txt by changing the lines:

  1. xrootd:BOOL=ON to xrootd:BOOL=OFF
  2. builtin_xrootd:BOOL=ON to builtin_xrootd:BOOL=OFF
  3. builtin_fftw3:BOOL=OFF to builtin_fftw3:BOOL=ON
  4. fftw3:BOOL=OFF to fftw3:BOOL=ON

As well as make the changes to the configure script specified above in-between steps 3 and 4.

FairRoot 18.6.5

Modified directions from https://github.com/FairRootGroup/FairRoot

  1. export SIMPATH=FairSoftInstallDirectory
  2. Clone the FairRoot repository git clone -b v18.6_patches https://github.com/FairRootGroup/FairRoot.git
  3. Create the build directory mkdir /mnt/analysis/e12014/fair_install/FairRoot/
  4. Run cmake in the build directory cmake -DCMAKE_INSTALL_PREFIX=/mnt/simulations/attpcroot/fair_install_18.6/FairRoot /mnt/simulations/attpcroot/fair_install_18.6/src/FairRoot/
  5. Build and install the code in the build directory make make install

HDF5 1.10.4

  1. Grab source code wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.4/src/hdf5-1.10.4.tar.gz
  2. Untar source tar -xvf hdf5-1.10.4.tar.gz
  3. Make build directory mkdir /mnt/analysis/e12014/fair_install/hdf5
  4. Run cmake cmake -DCMAKE_INSTALL_PREFIX=/mnt/simulations/attpcroot/fair_install_18.6/hdf5 /mnt/simulations/attpcroot/fair_install_18.6/src/hdf5-1.10.4
  5. Make and install make && make install

GenFit (Optional dependency)

  1. Get the source git clone https://github.com/Yassid/GenFit.git
  2. Make build directory mkdir /mnt/analysis/e12014/fair_install/genfit
  3. Run cmake from build directory, making sure it can find our version of root
cmake -DCMAKE_INSTALL_PREFIX=/mnt/simulations/attpcroot/fair_install_18.6/GenFit -DCMAKE_PREFIX_PATH=/mnt/simulations/attpcroot/fair_install_18.6/FairSoft/ -DBUILD_TESTING=OFF /mnt/simulations/attpcroot/fair_install_18.6/src/GenFit/
  1. Build and install make and make install

HiRAEVT (Optional dependency)

  1. Get the source git clone https://github.com/nscl-hira/HiRAEVT.git
  2. Create build directory mkdir /mnt/analysis/e12014/fair_install/HiRAEVT
  3. Run cmake in build directory, disabling unpacking modules
cmake -DCMAKE_INSTALL_PREFIX=/mnt/simulations/attpcroot/fair_install_18.6/HiRAEVT -DCMAKE_PREFIX_PATH=/mnt/simulations/attpcroot/fair_install_18.6/FairSoft/ -DBUILD_UNPACKERS=OFF /mnt/simulations/attpcroot/fair_install_18.6/src/HiRAEVT/
  1. Build and install make and make install

FLANN 1.9.1 (Required for PCL)

  1. Grab the source wget https://github.com/flann-lib/flann/archive/refs/tags/1.9.1.tar.gz
  2. Unpack the source tar -xzf 1.9.1.tar.gz
  3. Create a build directory mkdir /mnt/analysis/e12014/fair_install/flann/
  4. Modify flann per issue #369 to build with newer versions of cmake:
touch src/cpp/empty.cpp
sed -e '/add_library(flann_cpp SHARED/ s/""/empty.cpp/' \
-e '/add_library(flann SHARED/ s/""/empty.cpp/' \
-i src/cpp/CMakeLists.txt
  1. In the build directory, run cmake cmake -DCMAKE_INSTALL_PREFIX=/mnt/simulations/attpcroot/fair_install_18.6/flann /mnt/simulations/attpcroot/fair_install_18.6/src/flann
  2. make && make install (might yell about pyFlann but idc)

Eigen3 (Required for PCL)

  1. Grab the source wget https://gitlab.com/libeigen/eigen/-/archive/3.3.9/eigen-3.3.9.tar.gz
  2. Untar file tar -xzf eigen-3.3.9.tar.gz
  3. Make build directory mkdir /mnt/analysis/e12014/fair_install/eigen3
  4. cmake -DCMAKE_INSTALL_PREFIX=/mnt/simulations/attpcroot/fair_install_18.6/eigen /mnt/simulations/attpcroot/fair_install_18.6/src/eigen-3.3.9/
  5. Install make install

PCL 1.10.1 (Optional dependency)

  1. Make sure FLANN, and Eigen are all installed
  2. Grab the source code https://github.com/PointCloudLibrary/pcl/archive/refs/tags/pcl-1.10.1.tar.gz
  3. Untar source tar -xvf pcl-1.10.1.tar.gz
  4. Create build directory mkdir /mnt/analysis/e12014/fair_install/pcl
  5. In build directory, run cmake set to use the boost libraries from fairsoft
cmake -DCMAKE_INSTALL_PREFIX=/mnt/simulations/attpcroot/fair_install_18.6/pcl -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/mnt/simulations/attpcroot/fair_install_18.6/flann -DBOOST_INCLUDEDIR=/mnt/simulations/attpcroot/fair_install_18.6/FairSoft/include -DBOOST_LIBRARYDIR=/mnt/simulations/attpcroot/fair_install_18.6/FairSoft/lib/ -DBoost_NO_SYSTEM_PATHS=ON /mnt/simulations/attpcroot/fair_install_18.6/src/pcl-pcl-1.10.1/
  1. Build and install the code make and make install
⚠️ **GitHub.com Fallback** ⚠️