Project

General

Profile

How to build vectest

setup target directories

export WORK_DIR=/path_to_your_work_dir  # <--- point to your own directory
export SRC_DIR=${WORK_DIR}/src
export INSTALL_DIR=${WORK_DIR}/install
export BUILD_DIR=${WORK_DIR}/build

# create src/install/build for the first time
for xdir in src install build ; do
  if [ ! -d ${WORK_DIR}/${xdir} ]; then /bin/mkdir -p ${WORK_DIR}/$xdir ; fi
done

install external vector libraries: Vc, UME::SIMD

  • Vc
cd $SRC_DIR
git clone https://github.com/VcDevel/Vc.git
cd Vc/
git checkout -b 1.4.1 1.4.1 
mkdir -p $BUILD_DIR/vc_1_4_1
cd $BUILD_DIR/vc_1_4_1
cmake $SRC_DIR/Vc -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR/vc_1_4_1 -DBUILD_TESTING=OFF 
make -j4 install

export VCROOT=${INSTALL_DIR}/vc_1_4_1
  • UMD::SIMD (header only installation)
cd $INSTALL_DIR
git clone https://github.com/edanor/umesimd

install VecCore

cd $SRC_DIR
git clone https://github.com/root-project/veccore VecCore
mkdir -p $BUILD_DIR/VecCore
cd $BUILD_DIR/VecCore
cmake $SRC_DIR/VecCore -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}/VecCore
export VECCORE_PATH=${INSTALL_DIR}/VecCore/lib/cmake/VecCore
make install

install root (if use the option, ROOT=ON for vectest)

cd $SRC_DIR
git clone http://root.cern.ch/git/root
cd root
git checkout -b v6-06-06 v6-06-06 
mkdir -p ${BUILD_DIR}/root_v6_06_06
cd ${BUILD_DIR}/root_v6_06_06
cmake ${SRC_DIR}/root \
      -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}/root_v6_06_06 \
      -DVC=OFF -Dbuiltin_zlib=ON
make -j6 install
source ${INSTALL_DIR}/root_v6_06_06/bin/thisroot.sh

install vectest

cd $SRC_DIR
git clone http://cdcvs.fnal.gov/projects/vectest
mkdir -p ${BUILD_DIR}/vectest
cd ${BUILD_DIR}/vectest
cmake $SRC_DIR/vectest -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR/vectest \
      -DCMAKE_PREFIX_PATH="$VCROOT;${VECCORE_PATH}" \
      -DCMAKE_BUILD_TYPE=Release -DBACKEND=Vc \
      -DROOT=OFF -DCUDA=ON -DBENCHMARK=ON
make -j4 install

testing vectest (example for rng)

./RngBenchmark [NSample=1000000] [NRepetitions=100]