Skip to content
Snippets Groups Projects

[release] Fixes finding static scotch metis bindings

Using Scotch a replacement work on Debian only for the default shared libraries. But to use the ones supporting larger integer types one needs to use the static version (shared ones are missing!). This MR fixes finding static Scotch/PT-Scotch instead of METIS/ParMETIS.

Please cherry-pick to the release.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Markus Blatt Title changed from Fixes static scotch metis bindings to [release] Fixes finding static scotch metis bindings

    Title changed from Fixes static scotch metis bindings to [release] Fixes finding static scotch metis bindings

  • Can some academic test the changes with METIS/ParMETIS?

  • Off-topic: Why do you open branches in your personal clone? It becomes more visible and easier to fetch, if you create the branch within the repository. This way we could also push improvements. I am not allowed to write into your personal fork.

  • Your change breaks ParMETIS detection for me. Tested with openSuse 42.1, GCC 6 and ParMETIS 4.0.3.

    Relevant part from the CMakeError.log:

    gmpx library directory: /usr/lib64/libgmpxx.so
    
    Determining if the function parmetis_v3_partkway exists failed with the following output:
    Change Dir: /temp/gruenich/dune/complete/dune-istl/build-cmake/CMakeFiles/CMakeTmp
    
    Run Build Command:"/usr/bin/gmake" "cmTC_a8bd3/fast"
    /usr/bin/gmake -f CMakeFiles/cmTC_a8bd3.dir/build.make CMakeFiles/cmTC_a8bd3.dir/build
    gmake[1]: Entering directory '/temp/gruenich/dune/complete/dune-istl/build-cmake/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_a8bd3.dir/CheckFunctionExists.c.o
    /usr/bin/gcc-6   -I/usr/lib64/mpi/gcc/openmpi/include/openmpi/opal/mca/hwloc/hwloc172/hwloc/include -I/usr/lib64/mpi/gcc/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent -I/usr/lib64/mpi/gcc/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include -I/usr/lib64/mpi/gcc/openmpi/include -I/usr/lib64/mpi/gcc/openmpi/include/openmpi -I/temp/gruenich/dune/zusatz/parmetis-4.0.3/install/include  -DCHECK_FUNCTION_EXISTS=parmetis_v3_partkway   -o CMakeFiles/cmTC_a8bd3.dir/CheckFunctionExists.c.o   -c /usr/share/cmake/Modules/CheckFunctionExists.c
    Linking C executable cmTC_a8bd3
    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a8bd3.dir/link.txt --verbose=1
    /usr/bin/gcc-6   -DCHECK_FUNCTION_EXISTS=parmetis_v3_partkway    CMakeFiles/cmTC_a8bd3.dir/CheckFunctionExists.c.o  -o cmTC_a8bd3 -rdynamic 
    CMakeFiles/cmTC_a8bd3.dir/CheckFunctionExists.c.o: In function `main':
    CheckFunctionExists.c:(.text+0x15): undefined reference to `parmetis_v3_partkway'
    collect2: error: ld returned 1 exit status
    CMakeFiles/cmTC_a8bd3.dir/build.make:97: recipe for target 'cmTC_a8bd3' failed
    gmake[1]: *** [cmTC_a8bd3] Error 1
    gmake[1]: Leaving directory '/temp/gruenich/dune/complete/dune-istl/build-cmake/CMakeFiles/CMakeTmp'
    Makefile:126: recipe for target 'cmTC_a8bd3/fast' failed
    gmake: *** [cmTC_a8bd3/fast] Error 2
    
    
    Determing location of ARPACK failed:
  • Markus Blatt Added 1 commit:

    Added 1 commit:

    • 1606ed1f - Readd PARMETIS_LIBRARY to CMAKE_REQUIRED_LIBRARIES.
  • Markus Blatt Added 1 commit:

    Added 1 commit:

    • 8b565d2b - [release] Search for helper libraries only in the directory of main lib.
  • Markus Blatt Added 2 commits:

    Added 2 commits:

    • ddfb407d - [release] Newest statically linked scotch requires pthread.
    • 47091ecd - Reset variables correctly, prevent repetition, and skip debug output.
  • By accident I stripped PARMETIS_LIBRARY for the first check. Should be fixed now. I also tested with statically self compiled newest version of scotch and fixed the issues that I had.

    If you prefer I can squash the commits into fewer ones to make cherry-picking more easy.

  • mentioned in issue #17 (closed)

  • The new set of commits works for me. ParMETIS is found and is included in the tests.
    I'd welcome to squash the changes in less commits. Maybe you can remove multiple exclamation points from the comment and the newly added blank line.

  • Don't squash anything - I'll just cherry-pick the merge commit for the MR anyway.

    This test is turning into a rather ugly beast - I had to read the code twice to understand the point of the _CMAKE_REQUIRED_LIBRARIES store / restore hack. I think it would be more understandable using the standard cmake_{push,pop}_check_state(), but I'll just merge this now, otherwise it won't make the release.

  • Reassigned to @smuething

  • Steffen Müthing Status changed to merged

    Status changed to merged

  • mentioned in commit 834efd97

  • mentioned in commit 78ebeed6

  • Mentioned in commit 834efd97

Please register or sign in to reply
Loading