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

Fix pragma error with gcc/4.8.4 #181

Merged
merged 2 commits into from
Mar 15, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/blas/impl/KokkosBlas3_gemm_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Copy link
Member

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 ...

Copy link
Contributor Author

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

#else
#pragma omp simd
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indenting preprocessors directives !

#endif
for(int B_j=0; B_j<blockB1/4; B_j++) {
#endif
ScalarC C_ij0 = 0;
Expand Down