Skip to content
Snippets Groups Projects

Rewrite FindMETIS to provide imported targets

Merged Simon Praetorius requested to merge feature/find_metis into master

Summary

This MR adds imported-targets to the FindMETIS.cmake module, following modern cmake guidelines.

Details

Instead of exporting include directories and libraries as variables, the find modules exports an imported target that contains all the necessary information to include and link METIS. The find module introduces the imported target: METIS::METIS.

Scotch-METIS

If you want to use scotch-metis is (partially) compatible library replacement, you have to set the option ENABLE_SCOTCH_METIS to true. It is an explicit option, since the scotch-metis library is not really compatible to metis. It provides only a small subset of the functions, with slightly different parameters and in some versions a missing return value. So, you have to program scotch-metis differently from METIS. If enabled, the Scotch library is search for by FindPTScotch and METIS is linked against PTScotch::Scotch if found. In this case the preprocessor constant HAVE_SCOTCH_METIS is set.

Depending the version of Scotch, a different METIS API version is provided. Scotch < 6.0.7 provides only METIS API 3, but with Scotch 6.0.9 both APIs (3 or 5) are possible. Whether Scotch ships a compiled METIS API 5 or 3 depends on how scotchmetis was compiled. For recent Scotch libraries you have to provide the additional cmake variable SCOTCH_METIS_VERSION=(3|5) to tell cmake how Scotch is compiled. The API version of METIS is provided as preprocessor constant METIS_API_VERSION and typically corresponds to the METIS major version.

Depends on !820 (merged) for linking against PTScotch::Scotch

ToDo

  • Check for the failing Pipelines
  • Design a proper test for the functionality of METIS
  • Test Scotch backend for METIS
Edited by Simon Praetorius

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
  • I am all in favor of merging this. Thanks for putting so much effort into this MR! Once you are ready, I'll merge.

  • added 1 commit

    Compare with previous version

  • added 1 commit

    • 3fc9ad0b - Correct some typos in metistest

    Compare with previous version

  • Simon Praetorius resolved all threads

    resolved all threads

  • Can be merged now.

  • added 5 commits

    Compare with previous version

  • I took the liberty to squash the commits and alter the commit message.

  • Christoph Grüninger enabled an automatic merge when the pipeline for 335d9f24 succeeds

    enabled an automatic merge when the pipeline for 335d9f24 succeeds

  • mentioned in commit acb90738

  • mentioned in issue #222 (closed)

  • I highly appreciate modernizing the cmake scripts, but doing it in a way that Dune is not working with Debian stable and/or Ubuntu LTS basically renders it unusable in production for me

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading