NOAA-PMEL / Ferret

The Ferret program from NOAA/PMEL
https://ferret.pmel.noaa.gov/Ferret/
The Unlicense
55 stars 21 forks source link

Rank mismatch in `cd_1d_line_from_2d` #1999

Closed simonpintarelli closed 8 months ago

simonpintarelli commented 8 months ago

I'm trying to build Ferret 7.6.o using spack. I have tried gfortran 11.4.0 and 12.3.0. In both cases I get the error below when trying to call CD_READ_SUB, which seems to be defined internally, but the signature seems not to match.

/home/simon/spack/lib/spack/env/gcc/gfortran -m64 -fPIC -fno-automatic -fno-second-underscore -fdollar-ok -ffixed-line-length-132 -ffpe-trap=overflow -fimplicit-none -fdefault-real-8 -fdefault-double-8 -Dcrptd_cat_argument -Ddouble_p -Dgfortran -Dreclen_in_bytes -Dunix -Dxgks -DG77 -DG77_SIGNAL -DINTERNAL_READ_FORMAT_BUG -DMANDATORY_FORMAT_WIDTHS -DNEED_IAND -DNO_DOUBLE_ESCAPE_SLASH -DNO_OPEN_CARRIAGECONTROL -DNO_OPEN_SHARED -DNO_OPEN_READONLY -DNO_OPEN_RECORDTYPE -DNO_PASSED_CONCAT -DNO_PREPEND_STRING -DSTAR_1_SUPPORTED -DX_REFRESH -I. -I/home/simon/spack/opt/spack/linux-arch-skylake/gcc-12.3.0/netcdf-fortran-4.6.1-n3rrlifyy3imlz5pxcm7fc322czqnmbz/../include -I/tmp/simon/spack-stage/spack-stage-ferret-7.6.0-tsxj3f5gphq454pywnzv2luu3ojd5q2s/spack-src/fer/common -I/tmp/simon/spack-stage/spack-stage-ferret-7.6.0-tsxj3f5gphq454pywnzv2luu3ojd5q2s/spack-src/fmt/cmn -I/tmp/simon/spack-stage/spack-stage-ferret-7.6.0-tsxj3f5gphq454pywnzv2luu3ojd5q2s/spack-src/ppl/tmap_inc -I/tmp/simon/spack-stage/spack-stage-ferret-7.6.0-tsxj3f5gphq454pywnzv2luu3ojd5q2s/spack-src/ppl/include -I/tmp/simon/spack-stage/spack-stage-ferret-7.6.0-tsxj3f5gphq454pywnzv2luu3ojd5q2s/spack-src/xgks/src/lib -I/tmp/simon/spack-stage/spack-stage-ferret-7.6.0-tsxj3f5gphq454pywnzv2luu3ojd5q2s/spack-src/xgks/port -O -DNDEBUG -c cd_1d_line_from_2d.F -o cd_1d_line_from_2d.o
f951: Warning: Nonexistent include directory '/home/simon/spack/opt/spack/linux-arch-skylake/gcc-12.3.0/netcdf-fortran-4.6.1-n3rrlifyy3imlz5pxcm7fc322czqnmbz/../include' [-Wmissing-include-dirs]
cd_1d_line_from_2d.F:166:10:

  111 |      .                   linemem(axcalt)%ptr, 0, 0, cdfstat)
      |                         2
......
  166 |      .                   uppermost, 0, 0, cdfstat)
      |                         1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
make[3]: *** [../../platform_specific.mk.x86_64-linux:139: cd_1d_line_from_2d.o] Error 1
m

I've attempted to build it using the following dependencies:

 -   ferret@7.6.0%gcc@12.3.0~datasets build_system=generic arch=linux-arch-skylake
[e]      ^curl@8.2.0%gcc@12.3.0+gssapi~ldap~libidn2~librtmp~libssh~libssh2+nghttp2 build_system=autotools libs=shared,static tls=openssl arch=linux-arch-skylake
[+]      ^hdf5@1.14.2%gcc@12.3.0~cxx~fortran+hl~ipo~java~map+mpi+shared~szip~threadsafe+tools api=default build_system=cmake build_type=Release generator=make arch=linux-arch-skylake
[+]      ^libx11@1.8.4%gcc@12.3.0 build_system=autotools arch=linux-arch-skylake
[+]      ^netcdf-c@4.9.2%gcc@12.3.0+blosc~byterange~dap~fsync~hdf4~jna+mpi~nczarr_zip+optimize~parallel-netcdf+pic+shared+szip+zstd build_system=autotools patches=0161eb8 arch=linux-arch-skylake
[+]      ^zlib-ng@2.1.3%gcc@12.3.0+compat+opt build_system=autotools patches=299b958,ae9077a,b692621 arch=linux-arch-skylake

As far as I can see it is not related to an external dependency though.

simonpintarelli commented 8 months ago

It compiles when-fallow-argument-mismatch -fallow-invalid-boz is added to FFLAGS.