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

gcc + gfotran 10 issue with cloverleaf + mpi #727

Open
cyrush opened this issue Apr 27, 2021 · 4 comments · Fixed by #779
Open

gcc + gfotran 10 issue with cloverleaf + mpi #727

cyrush opened this issue Apr 27, 2021 · 4 comments · Fixed by #779

Comments

@cyrush
Copy link
Member

cyrush commented Apr 27, 2021

hit this using ubunutu 20.10 while testing gcc 10:

/ascent/src/examples/proxies/cloverleaf3d-ref/clover.F90:4192:21:

 4192 |   CALL MPI_ALLREDUCE(value,maximum,1,MPI_DOUBLE_PRECISION,MPI_MAX,MPI_COMM_WORLD,err)
      |                     1
......
 4226 |   CALL MPI_ALLREDUCE(error,maximum,1,MPI_INTEGER,MPI_MAX,MPI_COMM_WORLD,err)
      |                     2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
/ascent/src/examples/proxies/cloverleaf3d-ref/clover.F90:4174:21:

 4174 |   CALL MPI_ALLREDUCE(value,minimum,1,MPI_DOUBLE_PRECISION,MPI_MIN,MPI_COMM_WORLD,err)
      |                     1
......
 4226 |   CALL MPI_ALLREDUCE(error,maximum,1,MPI_INTEGER,MPI_MAX,MPI_COMM_WORLD,err)
      |                     2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).

there isn't an obvious mismatch unless there is something strange with the MPI API

similar discussion:

Unidata/netcdf-fortran#212

@cyrush
Copy link
Member Author

cyrush commented Apr 27, 2021

while I would like to understand what is going on here - it does seem most folks are opting to mute gcc's complaints:

GlobalArrays/ga#157 (comment)

@cyrush
Copy link
Member Author

cyrush commented Jul 27, 2021

Newer mpich add these flags as part of their -show report:

f95 -O2 -fdebug-prefix-map=/build/mpich-lMcyOH/mpich-3.4~a2+really3.3.2=. -fstack-protector-strong -fallow-invalid-boz 
-fallow-argument-mismatch -Wl,-Bsymbolic-functions -Wl,-z,relro -I/usr/include/x86_64-linux-gnu/mpich -I/usr/include/x86_64-linux-gnu/mpich -L/usr/lib/x86_64-linux-gnu -lmpichfort -lmpich

BLT fuses all of these, so we will end up with warnings from the C++ compiler about how these are fortran flags :-(

cc1plus: warning: command-line option '-fallow-invalid-boz' is valid for Fortran but not for C++
cc1plus: warning: command-line option '-fallow-argument-mismatch' is valid for Fortran but not for C++

@jfavre
Copy link
Contributor

jfavre commented Dec 13, 2021

I have two systems (Ubuntu with cmake 3.18.4 and a Cray with cmake 3.21.1). The fix provided does not work because of the double quotes surrounding the two compile flags options.

I was able to restart the compilation in both cases, by removing the double quotes, i.e. replacing
"-DUSE_MPIF -fallow-invalid-boz -fallow-argument-mismatch" by
-DUSE_MPIF -fallow-invalid-boz -fallow-argument-mismatch
on the command line.

in both cases, compilation terminated successfully.

@cyrush cyrush reopened this Dec 13, 2021
@cyrush
Copy link
Member Author

cyrush commented Dec 13, 2021

@jfavre thanks I'll take a look again!

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.

2 participants