cb-geo / mpm

CB-Geo High-Performance Material Point Method
https://www.cb-geo.com/research/mpm
Other
235 stars 82 forks source link

Compilation issue with KaHIP #695

Closed tianchiTJ closed 3 years ago

tianchiTJ commented 3 years ago

Describe the bug The compile with MPI has an issue based on the current documentation. The cmake is incompleted.

To Reproduce Steps to reproduce the behavior:

  1. Compile the current version 'KaHIP'

The command sh ./compile_withcmake.sh will give an error message as follows:

./compile_withcmake.sh: 33: [[: not found
./compile_withcmake.sh: 37: [[: not found
./compile_withcmake.sh: 41: [[: not found

It should be change to only ./compile_withcmake.sh, and then the compile of 'KaHIP' will be OK.

  1. Compile the 'MPM' with MPI

The command cmake -DCMAKE_BUILD_TYPE=Release -DKAHIP_ROOT=~/workspace/KaHIP/ -DHALO_EXCHANGE=On .. will give an error message as follows:

-- The CXX compiler identification is GNU 9.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: filesystem system 
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "2.91.0") 
-- Found MPI_CXX: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so (found version "3.1") 
-- Found MPI: TRUE (found version "3.1")  
-- The C compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- HDF5: Using hdf5 compiler wrapper to determine CXX configuration
-- Found HDF5: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_cpp.so;/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.10.4") found components:  CXX HL 
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Could NOT find MKL (missing:  MKL_INCLUDE_DIR MKL_LIBRARIES) 
-- Checking for package 'KaHIP'
-- Performing Test KAHIP_TEST_RUNS
-- Performing Test KAHIP_TEST_RUNS - Failed
CMake Error at cmake/FindPackageHandleStandardArgs.cmake:137 (message):
  KaHIP could not be found/configured.  (missing: KAHIP_TEST_RUNS)
Call Stack (most recent call first):
  cmake/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindKaHIP.cmake:140 (find_package_handle_standard_args)
  CMakeLists.txt:107 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/tianchi/Desktop/mpm/build/CMakeFiles/CMakeOutput.log".
See also "/home/tianchi/Desktop/mpm/build/CMakeFiles/CMakeError.log".
kks32 commented 3 years ago

Thanks @tianchiTJ

sh ./compile_withcmake.sh is still valid as long as you are running it in a shell terminal.

A temporary fix is to use a slgihtly older version of KaHIP.

git clone https://github.com/kahip/kahip
cd kahip
git checkout 78d2bb0a2c8cb396fed45710a4292034fffdaf83
sh ./compile_withcmake.sh
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.