Cmake cannot find MKL & KaHIP issue

Hi. I followed the instructions step by step in ubuntu.
0. download the mpm code,
sudo git clone

  1. For prerequisite packages,
    sudo apt-get install -y gcc git libboost-all-dev libeigen3-dev libhdf5-serial-dev libopenmpi-dev

  2. For cmake of recent version,
    sudo apt-get install software-properties-common
    sudo apt-add-repository ‘deb bionic main’
    sudo apt update
    sudo apt upgrade

  3. For opengl & xt,
    sudo apt-get install freeglut3-dev libxt-dev

  4. For vtk,
    git clone VTK
    cd VTK && mkdir build && cd build/
    cmake -DCMAKE_BUILD_TYPE:STRING=Release …
    make -j
    sudo make install

  5. Then compile it,
    cd mpm && mkdir build && cd build && cmake -DCMAKE_CXX_COMPILER=g++ …

But there’re some problems when compiling mpm like below.

– HDF5: Using hdf5 compiler wrapper to determine CXX configuration
– Checking for package ‘KaHIP’
CMake Error at cmake/FindPackageHandleStandardArgs.cmake:137 (message):
KaHIP could not be found/configured. (missing: KAHIP_LIBRARIES
Call Stack (most recent call first):
cmake/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
cmake/FindKaHIP.cmake:140 (find_package_handle_standard_args)
CMakeLists.txt:115 (find_package)

It might be needed to set the library directories. How can i solve the problems?
Please help.

Hi @JYH203

Thanks for trying the MPM code. You need to install KaHIP.

cd ~/workspace/ && git clone && \
   cd KaHIP && sh ./

Once KaHIP is installed, go to the build directory and run the following CMake command.

cmake -DCMAKE_BUILD_TYPE=Release -DKAHIP_ROOT=~/workspace/KaHIP/ ..
1 Like

Thank you so much~~!!!