[Dune] Problem linking with Pametis / GMP

Benedikt Oswald benedikt.oswald at lspr.swiss
Mon Jul 24 17:28:46 CEST 2017


Hello Amal, this is in fact a nast problem & the reason is that

there is no metis.h in the parmetis include. Parmetis install

does not care about this.

The solution is to copy metis.h into the parmetis include directory

yourself. Good luck, Benedikt



Am 24.07.17 um 17:06 schrieb Sahai, Amal:
> Hi Christoph
>
> Thank your for your reply. Yes, I misspoke and this is a Cmake configure issue. I did try deleting the build directory and re-running cmake, but it does not change the outcome. Won't the following command in the FindParMETIS module :
>
> set(PARMETIS_LIBRARY ParMETIS_LIBRARY-NOTFOUND
>     CACHE FILEPATH "Full path of the ParMETIS library")
>
> result in ParMETIS_LIBRARY-NOTFOUND always being cached (which is what I am seeing)?. In any case, I tried looking at the Error.log for the different modules and there is no additional information printed for the check_include_file call. The following excerpt is from CMakeError.log for the dune-fem-dg module:
>
> Determining if the include file metis.h exists failed with the following output:
> Change Dir: /home/amal/LIB/dune/dune-project/build/dune-fem-dg/CMakeFiles/CMakeTmp
>
> Run Build Command:/usr/bin/make "cmTryCompileExec588475723/fast"
> /usr/bin/make -f CMakeFiles/cmTryCompileExec588475723.dir/build.make CMakeFiles/cmTryCompileExec588475723.dir/build
> make[1]: Entering directory `/home/amal/LIB/dune/dune-project/build/dune-fem-dg/CMakeFiles/CMakeTmp'
> /usr/bin/cmake -E cmake_progress_report /home/amal/LIB/dune/dune-project/build/dune-fem-dg/CMakeFiles/CMakeTmp/CMakeFiles 1
> Building C object CMakeFiles/cmTryCompileExec588475723.dir/CheckIncludeFile.c.o
> /home/amal/APPS/openmpi/openmpi-2.1.1-gcc-7.1.0/bin/mpicc    -o CMakeFiles/cmTryCompileExec588475723.dir/CheckIncludeFile.c.o   -c /home/amal/\
> LIB/dune/dune-project/build/dune-fem-dg/CMakeFiles/CMakeTmp/CheckIncludeFile.c
> /home/amal/LIB/dune/dune-project/build/dune-fem-dg/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: metis.h: No such file or director\
> y
>  #include <metis.h>
>           ^~~~~~~~~
> compilation terminated.
> make[1]: *** [CMakeFiles/cmTryCompileExec588475723.dir/CheckIncludeFile.c.o] Error 1
> make[1]: Leaving directory `/home/amal/LIB/dune/dune-project/build/dune-fem-dg/CMakeFiles/CMakeTmp'
> make: *** [cmTryCompileExec588475723/fast] Error 2
>
> Determing location of METIS failed:
> Include directory:
> Library directory:
>
> Determining if the include file parmetis.h exists failed with the following output:
> Change Dir: /home/amal/LIB/dune/dune-project/build/dune-fem-dg/CMakeFiles/CMakeTmp
>
> Run Build Command:/usr/bin/make "cmTryCompileExec1666024213/fast"
> /usr/bin/make -f CMakeFiles/cmTryCompileExec1666024213.dir/build.make CMakeFiles/cmTryCompileExec1666024213.dir/build
> make[1]: Entering directory `/home/amal/LIB/dune/dune-project/build/dune-fem-dg/CMakeFiles/CMakeTmp'
> /usr/bin/cmake -E cmake_progress_report /home/amal/LIB/dune/dune-project/build/dune-fem-dg/CMakeFiles/CMakeTmp/CMakeFiles 1
> Building C object CMakeFiles/cmTryCompileExec1666024213.dir/CheckIncludeFile.c.o
> /home/amal/APPS/openmpi/openmpi-2.1.1-gcc-7.1.0/bin/mpicc   -I/home/amal/APPS/openmpi/openmpi-2.1.1-gcc-7.1.0/include -I/home/amal/LIB/paramet\
> is/parmetis-4.0.3-gcc-7.1.0-openmpi-2.1.1/include    -o CMakeFiles/cmTryCompileExec1666024213.dir/CheckIncludeFile.c.o   -c /home/amal/LIB/dun\
> e/dune-project/build/dune-fem-dg/CMakeFiles/CMakeTmp/CheckIncludeFile.c
> In file included from /home/amal/LIB/dune/dune-project/build/dune-fem-dg/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:0:
> /home/amal/LIB/parametis/parmetis-4.0.3-gcc-7.1.0-openmpi-2.1.1/include/parmetis.h:18:10: fatal error: metis.h: No such file or directory
>  #include <metis.h>
>           ^~~~~~~~~
> compilation terminated.
> make[1]: *** [CMakeFiles/cmTryCompileExec1666024213.dir/CheckIncludeFile.c.o] Error 1
> make[1]: Leaving directory `/home/amal/LIB/dune/dune-project/build/dune-fem-dg/CMakeFiles/CMakeTmp'
> make: *** [cmTryCompileExec1666024213/fast] Error 2
>
>
> Regards
> Amal
>
> ________________________________________
> From: Dune [dune-bounces at lists.dune-project.org] on behalf of Christoph Grüninger [foss at grueninger.de]
> Sent: Sunday, July 23, 2017 4:48 PM
> To: dune at lists.dune-project.org
> Subject: Re: [Dune] Problem linking with Pametis / GMP
>
> Hi Amal,
> your issue is no linking problem, it's a CMake (configure) issue.
>
> Your setup looks ok and our CMake doesn't smell neither. Have you
> deleted your build directory and re-run CMake? CMake is caching a lot of
> checks and maybe the first run was without GMP and ParMETIS?
>
>> 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
> Is there nothing else related to the check_include_file call? Usually
> there is a compiler invokation and some error output. If this is not
> there, it's another pointer to caching. I'd like to see the output
> error.log right afer deleting the build dir and re-running CMake.
>
>> I looked at FindParMETIS.cmake and "check_include_file(parmetis.h PARMETIS_FOUND)" fails, which results in  the "if(PARMETIS_FOUND)" not being executed.
> Your analysis seems to be correct. I hope it's caching!
>
> Bye
> Christoph
>
> --
> [..] Mathematicians are like theologians: we regard
> existence as the prime attribute of what we study.
> But unlike theologians, we need not always rely upon
> faith alone.                      [Lawrence Evans]
>
> _______________________________________________
> Dune mailing list
> Dune at lists.dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune

-- 
----------------------------------------------------------------------------------------------------------------------
Dr. sc. techn. Benedikt Oswald - first engineer - LSPR AG - phone +41 43 366 90 74
Grubenstrasse 9, CH-8045 Zürich, benedikt.oswald at lspr.swiss
----------------------------------------------------------------------------------------------------------------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 882 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20170724/dde67689/attachment.sig>


More information about the Dune mailing list