neuronsimulator / nrn

NEURON Simulator
http://nrn.readthedocs.io
Other
411 stars 118 forks source link

Silence Eigen related warnings with NVHPC? #2594

Open pramodk opened 1 year ago

pramodk commented 1 year ago

While building NEURON with NVHPC compiler, I see lots of warnings like:

2465 -noswitcherror --c++17 -o CMakeFiles/nrniv_lib.dir/__/ivos/regexp.cpp.o -c /root/nrn/src/ivos/regexp.cpp
[ 85%] Building CXX object src/nrniv/CMakeFiles/nrniv_lib.dir/__/ivos/resource.cpp.o
cd /root/nrn/build_gpu_nvhpc_237/src/nrniv && /opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/nvc++ -DHAVE_CONFIG_H -DMPICH_SKIP_MPICXX=1 -DMPI_NO_CPPBIND=1 -DNRN_ENABLE_THREADS -DOMPI_SKIP_MPICXX=1 -DR123_USE_INTRIN_H=0 -DUSE_PYTHON -Dnrniv_lib_EXPORTS -I/root/nrn/src/ivoc -I/root/nrn/src/nrncvode -I/root/nrn/src/nrniv -I/root/nrn/src/nrnoc -I/root/nrn/src/oc -I/root/nrn/build_gpu_nvhpc_237 -I/root/nrn/build_gpu_nvhpc_237/src/nrncvode -I/root/nrn/build_gpu_nvhpc_237/src/nrnoc -I/root/nrn/build_gpu_nvhpc_237/src/nrnpython -I/root/nrn/build_gpu_nvhpc_237/src/oc -I/root/nrn/build_gpu_nvhpc_237/src/parallel -I/root/nrn/build_gpu_nvhpc_237/src/sundials -I/root/nrn/build_gpu_nvhpc_237/src/sundials/shared -I/root/nrn/external/Random123/include -I/root/nrn/src -I/root/nrn/src/gnu -I/root/nrn/src/mesch -I/root/nrn/src/nrnmpi -I/root/nrn/src/nrnpython -I/root/nrn/src/parallel -I/root/nrn/src/scopmath -I/root/nrn/src/sparse -I/root/nrn/src/sparse13 -I/root/nrn/src/sundials -I/root/nrn/src/sundials/cvodes -I/root/nrn/src/sundials/ida -I/root/nrn/src/sundials/shared -I/root/nrn/build_gpu_nvhpc_237/src/nrniv/oc_generated -I/usr/include/python3.9 -I/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/openmpi/openmpi-3.1.5/include -I/root/nrn/src/ivos -I/root/nrn/build_gpu_nvhpc_237/src/ivos -I/root/nrn/external/eigen -g  -O2  -fPIC --diag_suppress=1,47,111,128,170,174,177,180,186,301,541,550,816,2465 -noswitcherror --c++17 -o CMakeFiles/nrniv_lib.dir/__/ivos/resource.cpp.o -c /root/nrn/src/ivos/resource.cpp
"/root/nrn/external/eigen/Eigen/src/Core/arch/AVX/PacketMath.h", line 2280: warning: integer conversion resulted in a change of sign [integer_sign_change]
    Packet8bf sign_mask = _mm_set1_epi16(static_cast<numext::uint16_t>(0x8000));
                                         ^

"/root/nrn/external/eigen/Eigen/src/Core/arch/AVX/PacketMath.h", line 1834: warning: integer conversion resulted in a change of sign [integer_sign_change]
    const __m128i sign_mask = _mm_set1_epi16(static_cast<numext::uint16_t>(0x8000));
                                             ^

Remark: individual warnings can be suppressed with "--diag_suppress <warning-name>"

"/root/nrn/external/eigen/Eigen/src/Core/arch/AVX/PacketMath.h", line 1929: warning: integer conversion resulted in a change of sign [integer_sign_change]
    Packet8h sign_mask = _mm_set1_epi16(static_cast<numext::uint16_t>(0x8000));
                                        ^
"/root/nrn/external/eigen/Eigen/src/Core/arch/AVX/PacketMath.h", line 2206: warning: integer conversion resulted in a change of sign [integer_sign_change]
    const __m128i sign_mask = _mm_set1_epi16(static_cast<numext::uint16_t>(0x8000));
                                             ^
"/root/nrn/external/eigen/Eigen/src/Core/arch/AVX/PacketMath.h", line 2280: warning: integer conversion resulted in a change of sign [integer_sign_change]
    Packet8bf sign_mask = _mm_set1_epi16(static_cast<numext::uint16_t>(0x8000));
                                         ^
"/root/nrn/external/eigen/Eigen/src/Core/arch/AVX/PacketMath.h", line 1834: warning: integer conversion resulted in a change of sign [integer_sign_change]
    const __m128i sign_mask = _mm_set1_epi16(static_cast<numext::uint16_t>(0x8000));
                                             ^
