Mentions légales du service

Skip to content
Snippets Groups Projects

Add component OpenMP for MUMPS to compile with multithreading

Merged MARAIT Gilles requested to merge gmarait/morse_cmake:master into master

I had an issue when compiling MaPHyS with multithreading + MUMPS on OCCIGEN: impossible to find MUMPS. The MUMPS test could not find (and link) the OpenMP library. I added OpenMP as a MUMPS component so that FindMUMPS could use a FindOpenMP and link correctly the MUMPS test. It worked fine to compile MaPHyS.

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
  • Author Contributor

    I guess it should. I am actually looking for OpenMP link flag. After some googling I found that FindOpenMP does not retrurn one before cmake 3.9. So the hack is to use the compiler flag as the link flag... A modern version (cmake >= 3.9) would be something like:

    list(APPEND REQUIRED_FLAGS "${OpenMP_Fortran_FLAGS}")

    list(APPEND REQUIRED_LDFLAGS "${OpenMP_Fortran_LIB_NAMES}")

    PS: also the Fortran flag is only available after cmake 3.7

  • mentioned in issue #12 (closed)

Please register or sign in to reply
Loading