NOAA-PMEL / PyFerret

The PyFerret program and Python module from NOAA/PMEL
https://ferret.pmel.noaa.gov/Ferret/
The Unlicense
60 stars 22 forks source link

GCC 11.3 -> target specific option mismatch #132

Open jhgoebbert opened 1 year ago

jhgoebbert commented 1 year ago

With GCC 11.3 (in contrast to GCC 11.2) new warnings (treated as errors by PyFerret) are introduced:

"/tmp/eb-vv4makgc/easybuild-PyFerret-7.6.5-20230204.085221.VvgAf.log" 3202L, 5742652C                                                                                                                                                                                                                                                               1,1           Top
  334 | _mm512_setzero_si512 (void)
      | ^~~~~~~~~~~~~~~~~~~~
/lib/python3.10/site-packages/numpy/distutils/checks/cpu_avx512_cnl.c:22:9: note: called from here
   22 |     a = _mm512_permutex2var_epi8(a, _mm512_setzero_si512(), a);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/immintrin.h:67,
                 from /lib/python3.10/site-packages/numpy/distutils/checks/cpu_avx512_cnl.c:14:
/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/avx512ifmaintrin.h:49:1: error: inlining failed in call to always_inline _mm512_madd52hi_epu64: target specific option mismatch
   49 | _mm512_madd52hi_epu64 (__m512i __X, __m512i __Y, __m512i __Z)
      | ^~~~~~~~~~~~~~~~~~~~~
/lib/python3.10/site-packages/numpy/distutils/checks/cpu_avx512_cnl.c:20:9: note: called from here
   20 |     a = _mm512_madd52hi_epu64(a, a, _mm512_setzero_si512());
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/immintrin.h:49,
                 from /lib/python3.10/site-packages/numpy/distutils/checks/cpu_avx512_cnl.c:14:
/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/avx512fintrin.h:334:1: error: inlining failed in call to always_inline _mm512_setzero_si512: target specific option mismatch
  334 | _mm512_setzero_si512 (void)
      | ^~~~~~~~~~~~~~~~~~~~
/lib/python3.10/site-packages/numpy/distutils/checks/cpu_avx512_cnl.c:20:9: note: called from here
   20 |     a = _mm512_madd52hi_epu64(a, a, _mm512_setzero_si512());
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/immintrin.h:49,
                 from /lib/python3.10/site-packages/numpy/distutils/checks/cpu_avx512_cnl.c:14:
/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/avx512fintrin.h:6412:1: error: inlining failed in call to always_inline _mm512_loadu_si512: target specific option mismatch
 6412 | _mm512_loadu_si512 (void const *__P)
      | ^~~~~~~~~~~~~~~~~~
/lib/python3.10/site-packages/numpy/distutils/checks/cpu_avx512_cnl.c:18:17: note: called from here
   18 |     __m512i a = _mm512_loadu_si512((const __m512i*)argv[argc-1]);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
jhgoebbert commented 1 year ago

The numpy 1.22.3 generated code in build/ adds -Werror:

temp.linux-x86_64-cpython-310/ccompiler_opt_cache_ext.py:              "('cc_test_flags', ['-Werror'])": True,
temp.linux-x86_64-cpython-310/ccompiler_opt_cache_ext.py:              'werror': ['-Werror']},

(link to code generator)