You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nightly clang/7+cuda/9.2 build failure with -Werror: /gmres.hpp:273:21: error: using integer absolute value function 'abs' when argument is of floating point type
#1172
Closed
ndellingwood opened this issue
Nov 4, 2021
· 0 comments
The nightly clang/7+cuda/9.2 build began failing with error message:
In file included from /ascldap/users/ndellin/kokkos-kernels/example/gmres/test_real_A.cpp:54:
/ascldap/users/ndellin/kokkos-kernels/example/gmres/gmres.hpp:273:21: error: using integer absolute value function 'abs' when argument is of floating point type [-Werror,-Wabsolute-value]
shortRelRes = abs(GVec_h(j+1))/nrmB; // this abs is in libstdc++
^
/ascldap/users/ndellin/kokkos-kernels/example/gmres/test_real_A.cpp:102:27: note: in instantiation of function template specialization 'gmres<double, Kokkos::LayoutLeft, Kokkos::Cuda, int>' requested here
GmresStats solveStats = gmres<ST, Kokkos::LayoutLeft, EXSP>(A, B, X, solverOpts);
^
/ascldap/users/ndellin/kokkos-kernels/example/gmres/gmres.hpp:273:21: note: use function 'std::abs' instead
shortRelRes = abs(GVec_h(j+1))/nrmB; // this abs is in libstdc++
^~~
std::abs
The only change in kokkos-kernels was merge of #1171 , but it's not clear to me how those changes would impact this build (abs should be called from blas not batched blas, right?)
@e10harvey the compiler suggests explicit namespacing of abs with std, but I saw there are additional abs routines in this code to handle half precision types and wasn't certain of the best way to handle this. Can you offer a suggestion or look into the failure as well?
The nightly clang/7+cuda/9.2 build began failing with error message:
The only change in kokkos-kernels was merge of #1171 , but it's not clear to me how those changes would impact this build (
abs
should be called from blas not batched blas, right?)@e10harvey the compiler suggests explicit namespacing of
abs
withstd
, but I saw there are additionalabs
routines in this code to handle half precision types and wasn't certain of the best way to handle this. Can you offer a suggestion or look into the failure as well?Reproducer (kokkos-dev-2):
The text was updated successfully, but these errors were encountered: