scalapack icon indicating copy to clipboard operation
scalapack copied to clipboard

build errors on GCC 10 (gfortran)

Open dpgarrick opened this issue 1 year ago • 2 comments

GCC10 is the default on Ubuntu 22.04.

During the build step there are many compilation errors of the form:

scalapack/SRC/pstrord.f:3264:54:

  490 |      $         CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, MMAX, 1, -1,
      |                                                      2
......
 3264 |                CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFO, 1, -1,
      |                                                      1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)

See this link for the explanation and the fix. https://gcc.gnu.org/gcc-10/porting_to.html

Until the code is fixed the workaround is to configure cmake with the following flag: -DCMAKE_Fortran_FLAGS="-fallow-argument-mismatch" which converts the error into a warning.

e.g.

mkdir -p build && cd build && cmake -DCMAKE_Fortran_FLAGS="-fallow-argument-mismatch" .. && make scalapack

dpgarrick avatar Aug 29 '22 02:08 dpgarrick

Thanks for the observation and for the workaround!

Just to repeat what is in your link: GCC 10 now rejects argument mismatches occurring in the same source file.

weslleyspereira avatar Sep 06 '22 21:09 weslleyspereira

Same issue on gcc-11.3.0. Thanks for workaround.

torehl avatar May 25 '23 10:05 torehl