Skip to content
Snippets Groups Projects
user avatar
scott snyder authored
GeoXF.cxx makes heavy use of Eigen.  In debug builds it ends up being
much, much slower than in optimized builds, to the point where where it
makes it difficult to run things in dbg.  Tweak the build so that we compile
GeoXF.cxx with optimization, even in dbg builds.  We also need to use the
flatten attribute on the functions that use Eigen, so ensure that the Eigen
operations are completely inlined.

This was motivated by the fact that numerous tests are timing out in the dbg
build.  This change alone reduced the time required by one test from ~600s
to ~400s.
8a25c826
History
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Name Last commit Last update
..
GeoModelKernel
doc
src
CMakeLists.txt
README.md

Instructions for building GeoModelKernel library

External dependency: Eigen

Eigen is the only external dependency of the GeoModelKernel library. If Eigen3 is already available on your system and CMake can find it with find_package(Eigen3), the you can skip the rest of this section.

There are several ways of installing Eigen on your system. Some of them are OS-dependent (e.g. apt-get install libeigen3-dev on Ubuntu). A generic option is to download Eigen's source code from http://eigen.tuxfamily.org/index.php?title=Main_Page#Download. The following example demonstrates how install Eigen version 3.3.4 into ${EIGEN3_INSTALL_DIR}:

wget http://bitbucket.org/eigen/eigen/get/3.3.4.tar.gz
tar -zxf 3.3.4.tar.gz
mv eigen-eigen-* eigen-src
mkdir eigen_build
cd eigen_build
cmake -DCMAKE_INSTALL_PREFIX=${EIGEN3_INSTALL_DIR} ../eigen-src
make install

Build and Install GeoModelKernel

The example shows how to build and install GeoModelKernel at ${GEOMODEL_INSTALL_DIR}. It assumes that Eigen is already installed on the system at ${EIGEN3_INSTALL_DIR}

git clone --recurse-submodules https://gitlab.cern.ch/GeoModelDev/GeoModelKernel.git geomodel_src
mkdir geomodel_build
cd geomodel_build
cmake -DCMAKE_INSTALL_PREFIX=${GEOMODEL_INSTALL_DIR} -DEIGEN3_INCLUDE_DIR=${EIGEN3_INSTALL_DIR}/include/eigen3 ../geomodel_src
make
make install

Build and Install on Mac OS

Installing Eigen3 with Brew and using a local install folder for the final installation:

brew install eigen
git clone --recurse-submodules https://gitlab.cern.ch/GeoModelDev/GeoModelKernel.git geomodel_src
mkdir geomodel_build
cd geomodel_build
cmake -DCMAKE_INSTALL_PREFIX=../install -DEIGEN3_INCLUDE_DIR=/usr/local/include/eigen3 ../geomodel_src
make
make install