Skip to content

Rewrite FindParMETIS to provide imported targets

Simon Praetorius requested to merge feature/find_parmetis into master

Summary

This MR adds imported-targets to the FindParMETIS.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 ParMETIS. The find module introduces the imported target: ParMETIS::ParMETIS.

The imported target contains the dependencies to METIS and MPI automatically, and if the PARMETIS_LIB_NAME includes "ptscotch", additionally a link to the PTScotch::PTScotch target is included. Thus, those libraries do not need to be linked manually. This is different from the previous strategy where it was guessed that if a parmetis code does not compile, and a symbol is not found, PTScotch must be linked. This wild guessing is replaced with an inspection of the lib-name "ptscotchparmetis" and a link against the package imported target instead of searching for the PTScotch library again.

Depends on !820 (merged) for linking against PTScotch::PTScotch and !821 (merged) for linking against METIS::METIS

ToDo

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

Merge request reports

Loading