[Dune] Problem linking with Pametis / GMP

Sahai, Amal sahai2 at illinois.edu
Sun Jul 23 19:33:48 CEST 2017


Hi 

I am trying to build dune with the following option file:

BUILDDIR=./
USE_CMAKE=yes
MAKE_FLAGS=-j4
INSTALL_DIR=/home/amal/LIB/dune/dune-INSTALL
FLAGS="-O3 -DNDEBUG -Wall -pedantic"
BLAS_LIB=/home/amal/LIB/OpenBLAS/lib/libopenblas.so
LAPACK_LIB=/home/amal/LIB/OpenBLAS/lib/libopenblas.so
CMAKE_PREFIX_PATH="/home/amal/LIB/parametis/parmetis-4.0.3-gcc-7.1.0-openmpi-2.1.1"
GMP_DIR=/home/amal/LIB/gmp-6.1.2
######################                                                                                                                         
CMAKE_FLAGS="-D CMAKE_INSTALL_PREFIX=$INSTALL_DIR     \                                                                                        
 -DCMAKE_CXX_FLAGS=\"$FLAGS\"                        \                                                                                         
 -DDUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS:BOOL=TRUE  \                                                                                         
 -DDUNE_GRID_GRIDTYPE_SELECTOR:BOOL=ON               \                                                                                         
 -DPARMETIS_ROOT=/home/amal/LIB/parametis/parmetis-4.0.3-gcc-7.1.0-openmpi-2.1.1     \                                                         
 -DBLAS_openblas_LIBRARY:FILEPATH=$BLAS_LIB          \                                                                                         
 -DLAPACK_openblas_LIBRARY:FILEPATH=$BLAS_LIB        \                                                                                         
 -DGMP_ROOT:FILEPATH=$GMP_DIR                        \                                                                                         
 -DUSE_MPI=ON"
 #-DCMAKE_DISABLE_FIND_PACKAGE_LATEX=TRUE                                                                                                      
#######################                                                                                                                        
MAKE_FLAGS=install
CONFIGURE_FLAGS="CC=mpicc CXX=mpicxx --prefix=$INSTALL_DIR\                                                                                    
                --enable-parallel \                                                                                                            
                --enable-experimental-grid-extensions \                                                                                        
                --enable-fieldvector-size-is-method \                                                                                          
                --Wno-deprecated-declarations"
#########################


Despite setting the PARMETIS_ROOT and GMP_ROOT variables, the different modules are unable to detect parmetis. The CmakeCache.txt for dune-grid contains the following information:


//Include directory of ParMETIS
PARMETIS_INCLUDE_DIR:PATH=/home/amal/LIB/parametis/parmetis-4.0.3-gcc-7.1.0-openmpi-2.1.1/include

//Full path of the ParMETIS library
PARMETIS_LIBRARY:FILEPATH=ParMETIS_LIBRARY-NOTFOUND

//Name of the ParMETIS library (default: parmetis).
PARMETIS_LIB_NAME:STRING=parmetis

//No help, variable specified on the command line.
PARMETIS_ROOT:UNINITIALIZED=/home/amal/LIB/parametis/parmetis-4.0.3-gcc-7.1.0-openmpi-2.1.1


Also, the CMakeError.log contains the following message:

Determining if the include file parmetis.h exists failed with the following output:
Change Dir: /home/amal/LIB/dune/dune-project/dune-grid/CMakeFiles/CMakeTmp

I looked at FindParMETIS.cmake and "check_include_file(parmetis.h PARMETIS_FOUND)" fails, which results in  the "if(PARMETIS_FOUND)" not being executed. I don't understand why this is happening because looking at the value of PARMETIS_INCLUDE_DIR in CMakeCache.txt, cmake seems to have found the right include directory for Parmetis. The same issue occurs with regards to GMP for all modules that require these libraries.

I would be very grateful for any help in sorting this linking issue.

Regards
Amal




More information about the Dune mailing list