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

Compile using gcc10 #107

Open
k-yoshimi opened this issue Dec 23, 2020 · 3 comments
Open

Compile using gcc10 #107

k-yoshimi opened this issue Dec 23, 2020 · 3 comments

Comments

@k-yoshimi
Copy link
Contributor

k-yoshimi commented Dec 23, 2020

When you use gcc10 with MPI for compiling HPhi and receive the following error

  165 |   &  call MPI_allREDUCE(MPI_IN_PLACE, prod, 1, &
      |                                      1
......
  194 |   &  call MPI_allREDUCE(MPI_IN_PLACE, maxarray, 1, &
      |                                      2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).

please add the following option for cmake.
-DCMAKE_Fortran_FLAGS_RELEASE=-fallow-argument-mismatch

ref. https://gcc.gnu.org/gcc-10/changes.html

Mismatches between actual and dummy argument lists in a single file are now rejected with an error. Use the new option -fallow-argument-mismatch to turn these errors into warnings; this option is implied with -std=legacy. -Wargument-mismatch has been removed.

@Schlufi
Copy link

Schlufi commented May 7, 2021

Also starting with version 10, GCC defaults to using -fno-common. This results in a large amount of multiple definition errors during linking. Adding -fcommon to the C flags should fix this.

@wistaria
Copy link
Contributor

wistaria commented May 8, 2021

@wistaria
Copy link
Contributor

The above patch works also for GCC 11.

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

No branches or pull requests

3 participants