scalapack
scalapack copied to clipboard
build errors on GCC 10 (gfortran)
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
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.
Same issue on gcc-11.3.0. Thanks for workaround.