Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build errors on GCC 10 (gfortran) #73

Open
dpgarrick opened this issue Aug 29, 2022 · 3 comments · May be fixed by #77
Open

build errors on GCC 10 (gfortran) #73

dpgarrick opened this issue Aug 29, 2022 · 3 comments · May be fixed by #77

Comments

@dpgarrick
Copy link

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

@weslleyspereira
Copy link
Collaborator

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.

@scivision scivision linked a pull request Nov 22, 2022 that will close this issue
@torehl
Copy link

torehl commented May 25, 2023

Same issue on gcc-11.3.0. Thanks for workaround.

@fsidoli
Copy link

fsidoli commented Dec 2, 2024

Hi All,

Following on from the above, I'm trying to build ScaLAPACK 2.2.0 around gcc 11.2.0.

I've run the following cmake command to include the Fortran flags which were causing the errors mentioned above to start with. This seems to do part of the job for me now, producing warnings as predicted.

cmake ../CMakeLists.txt -DCMAKE_Fortran_FLAGS="-fallow-argument-mismatch" -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/install/path -DCMAKE_VERBOSE_MAKEFILE=ON

However, upon running

make -j 16 > make.out 2> make.err

I get the following errors and I'm not sure how to proceed.

# grep Error make.err | grep -v "MPI_Error" make[2]: *** [TESTING/LIN/CMakeFiles/xsgblu.dir/build.make:192: TESTING/xsgblu] Error 1 make[1]: *** [CMakeFiles/Makefile2:1575: TESTING/LIN/CMakeFiles/xsgblu.dir/all] Error 2 make[2]: *** [TESTING/LIN/CMakeFiles/xddtlu.dir/build.make:192: TESTING/xddtlu] Error 1 make[1]: *** [CMakeFiles/Makefile2:1497: TESTING/LIN/CMakeFiles/xddtlu.dir/all] Error 2 make[2]: *** [TESTING/LIN/CMakeFiles/xzgblu.dir/build.make:192: TESTING/xzgblu] Error 1 ../../lib/libscalapack.so: undefined reference to make[1]: *** [CMakeFiles/Makefile2:1653: TESTING/LIN/CMakeFiles/xzgblu.dir/all] Error 2
make[2]: *** [TESTING/LIN/CMakeFiles/xcdblu.dir/build.make:192: TESTING/xcdblu] Error 1
make[1]: *** [CMakeFiles/Makefile2:1419: TESTING/LIN/CMakeFiles/xcdblu.dir/all] Error 2
make[2]: *** [TESTING/LIN/CMakeFiles/xslu.dir/build.make:192: TESTING/xslu] Error 1
../../lib/libscalapack.so: undefined reference to make[1]: *** [CMakeFiles/Makefile2:1263: TESTING/LIN/CMakeFiles/xslu.dir/all] Error 2 make[2]: *** [TESTING/LIN/CMakeFiles/xdgblu.dir/build.make:192: TESTING/xdgblu] Error 1 make[2]: *** [TESTING/LIN/CMakeFiles/xzdblu.dir/build.make:192: TESTING/xzdblu] Error 1 make[1]: *** [CMakeFiles/Makefile2:1601: TESTING/LIN/CMakeFiles/xdgblu.dir/all] Error 2 make[1]: *** [CMakeFiles/Makefile2:1445: TESTING/LIN/CMakeFiles/xzdblu.dir/all] Error 2 make[2]: *** [TESTING/LIN/CMakeFiles/xddblu.dir/build.make:192: TESTING/xddblu] Error 1 ../../lib/libscalapack.so: undefined reference to make[1]: *** [CMakeFiles/Makefile2:1393: TESTING/LIN/CMakeFiles/xddblu.dir/all] Error 2
make[2]: *** [TESTING/LIN/CMakeFiles/xsdtlu.dir/build.make:192: TESTING/xsdtlu] Error 1
make[1]: *** [CMakeFiles/Makefile2:1471: TESTING/LIN/CMakeFiles/xsdtlu.dir/all] Error 2
make[2]: *** [TESTING/LIN/CMakeFiles/xdlu.dir/build.make:192: TESTING/xdlu] Error 1
make[1]: *** [CMakeFiles/Makefile2:1289: TESTING/LIN/CMakeFiles/xdlu.dir/all] Error 2
make[2]: *** [TESTING/LIN/CMakeFiles/xcdtlu.dir/build.make:192: TESTING/xcdtlu] Error 1
make[1]: *** [CMakeFiles/Makefile2:1523: TESTING/LIN/CMakeFiles/xcdtlu.dir/all] Error 2
../../lib/libscalapack.somake[2]: *** [TESTING/LIN/CMakeFiles/xzdtlu.dir/build.make:192: TESTING/xzdtlu] Error 1
make[1]: *** [CMakeFiles/Makefile2:1549: TESTING/LIN/CMakeFiles/xzdtlu.dir/all] Error 2
make[2]: *** [TESTING/LIN/CMakeFiles/xsdblu.dir/build.make:192: TESTING/xsdblu] Error 1
make[1]: *** [CMakeFiles/Makefile2:1367: TESTING/LIN/CMakeFiles/xsdblu.dir/all] Error 2
make[2]: *** [TESTING/LIN/CMakeFiles/xclu.dir/build.make:192: TESTING/xclu] Error 1
make[2]: *** [TESTING/LIN/CMakeFiles/xcgblu.dir/build.make:192: TESTING/xcgblu] Error 1
make[1]: *** [CMakeFiles/Makefile2:1315: TESTING/LIN/CMakeFiles/xclu.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1627: TESTING/LIN/CMakeFiles/xcgblu.dir/all] Error 2
make[2]: *** [TESTING/LIN/CMakeFiles/xzlu.dir/build.make:192: TESTING/xzlu] Error 1
make[1]: *** [CMakeFiles/Makefile2:1341: TESTING/LIN/CMakeFiles/xzlu.dir/all] Error 2
make: *** [Makefile:169: all] Error 2`

I have modules loaded for openblas 0.3.28, openmpi 4.1.3, libxc 6.2.2 and fftw 3.3.10 all build around gcc 11.2.0

If this should be a new issue, please let me know.

Thanks,
Fab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants