Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix for Samples #2529

Open
Martin-HZK opened this issue Oct 24, 2024 · 1 comment
Open

Bug fix for Samples #2529

Martin-HZK opened this issue Oct 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Martin-HZK
Copy link

Summary

In the DirectProgramming/C++/StructuredGrids/iso3dfd_omp_offload/src/CMakeLists.txt, the default cmake instructions shown in the official guidance cmake -DVERIFY_RESULTS=0 .. cannot really successfully make-build the project successfully and report the below messages, indicating that the compiler is not set properly.

~/Documents/oneAPI-samples/DirectProgramming/C++/StructuredGrids/iso3dfd_omp_offload/src/build$ make -j
[ 25%] Building CXX object CMakeFiles/iso3dfd.dir/utils.o
[ 50%] Building CXX object CMakeFiles/iso3dfd.dir/iso3dfd.o
[ 75%] Building CXX object CMakeFiles/iso3dfd.dir/iso3dfd_verify.o
c++: error: unrecognized command-line option ‘-fiopenmp’; did you mean ‘-fopenmp’?
c++: error: unrecognized command-line option ‘-fiopenmp’; did you mean ‘-fopenmp’?
c++: error: unrecognized command-line option ‘-fiopenmp’; did you mean ‘-fopenmp’?
c++: error: unrecognized command-line option ‘-fopenmp-targets=spir64’
make[2]: *** [CMakeFiles/iso3dfd.dir/build.make:90: CMakeFiles/iso3dfd.dir/utils.o] Error 1
make[2]: *** Waiting for unfinished jobs....
c++: error: unrecognized command-line option ‘-fopenmp-targets=spir64’
c++: error: unrecognized command-line option ‘-fopenmp-targets=spir64’
make[2]: *** [CMakeFiles/iso3dfd.dir/build.make:76: CMakeFiles/iso3dfd.dir/iso3dfd.o] Error 1
make[2]: *** [CMakeFiles/iso3dfd.dir/build.make:104: CMakeFiles/iso3dfd.dir/iso3dfd_verify.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:84: CMakeFiles/iso3dfd.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

In the CMakeLists file, the 3rd line should be changed from set(CMAKE_CXX_COMPILER "icpx") to set(CMAKE_CXX_COMPILER icpx). Or we should explicitly declare the compiler options.

Version

c9c1625

@Martin-HZK Martin-HZK added the bug Something isn't working label Oct 24, 2024
@Martin-HZK
Copy link
Author

PR related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant