spmv warning: dynamic initialization in unreachable code
This warning occurs in various locations with cuda/10.1 builds when compiling kokkos-kernels develop branch with -Wall, not sure how long it has been present:
ascldap/users/ndellin/kokkos-kernels/src/sparse/impl/KokkosSparse_spmv_impl.hpp(411): warning: dynamic initialization in unreachable code
This can be reproduced on the weaver testbed Reproducer:
module load cuda/10.1.105 gcc/7.2.0 cmake/3.19.3
$KOKKOSKERNELS_PATH/cm_generate_makefile.bash --with-cuda --arch=Volta70,Power9 --cxxflags="-Wall"
Marking as Cleanup, though enhancement may be the appropriate label?
@ndellingwood is someone looking at this issue at the moment?
@lucbv No, I wasn't sure who to assign
@lucbv hopefully you don't mind me tentatively assigning you, I'm pretty certain you're most familiar with the spmv code
@ndellingwood I was not able to reproduce this warning using the reproducer instruction on Weaver. I did see a couple of warnings though:
/ascldap/users/lberge/kk_lucbv/src/sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp(129): warning: variable "requestMixed" was set but never used
and
/ascldap/users/lberge/kk_lucbv/perf_test/blas/blas3/KokkosBlas3_gemm_perf_test.hpp(2356): warning: parameter "options" was set but never used
I will clean these up but I'm not sure what to do about the one you reported as I cannot reproduce and I believe the SpMV file might have changed after we merged the changes for the tensor core SpMV algorithm. If there a place I can look at to see the warning like Jenkins, let me know.
@lucbv I'm still seeing the warnings from the original post when building on Weaver, sample configuration:
module load cmake/3.19.3 cuda/9.2.88 ibm/xl/16.1.1 gcc/7.2.0
$KOKKOSKERNELS_PATH/cm_generate_makefile.bash --with-devices=Cuda,Serial --arch=Power9,Volta70 --compiler=$KOKKOS_PATH/bin/nvcc_wrapper --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 --with-cuda-options=enable_lambda,force_uvm --no-examples
Hey sorry to get back to you this late on this but since we are no longer supporting xl/16.1.1 or cuda/9.2.88 should we just close this issue as unresolved but stale?
@lucbv Sounds good, if similar warnings are present with other current builds I'll open a new issue with updated info, thanks!