Skip to content

Building APEX

Kevin Huck edited this page Mar 23, 2023 · 5 revisions

The APEX CMake configuration will download and build all requested dependencies, if desired. The easiest way to install APEX for any system with Spack is:

spack install apex

If you're not using spack, the next easiest way is to perform these steps (minimum CMake required is 3.20.1, and assuming the compiler is GNU):

git clone https://github.com/UO-OACISS/apex.git
cd apex

cwd=`pwd`
builddir=${cwd}/build
instdir=${cwd}/install

rm -rf ${builddir} ${instdir}

set -x
cmake -B ${builddir} \
-DCMAKE_C_COMPILER=`which gcc` \
-DCMAKE_CXX_COMPILER=`which g++` \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${instdir}

cmake --build build
cmake --install build

A more useful build of APEX is with the following options (APEX will build four library dependencies, and use the system installed PAPI):

set -x
cmake -B ${builddir} \
-DCMAKE_C_COMPILER=`which gcc` \
-DCMAKE_CXX_COMPILER=`which g++` \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${instdir} \
-DAPEX_WITH_BFD=TRUE \
-DAPEX_WITH_OMPT=TRUE \
-DAPEX_WITH_PLUGINS=TRUE \
-DAPEX_WITH_ACTIVEHARMONY=TRUE \
-DAPEX_WITH_OTF2=TRUE \
-DAPEX_WITH_PAPI=TRUE \
-DPAPI_ROOT=/path/to/papi/installation \

Building APEX on HPC systems

Here are specific instructions on how to build APEX on different HPC systems: