From b34a41c5f0909c41706316962aef1cee347c54ea Mon Sep 17 00:00:00 2001 From: Nathan Ellingwood Date: Tue, 13 Mar 2018 15:43:25 -0600 Subject: [PATCH 1/2] Fix pragma error with gcc/4.8.4 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 --- src/blas/impl/KokkosBlas3_gemm_impl.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/blas/impl/KokkosBlas3_gemm_impl.hpp b/src/blas/impl/KokkosBlas3_gemm_impl.hpp index a702fe0c0b..fe64031307 100644 --- a/src/blas/impl/KokkosBlas3_gemm_impl.hpp +++ b/src/blas/impl/KokkosBlas3_gemm_impl.hpp @@ -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 ) + #else #pragma omp simd + #endif for(int B_j=0; B_j Date: Tue, 13 Mar 2018 16:17:36 -0600 Subject: [PATCH 2/2] Fix pragma for compilers besides gcc --- src/blas/impl/KokkosBlas3_gemm_impl.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/blas/impl/KokkosBlas3_gemm_impl.hpp b/src/blas/impl/KokkosBlas3_gemm_impl.hpp index fe64031307..501f276356 100644 --- a/src/blas/impl/KokkosBlas3_gemm_impl.hpp +++ b/src/blas/impl/KokkosBlas3_gemm_impl.hpp @@ -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 ) + #if defined(KOKKOS_COMPILER_GNU) + #if (KOKKOS_COMPILER_GNU > 485 ) + #pragma omp simd + #endif #else #pragma omp simd #endif