Installation and Setup¶
The HERDOS software is tested on the following 64 bit Linux system:
Enterprise Linux 7 or CentOS 7 (el7)
The AlmaLinux9 (el9) OS is under test. Please checkout the 27-el9-support branch if you need to test it.
The most convenient way to obtain the HERDOS software is through CVMFS, which is readily available on IHEP cluster and many HEP specific software resources. It can also easily be installed on your local machine following the CVMFS Client Quick Start guide.
However, if you want to install the HERDOS software without CVMFS please refer to the next session.
Note: the following instruction assumes you already have access to the (HERDOS Gitlab Repository)[https://code.ihep.ac.cn/herdos/offline]. Please contact Teng (tengli@sdu.edu.cn) or Zhicheng (tangzhch@ihep.ac.cn) if not.
Setup HERDOS software via CVMFS¶
The HERDOS software is already deployed at the IHEP stratum one CVMFS server. We strongly recommend use the software installed in CVMFS.
To setup CVMFS client and access the IHEP repository, run the following commands (sudo or root previlidge is mandantory):
sudo yum install -y https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm
sudo yum install -y cvmfs
sudo mkdir /etc/cvmfs/keys/ihep.ac.cn
sudo curl -o /etc/cvmfs/keys/ihep.ac.cn/ihep.ac.cn.pub http://cvmfs-stratum-one.ihep.ac.cn/cvmfs/software/client_configure/ihep.ac.cn/ihep.ac.cn.pub
sudo curl -o /etc/cvmfs/domain.d/ihep.ac.cn.conf http://cvmfs-stratum-one.ihep.ac.cn/cvmfs/software/client_configure/ihep.ac.cn.conf
echo "CVMFS_REPOSITORIES='sft.cern.ch,herd.ihep.ac.cn,container.ihep.ac.cn'" | sudo tee /etc/cvmfs/default.local
echo "CVMFS_HTTP_PROXY=DIRECT" | sudo tee -a /etc/cvmfs/default.local
sudo mkdir -p /cvmfs/herd.ihep.ac.cn
If you already have CVMFS client installed and configured to access the IHEP repository, to setup the run time environment of HERDOS, just run
source /cvmfs/herd.ihep.ac.cn/HERDOS/centos7_amd64_gcc850/Release/v00-10/ExternalLibs/bashrc.sh
To setup the run time environment of HERDOS with CRMC enabled, run
source /cvmfs/herd.ihep.ac.cn/HERDOS/centos7_amd64_gcc850/Release/v00-10/ExternalLibs/bashrc_crmc.sh
If you are hosting machine of ARM64 architecture, run
source /cvmfs/herd.ihep.ac.cn/HERDOS/centos7_arm64_gcc850/Release/v00-10/ExternalLibs/bashrc.sh
or
source /cvmfs/herd.ihep.ac.cn/HERDOS/centos7_arm64_gcc850/Release/v00-10/ExternalLibs/bashrc_crmc.sh
with crmc enabled.
After the run time environment is setup, you can easily compile the HERDOS software by running the following commands
git clone git@code.ihep.ac.cn:herdos/offline.git
cd offline
git checkout v00-10 # Or checkout other tags or branches.
./build_RelWithDebInfo.sh
source install/setup.sh
You could re-run the ./build_RelWithDebInfo.sh each time when the code is modified.
The following stable releases are installed on CVMFS as well. By running the following commands, you could setup one of them based on your requirements.
v00-01:
source /cvmfs/herd.ihep.ac.cn/HERDOS/SLC7/Pre-release/v00-01/setup.shv00-02:
source /cvmfs/herd.ihep.ac.cn/HERDOS/SLC7/Pre-release/v00-02/setup.shv00-03:
source /cvmfs/herd.ihep.ac.cn/HERDOS/SLC7/Pre-release/v00-03/setup.shv00-03:
source /cvmfs/herd.ihep.ac.cn/HERDOS/SLC7/Pre-release/v00-03/setup.shv00-04:
source /cvmfs/herd.ihep.ac.cn/HERDOS/SLC7/Pre-release/v00-04/setup.shv00-05:
source /cvmfs/herd.ihep.ac.cn/HERDOS/SLC7/Pre-release/v00-05/setup.shv00-06:
source /cvmfs/herd.ihep.ac.cn/HERDOS/SLC7/Pre-release/v00-06/setup.shv00-10:
source /cvmfs/herd.ihep.ac.cn/HERDOS/centos7_amd64_gcc850/Release/v00-10/setup.sh
Please check `/cvmfs/herd.ihep.ac.cn/HERDOS/README¡¯ for more details of the installed software on CVMFS.
Install and setup HERDOS without CVMFS¶
Install prerequisite
From a baremetal CentOS7 installation, the following system packages might be missing, and could be installed via yum.
bzip2
gcc-c++
libffi-devel
zlib-devel
libcurl-devel
autoconf
gettext
libxcb-devel
libX11-devel
expat-devel
libXpm-devel
libXft-devel
libXext-devel
patch
mesa-libGL-devel
libXmu-devel
mesa-libGLU-devel
openssl-devel
sudo yum install -y bzip2 gcc-c++ libffi-devel zlib-devel libcurl-devel autoconf gettext libxcb-devel libX11-devel expat-devel libXpm-devel libXft-devel libXext-devel patch mesa-libGL-devel libXmu-devel mesa-libGLU-devel openssl-devel
Install and setup gcc
The current HERDOS is compiled with gcc-8.5.0, with C++17 standard enabled. To install gcc-8.5.0, run
wget https://ftp.gnu.org/gnu/gcc/gcc-8.5.0/gcc-8.5.0.tar.gz
tar zxvf gcc-8.5.0.tar.gz
cd gcc-8.5.0
./contrib/download_prerequisites
./configure --prefix=your_install_folder --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++
make -j 10
make install
We recommend to use the following script to setup the gcc.
#!/bin/bash
export GCC_PREFIX=your_install_folder
export PATH=${GCC_PREFIX}/bin:$PATH
export LD_LIBRARY_PATH=${GCC_PREFIX}/lib64:${GCC_PREFIX}/lib:$LD_LIBRARY_PATH
export MANPATH=${GCC_PREFIX}/share/man:$MANPATH
export INFOPATH=${GCC_PREFIX}/share/info:$INFOPATH
export CC=${GCC_PREFIX}/bin/gcc
export CXX=${GCC_PREFIX}/bin/g++
Install and setup the external libraries.
We have developed a One-Click installer for the external libraries, which could download, configure, compile and install the requested external libraries, including:
Python 3.8.12
boost 1.73.0
cmake 3.17.3
git 1.8.4.3
xercesc 3.1.1
qt5 5.6.3
gsl 1.16
fftw3 3.3.7
tbb 2020.3
clhep 2.4.1.0
ROOT 6.22.08
HepMC 2.06.11
geant4 10.5.1
DD4hep 01-13-01
podio 00-14-01
mysql-connector-c 6.1.9
mysql-connector-cpp 1.1.12
GenFit master
SNiPER v2.1
To run the installer, run the following command.
git clone git@code.ihep.ac.cn:herdos/offline.git
export HERDTOP=your_install_prefix
bash offline/install/install_herdos.sh
The installation take ~1-3 hours depending on the network condition. If the installation is interrupted, just re-run the install_herdos.sh, the installer will try to recover the installation.
After installation, a bashrc.sh script will be automatically generated under the $HERDTOP folder, which is used to setup the runtime environment.
After the external libraries are installed, run the following commands to compile HERDOS.
git clone git@code.ihep.ac.cn:herdos/offline.git
cd offline
git checkout v00-10
./build_RelWithDebInfo.sh
source install/setup.sh