CMake shows OpenMP installed but isn't part of PrintFinalReport.cmake

This subforum is specifically to discuss packaging issues on different platforms (windows, mac, linux), and using different packaging systems (conda, etc...)
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

CMake shows OpenMP installed but isn't part of PrintFinalReport.cmake

Post by Kunda1 »

Running CMake I see:

Code: Select all

-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
But when I reach the summary report, no mention of OpenMP at all.

I think we should add it.

This report is accurate for r28697

Code: Select all

$ git rev-list --count HEAD
28697
Background: "The OpenMP API supports multi-platform shared-memory parallel programming in C/C++ and Fortran." https://www.openmp.org/
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
waebbl
Posts: 200
Joined: Thu Aug 16, 2018 3:12 pm

Re: CMake shows OpenMP installed but isn't part of PrintFinalReport.cmake

Post by waebbl »

Kunda1 wrote: Thu Apr 14, 2022 10:14 pm Running CMake I see:

Code: Select all

-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
But when I reach the summary report, no mention of OpenMP at all.

I think we should add it.
Is OpenMP actually used directly by FreeCAD? The output might come from some third-party CMake files, i.e. I know, that VTK can have support for OpenMP and checks for the package. In such cases, I would not add it to the final report.
wmayer
Founder
Posts: 20202
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: CMake shows OpenMP installed but isn't part of PrintFinalReport.cmake

Post by wmayer »

waebbl wrote: Fri Apr 15, 2022 9:39 am Is OpenMP actually used directly by FreeCAD?
https://github.com/FreeCAD/FreeCAD/blob ... s.txt#L202
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: CMake shows OpenMP installed but isn't part of PrintFinalReport.cmake

Post by Kunda1 »

which openmp package are we using from this list? https://repology.org/projects/?search=o ... es_newest=
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
openBrain
Veteran
Posts: 9031
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: CMake shows OpenMP installed but isn't part of PrintFinalReport.cmake

Post by openBrain »

Kunda1 wrote: Fri Apr 15, 2022 12:03 pm which openmp package are we using from this list? https://repology.org/projects/?search=o ... es_newest=

Code: Select all

$ ldd bin/FreeCAD | grep openmp
        libhdf5_openmpi.so.103 => /lib/x86_64-linux-gnu/libhdf5_openmpi.so.103
Then (for Debian derivatives) :

Code: Select all

$ dpkg -S libhdf5_openmpi.so.103
libhdf5-openmpi-103-1:amd64: /usr/lib/x86_64-linux-gnu/libhdf5_openmpi.so.103.2.0
libhdf5-openmpi-103-1:amd64: /usr/lib/x86_64-linux-gnu/libhdf5_openmpi.so.103
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: CMake shows OpenMP installed but isn't part of PrintFinalReport.cmake

Post by Kunda1 »

openBrain wrote: Fri Apr 15, 2022 12:10 pm

Code: Select all

$ ldd bin/FreeCAD | grep openmp
        libhdf5_openmpi.so.103 => /lib/x86_64-linux-gnu/libhdf5_openmpi.so.103
Then (for Debian derivatives) :

Code: Select all

$ dpkg -S libhdf5_openmpi.so.103
libhdf5-openmpi-103-1:amd64: /usr/lib/x86_64-linux-gnu/libhdf5_openmpi.so.103.2.0
libhdf5-openmpi-103-1:amd64: /usr/lib/x86_64-linux-gnu/libhdf5_openmpi.so.103
Thanks! Odd I don't see a *hdf5* version that matches our v4.5

Code: Select all

-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
Unless ours is very outdated?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
openBrain
Veteran
Posts: 9031
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: CMake shows OpenMP installed but isn't part of PrintFinalReport.cmake

Post by openBrain »

Kunda1 wrote: Fri Apr 15, 2022 12:53 pm Thanks! Odd I don't see a *hdf5* version that matches our v4.5
https://repology.org/project/hdf5-openmpi4/versions :?:
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: CMake shows OpenMP installed but isn't part of PrintFinalReport.cmake

Post by Kunda1 »

openBrain wrote: Fri Apr 15, 2022 12:56 pm
Kunda1 wrote: Fri Apr 15, 2022 12:53 pm Thanks! Odd I don't see a *hdf5* version that matches our v4.5
https://repology.org/project/hdf5-openmpi4/versions :?:
Weird, the version is way off
Screenshot_20220415_092502.png
Screenshot_20220415_092502.png (111.17 KiB) Viewed 1578 times
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
openBrain
Veteran
Posts: 9031
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: CMake shows OpenMP installed but isn't part of PrintFinalReport.cmake

Post by openBrain »

Kunda1 wrote: Fri Apr 15, 2022 1:27 pm Weird, the version is way off
I'm not so familiar with Suse, but I guess this is the package version, that you compare with the lib version. ;)
Generally when the package says "openmpi4", it is ... version 4 :)
User avatar
chennes
Veteran
Posts: 3868
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: CMake shows OpenMP installed but isn't part of PrintFinalReport.cmake

Post by chennes »

I think you're confusing OpenMP and OpenMPI -- although they sound similar, they are actually totally different parallelization strategies. FEM uses OpenMP (look for #pragma omp statements).
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Post Reply