NOAA-EMC / NCEPLIBS-grib_util

This is a collection of NCEP GRIB related utilities.
Other
19 stars 11 forks source link

Intel build problem #254

Closed edwardhartnett closed 12 months ago

edwardhartnett commented 1 year ago

Describe the bug On Derecho, intel@2021.10.0 (part of oneAPI@2023.2.?):

107 /lustre/desc1/scratch/epicufsrt/contrib/spack-stack/spack-stack-dev-20230825/cache/build_stage/spack-stage-grib-util-1.2.3-743ggru4uhdwb4nfrge7omb5hcp6rpdy/spack-src/sorc/copygb2.fd/copygb2.f(1246) : error #6795: The target must be of the same type and kind type parameters as the pointer. [FLD] 108 GFLD1%FLD => F1I 109 --------------^ 110 /lustre/desc1/scratch/epicufsrt/contrib/spack-stack/spack-stack-dev-20230825/cache/build_stage/spack-stage-grib-util-1.2.3-743ggru4uhdwb4nfrge7omb5hcp6rpdy/spack-src/sorc/copygb2.fd/copygb2.f(1253) : error #6795: The target must be of the same type and kind type parameters as the pointer. [FLD] 111 GFLD1%FLD => G1I 112 ----------------^ 113 /lustre/desc1/scratch/epicufsrt/contrib/spack-stack/spack-stack-dev-20230825/cache/build_stage/spack-stage-grib-util-1.2.3-743ggru4uhdwb4nfrge7omb5hcp6rpdy/spack-src/sorc/copygb2.fd/copygb2.f(1283) : error #6106: Not a valid argument for ASSOCIATE or SELECT TYPE. [ASSOCIATED] 114 IF (ASSOCIATED(GFLD1%FLD,G1I)) then 115 ---------------------^ 116 [ 20%] Linking Fortran executable grbindex 117 cd /lustre/desc1/scratch/epicufsrt/contrib/spack-stack/spack-stack-dev-20230825/cache/build_stage/spack-stage-grib-util-1.2.3-743ggru4uhdwb4nfrge7omb5hcp6rpdy/spack-build-743ggru/sorc/grbindex.fd & & /glade/u/apps/derecho/23.06/spack/opt/spack/cmake/3.26.3/gcc/7.5.0/l2rq/bin/cmake -E cmake_link_script CMakeFiles/grbindex.dir/link.txt --verbose=1 118 /lustre/desc1/scratch/epicufsrt/contrib/spack-stack/spack-stack-dev-20230825/spack/lib/spack/env/intel/ifort -g -assume noold_ldout_format -convert big_endian -axCORE-AVX2 -fpp -O3 CMakeFiles/grbin dex.dir/grbindex.f.o -o grbindex -Wl,-rpath,:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /lustre/desc1/scratch/epicufsrt/contrib/spack-stack/spack-stack-dev-20230825/envs/unified-env/insta ll/intel/2021.10.0/w3nco-2.4.1-rszvmfx/lib/libw3nco_4.a /lustre/desc1/scratch/epicufsrt/contrib/spack-stack/spack-stack-dev-20230825/envs/unified-env/install/intel/2021.10.0/bacio-2.4.1-z7jlbid/lib /libbacio_4.a -lirng -ldecimal -lcilkrts -lstdc++ 119 [ 22%] Linking Fortran executable grb2index

 ...

 129    cd /lustre/desc1/scratch/epicufsrt/contrib/spack-stack/spack-stack-dev-20230825/cache/build_stage/spack-stage-grib-util-1.2.3-743ggru4uhdwb4nfrge7omb5hcp6rpdy/spack-build-743ggru/sorc/grib2grib.fd
        && /glade/u/apps/derecho/23.06/spack/opt/spack/cmake/3.26.3/gcc/7.5.0/l2rq/bin/cmake -E cmake_link_script CMakeFiles/grib2grib.dir/link.txt --verbose=1
 130    /lustre/desc1/scratch/epicufsrt/contrib/spack-stack/spack-stack-dev-20230825/spack/lib/spack/env/intel/ifort -g -i8 -r8 -assume noold_ldout_format -axCORE-AVX2 -fpp -O3 CMakeFiles/grib2grib.dir/gri
        b2grib.f.o CMakeFiles/grib2grib.dir/hexchar.f.o -o grib2grib  -Wl,-rpath,::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /lustre/desc1/scratch/epicufsrt/contrib/spack-stack/spack-stack-dev-202
        30825/envs/unified-env/install/intel/2021.10.0/w3nco-2.4.1-rszvmfx/lib/libw3nco_8.a /lustre/desc1/scratch/epicufsrt/contrib/spack-stack/spack-stack-dev-20230825/envs/unified-env/install/intel/2021.
        10.0/bacio-2.4.1-z7jlbid/lib/libbacio_8.a -lirng -ldecimal -lcilkrts -lstdc++
 131    [ 32%] Linking Fortran executable tocgrib
 132    cd /lustre/desc1/scratch/epicufsrt/contrib/spack-stack/spack-stack-dev-20230825/cache/build_stage/spack-stage-grib-util-1.2.3-743ggru4uhdwb4nfrge7omb5hcp6rpdy/spack-build-743ggru/sorc/tocgrib.fd &&
         /glade/u/apps/derecho/23.06/spack/opt/spack/cmake/3.26.3/gcc/7.5.0/l2rq/bin/cmake -E cmake_link_script CMakeFiles/tocgrib.dir/link.txt --verbose=1
 133    /lustre/desc1/scratch/epicufsrt/contrib/spack-stack/spack-stack-dev-20230825/spack/lib/spack/env/intel/ifort -g -assume noold_ldout_format -axCORE-AVX2 -O2 CMakeFiles/tocgrib.dir/makwmo.f.o CMakeFi
        les/tocgrib.dir/mkfldsep.f.o CMakeFiles/tocgrib.dir/tocgrib.f.o -o tocgrib  -Wl,-rpath,::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /lustre/desc1/scratch/epicufsrt/contrib/spack-stack/spack
        -stack-dev-20230825/envs/unified-env/install/intel/2021.10.0/w3nco-2.4.1-rszvmfx/lib/libw3nco_4.a /lustre/desc1/scratch/epicufsrt/contrib/spack-stack/spack-stack-dev-20230825/envs/unified-env/insta
        ll/intel/2021.10.0/bacio-2.4.1-z7jlbid/lib/libbacio_4.a -lirng -ldecimal -lcilkrts -lstdc++
 134    compilation aborted for /lustre/desc1/scratch/epicufsrt/contrib/spack-stack/spack-stack-dev-20230825/cache/build_stage/spack-stage-grib-util-1.2.3-743ggru4uhdwb4nfrge7omb5hcp6rpdy/spack-src/sorc/co
        pygb2.fd/copygb2.f (code 1)
edwardhartnett commented 1 year ago

OK, here's one thing I notice.

In gribmid.F90.in we have:

     !> Array of ndpts unpacked data points. This element is actually
     !> a pointer to an array that holds the data.
     real, pointer, dimension(:) :: fld => null()

In copygb2.F90 we have:

REAL,POINTER :: F1I(:) and later:

GFLD1%FLD => F1I

Seems like F1I needs to be declared as:

real, pointer, dimension(:)

edwardhartnett commented 1 year ago

Oddly, even when I turn on -Wall, I still don't get a warning for this.

Unfortunately, this code is not particularly well-tested (yet).

climbfuji commented 12 months ago

See https://github.com/JCSDA/spack-stack/issues/750#issuecomment-1701592575 - a mismatch of icx/icpx and icc/icpc. @edwardhartnett Please close the issue, thanks!