Installation
Dependencies
PerFlow is dependent on:
- Dyninst
- Boost (Boost will be installed automatically with Dyninst)
- PAPI
- libunwind
- igraph
- cmake >= 3.16
Dyninst and PAPI need user to build themselves. igraph
has been integrated into PerFlow as submodule.
git submodule update --init
You can build dependencies from source codes or build dependencies with Spack (The recommended way to build Dyninst (with Boost) and PAPI is to use Spack)
spack install dyninst # boost will be installed at the same time
spack install papi
spack install libunwind
Environment Setting
If your dependencies are built from source codes, please use the following scripts to load the dependence libraries:
PREFIX=/home/jinyuyang/build
DEPLIST="papi-6.0.0 dyninst-10.1.0 libunwind-1.6.0"
for dep in $DEPLIST
do
export PATH=${PREFIX}/${dep}/bin64:${PREFIX}/${dep}/bin:$PATH
export INCLUDE=${PREFIX}/${dep}/include64:${PREFIX}/${dep}/include:$INCLUDE
export C_INCLUDE_PATH=${PREFIX}/${dep}/include64:${PREFIX}/${dep}/include:$C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=${PREFIX}/${dep}/include64:${PREFIX}/${dep}/include:$CPLUS_INCLUDE_PATH
export LIBRARY_PATH=${PREFIX}/${dep}/lib64:${PREFIX}/${dep}/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=${PREFIX}/${dep}/lib64:${PREFIX}/${dep}/lib:$LD_LIBRARY_PATH
done
If your dependencies are built with spack, please use the following scripts to load the dependence libraries:
# before building PerFlow
spack load dyninst # boost will be loaded at the same time
spack load papi
spack load libunwind
Build PerFlow
If your dependencies are built from source codes, the cmake commands for PerFlow would be like:
cmake .. -DBOOST_ROOT=/path_to_your_boost_install_dir -DDyninst_DIR=/path_to_your_dyninst_install_dir/lib/cmake/Dyninst -DPAPI_PREFIX=/path_to_your_papi_install_dir
# You should make sure that there is `DyninstConfig.cmake` in /path_to_your_dyninst_install_dir/lib/cmake/Dyninst
# And there is `include` `lib` in /path_to_your_papi_install_dir
# And there is `include` `lib` in /path_to_your_boost_install_dir, `boost` in /path_to_your_boost_install_dir/include
Note that if dyninst is built from source, the boost will be downloaded and installed automatically with it, in the install directory of dyninst.
cmake .. -DBOOST_ROOT=/path_to_your_dyninst_install_dir -DDyninst_DIR=/path_to_your_dyninst_install_dir/lib/cmake/Dyninst -DPAPI_PREFIX=/path_to_your_papi_install_dir
If your dependencies are built with spack, the cmake commands for PerFlow would be like:
# build
mkdir build
cd build
cmake ..