isce2
isce2 copied to clipboard
Compile failure on denseoffsetsRead.F with gcc11, gcc12
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)).
Does https://github.com/isce-framework/isce2/pull/441 fix this for you?
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)
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.
Since the OpenSARLab configuration works with the existing version, we should not change this until after the UNAVCO 2022 course.
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.
Hi @EJFielding, I am getting the same error. I wonder if there have been any way to solve that?
@Meysam-Amiri I have been using the conda-forge released version of ISCE2 instead of trying to compile it from source code.
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
I am not sure which version of ISCE2 fixed this, but it now compiles with gcc 11 and 12.