isce2 icon indicating copy to clipboard operation
isce2 copied to clipboard

Compile failure on denseoffsetsRead.F with gcc11, gcc12

Open EJFielding opened this issue 3 years ago • 5 comments

I get this error when compiling the ISCE2 code with gcc11 or gcc12. It sees the same call to getLineBand with different parameters and does not allow it. This used to work for older compilers but does not now.

/Users/fielding/tools/ISCE2_latest/build/components/isceobj/Util/DenseOffsets/src/denseoffsetsRead.F:42:41:

   42 |                     call getLineBand(acc,carr,band,irow)
      |                                         1
......
   52 |                     call getLineBand(acc,arr,band,irow)
      |                                         2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(4)/REAL(4)).

EJFielding avatar Aug 10 '22 01:08 EJFielding

Does https://github.com/isce-framework/isce2/pull/441 fix this for you?

rtburns-jpl avatar Aug 10 '22 19:08 rtburns-jpl

No, I applied that change to the code and tried to compile again with gcc12, and I got a different set of errors:

/Users/fielding/tools/ISCE2_latest/build/components/isceobj/Util/DenseOffsets/src/denseoffsetsRead.F:36:42:

   36 |                 subroutine getLineBand(acc, arr, band, row) bind(C)
      |                                          1
Warning: Variable 'acc' at (1) is a dummy argument of the BIND(C) procedure 'getlineband' but may not be C interoperable [-Wc-binding-type]
/Users/fielding/tools/ISCE2_latest/build/components/isceobj/Util/DenseOffsets/src/denseoffsetsRead.F:36:53:

   36 |                 subroutine getLineBand(acc, arr, band, row) bind(C)
      |                                                     1
Warning: Variable 'band' at (1) is a dummy argument of the BIND(C) procedure 'getlineband' but may not be C interoperable [-Wc-binding-type]
/Users/fielding/tools/ISCE2_latest/build/components/isceobj/Util/DenseOffsets/src/denseoffsetsRead.F:36:58:

   36 |                 subroutine getLineBand(acc, arr, band, row) bind(C)
      |                                                          1
Warning: Variable 'row' at (1) is a dummy argument of the BIND(C) procedure 'getlineband' but may not be C interoperable [-Wc-binding-type]
/Users/fielding/tools/ISCE2_latest/build/components/isceobj/Util/DenseOffsets/src/denseoffsetsRead.F:61:41:

   61 |                     call getLineBand(acc,arr,band,irow)
      |                                         1
Error: Rank mismatch in argument 'arr' at (1) (scalar and rank-1)
/Users/fielding/tools/ISCE2_latest/build/components/isceobj/Util/DenseOffsets/src/denseoffsetsRead.F:51:41:

   51 |                     call getLineBand(acc,carr,band,irow)
      |                                         1
Error: Rank mismatch in argument 'arr' at (1) (scalar and rank-1)

EJFielding avatar Aug 10 '22 20:08 EJFielding

It seems that the OpenSARLab configuration has gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 so they won't have this problem.

EJFielding avatar Aug 10 '22 20:08 EJFielding

Since the OpenSARLab configuration works with the existing version, we should not change this until after the UNAVCO 2022 course.

EJFielding avatar Aug 10 '22 21:08 EJFielding

For additional information, I get the same error with gcc10. The gcc9 compiler does not support MacOS 11 or 12, so I am keeping old binaries for ISCE2.

EJFielding avatar Aug 14 '22 03:08 EJFielding

Hi @EJFielding, I am getting the same error. I wonder if there have been any way to solve that?

Meysam-Amiri avatar Feb 16 '23 09:02 Meysam-Amiri

@Meysam-Amiri I have been using the conda-forge released version of ISCE2 instead of trying to compile it from source code.

EJFielding avatar Feb 20 '23 01:02 EJFielding

seems add FORTRANFLAGS = -fallow-argument-mismatch into SConfigISCE file can solve this problem as mentioned in https://github.com/isce-framework/isce2/issues/436#issuecomment-1029304374

niu541412 avatar May 18 '23 15:05 niu541412

I am not sure which version of ISCE2 fixed this, but it now compiles with gcc 11 and 12.

EJFielding avatar Aug 16 '23 22:08 EJFielding