-
Notifications
You must be signed in to change notification settings - Fork 99
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 pragma error with gcc/4.8.4 #181
Conversation
Error with gcc/4.8.4 and OpenMP backend kokkos-kernels/src/blas/impl/KokkosBlas3_gemm_impl.hpp:343:0: error: ignoring #pragma omp simd [-Werror=unknown-pragmas] Fixed by adding preprocessor #if to remove the pragma if gnu compiler less than 4.8.5
Fix for #180 |
Test results:
|
gcc/4.8.4 implements OpenMP version 3.1 which does not support Relevant to discussion in trilinos/Trilinos#2317. |
@@ -340,7 +340,10 @@ void impl_team_gemm_block(const TeamHandle& team, const ViewTypeC& C, const View | |||
#if defined(__CUDA_ARCH__) || !defined(KOKKOS_ENABLE_OPENMP) | |||
Kokkos::parallel_for(Kokkos::ThreadVectorRange(team,blockB1/4), [&] (const int B_j) { | |||
#else | |||
#if (KOKKOS_COMPILER_GNU < 485 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably is not correct for intel. You probably need to nest this, or alternatively add a OMP_SIMD_EXISTS or whatever variable inside of Kokkos_Macros.hpp (there are similar variables for other pragma features, model it based on those). But that would require a change in Kokkos ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@crtrott thanks for catch, just pushed fix. Rerunning with gcc and intel
Updated test results:
|
#pragma omp simd | ||
#endif | ||
#else | ||
#pragma omp simd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indenting preprocessors directives !
Error with gcc/4.8.4 and OpenMP backend
kokkos-kernels/src/blas/impl/KokkosBlas3_gemm_impl.hpp:343:0: error:
ignoring #pragma omp simd [-Werror=unknown-pragmas]
Fixed by adding preprocessor #if to remove the pragma if gnu compiler
less than 4.8.5