NOAA-EMC / NCEPLIBS-g2

Utilities for coding/decoding GRIB2 messages.
Other
6 stars 15 forks source link

Compile errors of g2@3.5.1 with clang@10/gfortran@9.4.0 #745

Open climbfuji opened 3 weeks ago

climbfuji commented 3 weeks ago

See https://github.com/JCSDA/spack-stack/actions/runs/10490815988/job/29058420870

#19 5505.2 7 errors found in build log:
#19 5505.2      188    [ 19%] Building Fortran object src/CMakeFiles/g2_4_f.dir/g2create.F
#19 5505.2             90.o
#19 5505.2      189    cd /tmp/root/spack-stage/spack-stage-g2-3.5.1-6zyp7vyfqxnrkg4vghzyq
#19 5505.2             htendtkd7z6/spack-build-6zyp7vy/src && /opt/spack/lib/spack/env/cla
#19 5505.2             ng/gfortran -DJPEG -DKIND=4  -g -funroll-loops  -O3 -DNDEBUG -O3 -J
#19 5505.2             include_4 -fPIC -c /tmp/root/spack-stage/spack-stage-g2-3.5.1-6zyp7
#19 5505.2             vyfqxnrkg4vghzyqhtendtkd7z6/spack-src/src/g2create.F90 -o CMakeFile
#19 5505.2             s/g2_4_f.dir/g2create.F90.o
#19 5505.2      190    /tmp/root/spack-stage/spack-stage-g2-3.5.1-6zyp7vyfqxnrkg4vghzyqhte
#19 5505.2             ndtkd7z6/spack-src/src/g2create.F90:263:16:
#19 5505.2      191    
#19 5505.2      192      263 |   allones = int(Z'FFFFFFFF')
#19 5505.2      193          |                1
#19 5505.2   >> 194    Error: Arithmetic overflow converting INTEGER(16) to INTEGER(4) at 
#19 5505.2             (1). This check can be disabled with the option '-fno-range-check'
#19 5505.2   >> 195    make[2]: *** [src/CMakeFiles/g2_4_f.dir/build.make:195: src/CMakeFi
#19 5505.2             les/g2_4_f.dir/g2create.F90.o] Error 1
#19 5505.2      196    make[2]: Leaving directory '/tmp/root/spack-stage/spack-stage-g2-3.
#19 5505.2             5.1-6zyp7vyfqxnrkg4vghzyqhtendtkd7z6/spack-build-6zyp7vy'
#19 5505.2   >> 197    make[1]: *** [CMakeFiles/Makefile2:1049: src/CMakeFiles/g2_4_f.dir/
#19 5505.2             all] Error 2
#19 5505.2      198    make[1]: *** Waiting for unfinished jobs....
#19 5505.2      199    [ 19%] Building Fortran object src/CMakeFiles/g2_d_f.dir/g2create.F
#19 5505.2             90.o
#19 5505.2      200    cd /tmp/root/spack-stage/spack-stage-g2-3.5.1-6zyp7vyfqxnrkg4vghzyq
#19 5505.2             htendtkd7z6/spack-build-6zyp7vy/src && /opt/spack/lib/spack/env/cla
#19 5505.2             ng/gfortran -DJPEG -DKIND=d  -g -funroll-loops  -O3 -DNDEBUG -O3 -J
#19 5505.2             include_d -fPIC -fdefault-real-8 -c /tmp/root/spack-stage/spack-sta
#19 5505.2             ge-g2-3.5.1-6zyp7vyfqxnrkg4vghzyqhtendtkd7z6/spack-src/src/g2create
#19 5505.2             .F90 -o CMakeFiles/g2_d_f.dir/g2create.F90.o
#19 5505.2      201    /tmp/root/spack-stage/spack-stage-g2-3.5.1-6zyp7vyfqxnrkg4vghzyqhte
#19 5505.2             ndtkd7z6/spack-src/src/g2create.F90:263:16:
#19 5505.2      202    
#19 5505.2      203      263 |   allones = int(Z'FFFFFFFF')
#19 5505.2      204          |                1
#19 5505.2   >> 205    Error: Arithmetic overflow converting INTEGER(16) to INTEGER(4) at 
#19 5505.2             (1). This check can be disabled with the option '-fno-range-check'
#19 5505.2   >> 206    make[2]: *** [src/CMakeFiles/g2_d_f.dir/build.make:195: src/CMakeFi
#19 5505.2             les/g2_d_f.dir/g2create.F90.o] Error 1
#19 5505.2      207    make[2]: *** Waiting for unfinished jobs....
#19 5505.2      208    make[2]: Leaving directory '/tmp/root/spack-stage/spack-stage-g2-3.
#19 5505.2             5.1-6zyp7vyfqxnrkg4vghzyqhtendtkd7z6/spack-build-6zyp7vy'
#19 5505.2   >> 209    make[1]: *** [CMakeFiles/Makefile2:1128: src/CMakeFiles/g2_d_f.dir/
#19 5505.2             all] Error 2
#19 5505.2      210    make[1]: Leaving directory '/tmp/root/spack-stage/spack-stage-g2-3.
#19 5505.2             5.1-6zyp7vyfqxnrkg4vghzyqhtendtkd7z6/spack-build-6zyp7vy'
#19 5505.2   >> 211    make: *** [Makefile:149: all] Error 2
climbfuji commented 3 weeks ago

@edhartnett @AlexanderRichert-NOAA FYI

edwardhartnett commented 3 weeks ago

OK, let me take a look at these...

edwardhartnett commented 3 weeks ago

I cannot reproduce these.

What version of gfortran is being used here?

climbfuji commented 3 weeks ago

As the issue says in the title and description, clang@14. Scrap that. This is gfortran 9.4 together with clang@10 (not 14 as I mentioned earlier)