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

KokkosSparse::spmv build error (-Werror) with GCC 7.2.0 #448

Closed
mhoemmen opened this issue Jul 24, 2019 · 2 comments
Closed

KokkosSparse::spmv build error (-Werror) with GCC 7.2.0 #448

mhoemmen opened this issue Jul 24, 2019 · 2 comments

Comments

@mhoemmen
Copy link
Contributor

.../packages/kokkos-kernels/src/sparse/KokkosSparse_spmv.hpp:231:32: warning: comparison between ‘enum Kokkos::ViewTraits<const float**, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace>, Kokkos::MemoryTraits<1u> >::<anonymous>’ and ‘enum Kokkos::ViewTraits<float**, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace>, Kokkos::MemoryTraits<1u> >::<anonymous>’ [-Wenum-compare]
   static_assert (XVector::rank == YVector::rank,
                                ^

Looks easy to fix; just cast both sides to int.

@mhoemmen mhoemmen changed the title KokkosSparse::spmv warning with GCC 4.9.3 KokkosSparse::spmv build error (-Werror) with GCC 7.2.0 Aug 1, 2019
@mhoemmen
Copy link
Contributor Author

mhoemmen commented Aug 1, 2019

This is a build error in Trilinos' PR testing now:

/scratch/trilinos/workspace/trilinos-folder/Trilinos_pullrequest_gcc_7.2.0/Trilinos/packages/kokkos-kernels/src/sparse/KokkosSparse_spmv.hpp:231:32: error: comparison between ‘enum Kokkos::ViewTraits<const Kokkos::complex<double>**, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Serial, Kokkos::HostSpace>, Kokkos::MemoryTraits<1> >::<unnamed>’ and ‘enum Kokkos::ViewTraits<Kokkos::complex<double>**, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Serial, Kokkos::HostSpace>, Kokkos::MemoryTraits<1> >::<unnamed>’ [-Werror=enum-compare]
   static_assert (XVector::rank == YVector::rank,
                  ~~~~~~~~~~~~~~^~~~~~~~~~
cc1plus: all warnings being treated as errors

It didn't show up in Trilinos before because nobody was calling KokkosSparse::spmv before with an input (multi)vector that's a View of const T. I need to patch Trilinos to fix this.

@ndellingwood
Copy link
Contributor

Addressed by PR #450 by @brian-kelley, marking as InDevelop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants