- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm porting an OpenMP-based program to the OneAPI. To make an incremental transition I try to compile the existing program with dpcpp. The minimal CMakeLists.txt reproducing the problem in the DevCloud is attached. With the default compiler it works fine. However, if invoked with -DCMAKE_CXX_COMPILER=`which dpcpp`, it fails at the cmake configuration step with an error: > CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message): > Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
- Tags:
- General Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dmitry,
Thanks for reaching out to us.
We are working on it and will get back to you.
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dmitry,
Can you please try compiling your code after setting OpenMP_CXX_FLAGS to -qopenmp
Please let us know if you are facing any issues.
Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Now only OpenMP_CXX_LIB_NAMES is missing:
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find OpenMP_CXX (missing: OpenMP_CXX_LIB_NAMES)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please try setting the OpenMP lib path in your CMake file.
For your reference:
set(OpenMP_CXX_LIB_NAMES "libiomp5" "libomp" "libgomp")
Please let us know if this resolves your issue.
Thanks
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Goutham,
It does not. Now it fails with:
> Could NOT find OpenMP_CXX (missing: OpenMP_libiomp5_LIBRARY OpenMP_libomp_LIBRARY OpenMP_libgomp_LIBRARY)
Also manually modifying the source of each project using OpenMP does not seem scalable.
cmake merge request 3916 might be related to this issue, I'll try the latest version and get back.
Thanks
Dmitry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found a combination that works:
set(OpenMP_CXX_LIB_NAMES "libiomp5" "libomp" "libgomp") # in CMakeLists.txt
Invoke the latest cmake with
-DOpenMP_CXX_FLAGS="-qopenmp" -DCMAKE_LIBRARY_PATH="$(llvm-config --libdir)" -DCMAKE_CXX_COMPILER=`which dpcpp`
Passing -DOpenMP_CXX_LIB_NAMES="libiomp5;libomp;libgomp" does not work.
Need to study the matter a bit more, so far this workaround can be used.
- Dmitry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dmitry,
We tried compiling our sample application with dpcpp using -qopenmp flag alone and we don't see any errors during compilation.
We couldn't reproduce your error as we don't have access to your source code. So, kindly if you can share your source code along with the CMake file we will try to reproduce the same error that you are facing. Please share the steps to reproduce document also.
Thanks
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Goutham,
The error emerges before the compilation, at the cmake step. The minimal CMakeLists.txt is attached to the original post. The contents of the script submitted to theDevCloud queue is straightforward:
#!/bin/bash
source /opt/intel/inteloneapi/setvars.sh
cd <a working directory, choose yours>
cmake -DCMAKE_CXX_COMPILER=dpcpp -DOpenMP_CXX_FLAGS="-qopenmp" <path to the directory containing CMakeLists.txt, choose yours>
Substitute the paths in the angle brackets accordingly.
Thanks
Dmitry
UPD: I'll prepare a single-script reproduction when I get to the laptop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dmitry,
Thank you for providing all the required information. we are able to reproduce the same error which you are facing, we found out that CMake is working fine with icpc/icc/icx/icpx compilers but not with dpcpp.
We will forward this issue to the concerned team to further investigate on this.
We are glad to see that your issue is resolved with workarounds, Please let us know whether we can close this thread.
Thanks
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Goutham,
You can close this thread.
Please let me know if a relevant cmake or llvm issue is opened.
- Dmitry
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page