-
Notifications
You must be signed in to change notification settings - Fork 74
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
fix cray clang compiler errors #2392
fix cray clang compiler errors #2392
Conversation
``` include/alpaka/acc/TagAccIsEnabled.hpp:34:66: error: template template argument has different template parameters than its corresponding template template parameter 34 | using EnabledAccTags = alpaka::meta::Filter<AccTags, alpaka::AccIsEnabled>; | ^ ```
Adding the Cray Compiler Compiler ID here in the CMake should solve the problem: alpaka/cmake/alpakaCommon.cmake Line 202 in 5c5a690
I removed this line from my CMake, the $ cmake --build -j -t kernelSpecialization
Building CXX object example/kernelSpecialization/CMakeFiles/kernelSpecialization.dir/src/kernelSpecialization.cpp.o
In file included from /home/simeon/projects/alpaka/example/kernelSpecialization/src/kernelSpecialization.cpp:5:
In file included from /home/simeon/projects/alpaka/include/alpaka/alpaka.hpp:26:
/home/simeon/projects/alpaka/include/alpaka/acc/TagAccIsEnabled.hpp:34:66: error: template template argument has different template parameters than its corresponding template template parameter
34 | using EnabledAccTags = alpaka::meta::Filter<AccTags, alpaka::AccIsEnabled>;
| ^
/home/simeon/projects/alpaka/include/alpaka/acc/TagAccIsEnabled.hpp:23:5: note: too many template parameters in template template argument
23 | template<typename TTag, typename = void>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/simeon/projects/alpaka/include/alpaka/meta/Filter.hpp:42:30: note: previous template template parameter is here
42 | template<typename TList, template<typename> class TPred>
| ^~~~~~~~~~~~~~~~~~
In file included from /home/simeon/projects/alpaka/example/kernelSpecialization/src/kernelSpecialization.cpp:6:
/home/simeon/projects/alpaka/include/alpaka/example/ExecuteForEachAccTag.hpp:25:97: error: no member named 'EnabledAccTags' in namespace 'alpaka'
25 | return std::apply([=](auto const&... tags) { return (callable(tags) || ...); }, alpaka::EnabledAccTags{});
| ~~~~~~~~^
/home/simeon/projects/alpaka/example/kernelSpecialization/src/kernelSpecialization.cpp:109:12: error: cannot initialize return object of type 'int' with an rvalue of type 'void'
109 | return alpaka::executeForEachAccTag([=](auto const& tag) { return example(tag); });
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.
gmake[3]: *** [example/kernelSpecialization/CMakeFiles/kernelSpecialization.dir/build.make:76: example/kernelSpecialization/CMakeFiles/kernelSpecialization.dir/src/kernelSpecialization.cpp.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:2248: example/kernelSpecialization/CMakeFiles/kernelSpecialization.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:2255: example/kernelSpecialization/CMakeFiles/kernelSpecialization.dir/rule] Error 2
gmake: *** [Makefile:673: kernelSpecialization] Error 2 If I apply your changes, it compiles. |
CMake is not setting the linker flag `-fopenmp` for the cray clang compiler.
remove clang workaround
3cacd23
to
4dc8da6
Compare
@SimeonEhrig I removed the cmake workaround. |
I have no idea what these changes are about :-p |
Up to Clang 19, the compiler does not support relaxed template template args by default, which is a C++17 feature: https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#150 René's code change simply avoids to use the feature. Therefore the flag does not need to be set anymore. |
Thanks for the explanation. I let you approve the PR :-) |
-fopenmp