kokkos-kernels icon indicating copy to clipboard operation
kokkos-kernels copied to clipboard

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

Open ndellingwood opened this issue 3 years ago • 1 comments

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 avatar Jan 20 '22 02:01 ndellingwood

This error is resolved

ndellingwood avatar Feb 11 '22 19:02 ndellingwood