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

Build failure with clang 3.9.0 #281

Closed
lucbv opened this issue Aug 22, 2018 · 2 comments
Closed

Build failure with clang 3.9.0 #281

lucbv opened this issue Aug 22, 2018 · 2 comments
Assignees

Comments

@lucbv
Copy link
Contributor

lucbv commented Aug 22, 2018

I have encounter the following error while compiling with clang-3.9.0:

/home/lberge/Research/kk_lucbv_builds/clang_3_9_0/kokkos/install/include/Kokkos_View.hpp:1953:7: error: static_assert failed
      "Incompatible View copy construction"
      static_assert( Mapping::is_assignable , "Incompatible View copy construction" );
      ^              ~~~~~~~~~~~~~~~~~~~~~~
/home/lberge/Research/kk_lucbv_builds/clang_3_9_0/install/include/KokkosSparse_spgemm_impl_symbolic.hpp:2317:4: note: in instantiation of function template
      specialization 'Kokkos::View<unsigned int *, Kokkos::HostSpace>::View<const unsigned int *, Kokkos::LayoutRight, Kokkos::Device<Kokkos::OpenMP,
      Kokkos::HostSpace>, Kokkos::MemoryTraits<0> >' requested here
                        row_mapA_,
                        ^
/home/lberge/Research/kk_lucbv_builds/clang_3_9_0/install/include/KokkosSparse_spgemm_impl_compression.hpp:957:41: note: in instantiation of function template
      specialization 'KokkosSparse::Impl::KokkosSPGEMM<KokkosKernels::Experimental::KokkosKernelsHandle<unsigned int, int, int, Kokkos::OpenMP,
      Kokkos::HostSpace, Kokkos::HostSpace>, Kokkos::View<unsigned int *, Kokkos::HostSpace>, Kokkos::View<int *, Kokkos::HostSpace>, Kokkos::View<int *,
      Kokkos::HostSpace>, Kokkos::View<unsigned int *, Kokkos::HostSpace>, Kokkos::View<int *, Kokkos::HostSpace>, Kokkos::View<int *, Kokkos::HostSpace>
      >::getMaxRoughRowNNZ<Kokkos::View<const unsigned int *, Kokkos::LayoutRight, Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace>, Kokkos::MemoryTraits<0>
      >, Kokkos::View<const int *, Kokkos::LayoutRight, Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace>, Kokkos::MemoryTraits<0> >, Kokkos::View<unsigned
      int *, Kokkos::LayoutRight, Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace>, Kokkos::MemoryTraits<0> >, Kokkos::View<unsigned int *,
      Kokkos::LayoutRight, Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace>, Kokkos::MemoryTraits<0> > >' requested here
                compressed_maxNumRoughZeros = this->getMaxRoughRowNNZ(a_row_cnt, row_mapA, entriesA, new_row_mapB_begin, new_row_mapB_end, compressed_...
                                                    ^
/home/lberge/Research/kk_lucbv_builds/clang_3_9_0/install/include/KokkosSparse_spgemm_impl_triangle.hpp:1735:11: note: in instantiation of function template
      specialization 'KokkosSparse::Impl::KokkosSPGEMM<KokkosKernels::Experimental::KokkosKernelsHandle<unsigned int, int, int, Kokkos::OpenMP,
      Kokkos::HostSpace, Kokkos::HostSpace>, Kokkos::View<unsigned int *, Kokkos::HostSpace>, Kokkos::View<int *, Kokkos::HostSpace>, Kokkos::View<int *,
      Kokkos::HostSpace>, Kokkos::View<unsigned int *, Kokkos::HostSpace>, Kokkos::View<int *, Kokkos::HostSpace>, Kokkos::View<int *, Kokkos::HostSpace>
      >::compressMatrix<Kokkos::View<const unsigned int *, Kokkos::LayoutRight, Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace>, Kokkos::MemoryTraits<0> >,
      Kokkos::View<const int *, Kokkos::LayoutRight, Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace>, Kokkos::MemoryTraits<0> >, Kokkos::View<unsigned int
      *, Kokkos::HostSpace>, Kokkos::View<int *, Kokkos::HostSpace> >' requested here
    this->compressMatrix(n, nnz,
          ^
/home/lberge/Research/kk_lucbv_builds/clang_3_9_0/install/include/KokkosSparse_spgemm_impl_triangle.hpp:1939:9: note: in instantiation of member function
      'KokkosSparse::Impl::KokkosSPGEMM<KokkosKernels::Experimental::KokkosKernelsHandle<unsigned int, int, int, Kokkos::OpenMP, Kokkos::HostSpace,
      Kokkos::HostSpace>, Kokkos::View<unsigned int *, Kokkos::HostSpace>, Kokkos::View<int *, Kokkos::HostSpace>, Kokkos::View<int *, Kokkos::HostSpace>,
      Kokkos::View<unsigned int *, Kokkos::HostSpace>, Kokkos::View<int *, Kokkos::HostSpace>, Kokkos::View<int *, Kokkos::HostSpace>
      >::KokkosSPGEMM_symbolic_triangle_setup' requested here
  this->KokkosSPGEMM_symbolic_triangle_setup();
        ^
/home/lberge/Research/kk_lucbv_builds/clang_3_9_0/install/include/KokkosGraph_Triangle.hpp:437:13: note: in instantiation of function template specialization
      'KokkosSparse::Impl::KokkosSPGEMM<KokkosKernels::Experimental::KokkosKernelsHandle<unsigned int, int, int, Kokkos::OpenMP, Kokkos::HostSpace,
      Kokkos::HostSpace>, Kokkos::View<unsigned int *, Kokkos::HostSpace>, Kokkos::View<int *, Kokkos::HostSpace>, Kokkos::View<int *, Kokkos::HostSpace>,
      Kokkos::View<unsigned int *, Kokkos::HostSpace>, Kokkos::View<int *, Kokkos::HostSpace>, Kokkos::View<int *, Kokkos::HostSpace>
      >::KokkosSPGEMM_generic_triangle<(lambda at /ascldap/users/lberge/Research/kk_lucbv/perf_test/graph/KokkosGraph_run_triangle.hpp:319:13)>' requested
      here
    kspgemm.KokkosSPGEMM_generic_triangle(visit_struct);
            ^
/ascldap/users/lberge/Research/kk_lucbv/perf_test/graph/KokkosGraph_run_triangle.hpp:314:9: note: in instantiation of function template specialization
      'KokkosGraph::Experimental::triangle_generic<KokkosKernels::Experimental::KokkosKernelsHandle<unsigned int, int, int, Kokkos::OpenMP, Kokkos::HostSpace,
      Kokkos::HostSpace>, Kokkos::View<const unsigned int *, Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace> >, Kokkos::View<int *,
      Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace> >, (lambda at
      /ascldap/users/lberge/Research/kk_lucbv/perf_test/graph/KokkosGraph_run_triangle.hpp:319:13)>' requested here
        triangle_generic (
        ^
/ascldap/users/lberge/Research/kk_lucbv/perf_test/graph/KokkosGraph_multimem_triangle.hpp:104:44: note: in instantiation of function template specialization
      'KokkosKernels::Experiment::run_experiment<Kokkos::OpenMP, MyKokkosSparse::StaticCrsGraph<int, Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace>, void,
      unsigned int>, MyKokkosSparse::StaticCrsGraph<int, Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace>, void, unsigned int>,
      MyKokkosSparse::StaticCrsGraph<int, Kokkos::Device<Kokkos::OpenMP, Kokkos::HostSpace>, void, unsigned int>, Kokkos::HostSpace, Kokkos::HostSpace>'
      requested here
                KokkosKernels::Experiment::run_experiment
                                           ^
/ascldap/users/lberge/Research/kk_lucbv/perf_test/graph/KokkosGraph_triangle.cpp:305:32: note: in instantiation of function template specialization
      'KokkosKernels::Experiment::run_multi_mem_triangle<unsigned int, int, Kokkos::OpenMP, Kokkos::HostSpace, Kokkos::HostSpace>' requested here
    KokkosKernels::Experiment::run_multi_mem_triangle

It seems to me that this is a simple mismatch between a view created by copy and the view being copied. It should not be to hard to fix.

FYI here is my build environment:

module purge
module load sems-env
module load sems-clang/3.9.0

KOKKOS_PATH=${HOME}/Research/kokkos #path to kokkos source
KOKKOSKERNELS_SCALARS=double #the scalar types to instantiate =double,float...
KOKKOSKERNELS_LAYOUTS=LayoutLeft #the layout types to instantiate.
KOKKOSKERNELS_ORDINALS=int #ordinal types to instantiate
KOKKOSKERNELS_OFFSETS=int #offset types to instantiate
KOKKOSKERNELS_PATH=${HOME}/Research/kk_lucbv #path to kokkos-kernels top directory.
CXX=${SEMS_COMPILER_ROOT}/bin/clang++ #${KOKKOS_PATH}/config/nvcc_wrapper #icpc #
KOKKOSKERNELS_OPTIONS=eti-only #options for kokkoskernels  
KOKKOS_DEVICES=OpenMP # other devices Cuda,Serial ..
KOKKOS_ARCHS=HSW
CXXFLAGS="-Wall -pedantic -Werror -O3 -g -Wshadow -Wsign-compare -Wtype-limits -Wuninitialized"

${KOKKOSKERNELS_PATH}/scripts/generate_makefile.bash --kokkoskernels-path=${KOKKOSKERNELS_PATH} --with-scalars=${KOKKOSKERNELS_SCALARS} --with-ordinals=${KOKKOSKERNELS_ORDINALS} --with-offsets=${KOKKOSKERNELS_OFFSETS} --kokkos-path=${KOKKOS_PATH} --with-devices=${KOKKOS_DEVICES} --arch=${KOKKOS_ARCHS} --compiler=${CXX} --with-options=${KOKKOSKERNELS_OPTIONS}  --cxxflags="${CXXFLAGS}"
@lucbv lucbv self-assigned this Aug 22, 2018
@crtrott
Copy link
Member

crtrott commented Sep 25, 2018

Can you check with other clang versions. That said we need to fix it anyway.

@crtrott crtrott added bug and removed CompilerIssue labels Sep 25, 2018
lucbv added a commit to lucbv/kokkos-kernels that referenced this issue Sep 25, 2018
…ss is shadowed

Renaming template parameters of KokkosSPGEMM::PredicMaxRowNNZ to avoid shadowing that leads to a bad copy constructor call.
I am not too sure why gcc is allowing this to go through but clang is clearly less appreciative.
ndellingwood added a commit that referenced this issue Sep 26, 2018
Fix issue #281: template parameters of functor contained in class is shadowed
@ndellingwood
Copy link
Contributor

PR #301 merged, thanks @lucbv !

@crtrott crtrott closed this as completed Nov 5, 2018
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

3 participants