kokkos / kokkos-kernels

Kokkos C++ Performance Portability Programming Ecosystem: Math Kernels - Provides BLAS, Sparse BLAS and Graph Kernels
Other
304 stars 96 forks source link

Nightly clang+cuda -Werror triggered: src/Kokkos_ArithTraits.hpp:398:47: error: inline function 'Kokkos::Details::ArithTraits<long double>::abs' is not defined #1273

Closed ndellingwood closed 2 years ago

ndellingwood commented 2 years ago

A merge to kokkos-kernels on 1/19/2022 triggered a -Werror breaking the clang/7+cuda/9.2 and clang/8+cuda/10 nightly builds, it looks like changes to related Kokkos_InnerProductSpaceTraits.hpp possibly from #1266

Sample output:

In file included from /ascldap/users/ndellin/kokkos-kernels/testing/Clang7Cuda92/src/impl/generated_specializations_cpp/scal/Blas1_scal_eti_DOUBLE_LAYOUTLEFT_EXECSPACE_CUDA_MEMSPACE_CUDASPACE.cpp:48:
In file included from /ascldap/users/ndellin/kokkos-kernels/src/blas/impl/KokkosBlas1_scal_spec.hpp:49:
/ascldap/users/ndellin/kokkos-kernels/src/Kokkos_ArithTraits.hpp:398:47: error: inline function 'Kokkos::Details::ArithTraits<long double>::abs' is not defined [-Werror,-Wundefined-inline]
  static KOKKOS_FORCEINLINE_FUNCTION mag_type abs(const T& x);
                                              ^
/ascldap/users/ndellin/kokkos-kernels/src/Kokkos_InnerProductSpaceTraits.hpp:181:35: note: used here
    return ArithTraits<val_type>::abs(x);
                                  ^
1 error generated when compiling for sm_35.
make[2]: *** [src/CMakeFiles/kokkoskernels.dir/impl/generated_specializations_cpp/scal/Blas1_scal_eti_DOUBLE_LAYOUTLEFT_EXECSPACE_CUDA_MEMSPACE_CUDASPACE.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

Reproducer (kokkos-dev testbed):

module load sems-archive-env sems-archive-cmake/3.17.1 sems-archive-gcc/7.2.0 sems-archive-cuda/9.2 sems-archive-clang/7.0.1

$KOKKOSKERNELS_PATH/cm_generate_makefile.bash --with-devices=Cuda,OpenMP --arch=Kepler35 --compiler=clang++ --cxxflags="-O3 -Wall -Wunused-parameter -Wshadow -pedantic -Werror -Wsign-compare -Wtype-limits -Wuninitialized " --cxxstandard="14" --kokkos-path=$KOKKOS_PATH --kokkoskernels-path=$KOKKOSKERNELS_PATH --with-scalars='double,complex_double' --with-ordinals=int --with-offsets=int,size_t --with-layouts=LayoutLeft
ndellingwood commented 2 years ago

This error is resolved