Remark: individual warnings can be suppressed with "--diag_suppress <warning-name>"

"/root/nrn/external/eigen/Eigen/src/Core/arch/AVX/PacketMath.h", line 1929: warning: integer conversion resulted in a change of sign [integer_sign_change]
    Packet8h sign_mask = _mm_set1_epi16(static_cast<numext::uint16_t>(0x8000));
                                        ^
"/root/nrn/external/eigen/Eigen/src/Core/arch/AVX/PacketMath.h", line 2206: warning: integer conversion resulted in a change of sign [integer_sign_change]
    const __m128i sign_mask = _mm_set1_epi16(static_cast<numext::uint16_t>(0x8000));
                                             ^
"/root/nrn/external/eigen/Eigen/src/Core/arch/AVX/PacketMath.h", line 2280: warning: integer conversion resulted in a change of sign [integer_sign_change]
    Packet8bf sign_mask = _mm_set1_epi16(static_cast<numext::uint16_t>(0x8000));
                                         ^

@alkino : As we do with other NVHPC warnings here, we may need to silent this one as well?

pramodk commented 1 month ago

There are also FMT related ones now:

"/home/kumbhar/workarena/repos/bbp/nrn/external/fmt/include/fmt/format.h", line 594: warning: routine is both "inline" and "noinline" [inline_gnu_noinline_conflict]
  FMT_CONSTEXPR FMT_NOINLINE auto copy_noinline(InputIt begin, InputIt end,
                ^

Remark: individual warnings can be suppressed with "--diag_suppress <warning-name>"

"/home/kumbhar/workarena/repos/bbp/nrn/external/fmt/include/fmt/format.h", line 1702: warning: routine is both "inline" and "noinline" [inline_gnu_noinline_conflict]
  FMT_NOINLINE FMT_CONSTEXPR auto fill(OutputIt it, size_t n, const fill_t& fill)
  ^

"/home/kumbhar/workarena/repos/bbp/nrn/external/fmt/include/fmt/format.h", line 2207: warning: routine is both "inline" and "noinline" [inline_gnu_noinline_conflict]
  FMT_CONSTEXPR FMT_NOINLINE auto write_int_noinline(OutputIt out,
                ^

"/home/kumbhar/workarena/repos/bbp/nrn/external/fmt/include/fmt/format.h", line 594: warning: routine is both "inline" and "noinline" [inline_gnu_noinline_conflict]
  FMT_CONSTEXPR FMT_NOINLINE auto copy_noinline(InputIt begin, InputIt end,
                ^

Remark: individual warnings can be suppressed with "--diag_suppress <warning-name>"

"/home/kumbhar/workarena/repos/bbp/nrn/external/fmt/include/fmt/format.h", line 1702: warning: routine is both "inline" and "noinline" [inline_gnu_noinline_conflict]
  FMT_NOINLINE FMT_CONSTEXPR auto fill(OutputIt it, size_t n, const fill_t& fill)
  ^

"/home/kumbhar/workarena/repos/bbp/nrn/external/fmt/include/fmt/format.h", line 2207: warning: routine is both "inline" and "noinline" [inline_gnu_noinline_conflict]
  FMT_CONSTEXPR FMT_NOINLINE auto write_int_noinline(OutputIt out,
                ^

"/home/kumbhar/workarena/repos/bbp/nrn/external/fmt/include/fmt/format.h", line 594: warning: routine is both "inline" and "noinline" [inline_gnu_noinline_conflict]
  FMT_CONSTEXPR FMT_NOINLINE auto copy_noinline(InputIt begin, InputIt end,
                ^

Remark: individual warnings can be suppressed with "--diag_suppress <warning-name>"

"/home/kumbhar/workarena/repos/bbp/nrn/external/fmt/include/fmt/format.h", line 1702: warning: routine is both "inline" and "noinline" [inline_gnu_noinline_conflict]
  FMT_NOINLINE FMT_CONSTEXPR auto fill(OutputIt it, size_t n, const fill_t& fill)
  ^

"/home/kumbhar/workarena/repos/bbp/nrn/external/fmt/include/fmt/format.h", line 2207: warning: routine is both "inline" and "noinline" [inline_gnu_noinline_conflict]
  FMT_CONSTEXPR FMT_NOINLINE auto write_int_noinline(OutputIt out,
                ^

"/home/kumbhar/workarena/repos/bbp/nrn/external/fmt/include/fmt/format.h", line 594: warning: routine is both "inline" and "noinline" [inline_gnu_noinline_conflict]
  FMT_CONSTEXPR FMT_NOINLINE auto copy_noinline(InputIt begin, InputIt end,
                ^

Remark: individual warnings can be suppressed with "--diag_suppress <warning-name>"

@alkino : you can install NVHPC from the system package manager.

alkino commented 1 month ago

Eigen is silenced by #3132