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
gfortran - type mismatch / rank mismatch while compiling #1181
Comments
this is an annoying GCC "feature" introduced in newer versions with stricter argument checking in single files. please see the comment here: add either the
on older GCC versions <= 9, you won't need the
give it a try and let me know if this works on your system. |
hi, @daniel, thanks! It is too many warnings. ./run_this_example works fine. specfem3D - https://ctxt.io/2/AACQ_JETFA I don't know the limination using CUDA with spcefem2d. |
the compilation of the 2D version with CUDA support is the same as in the 3D version, thus in your case something like:
you can follow the settings as described here: note that the 2D version only has CUDA support, whereas the 3D version also supports HIP now. also, the setting
|
The following errors occur as gcc-11 gfortran-11.
gfortran -g -O2 -std=f2008 -fimplicit-none -fmax-errors=10 -pedantic -pedantic-errors -Waliasing -Wampersand -Wcharacter-truncation -Wline-truncation -Wsurprising -Wno-tabs -Wunderflow -ffpe-trap=invalid,zero,overflow -Wunused -O3 -finline-functions -DWITH_MPI -J./obj -I./obj -I. -I./setup -c -o obj/define_external_model_from_tomo_file.spec.o src/specfem2D/define_external_model_from_tomo_file.f90
src/shared/parallel.F90:340:17:
340 | call MPI_BCAST(buffer,1,MPI_INTEGER,0,my_local_mpi_comm_world,ier)
| 1
......
395 | call MPI_BCAST(buffer,1,MPI_LOGICAL,0,my_local_mpi_comm_world,ier)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/LOGICAL(4)).
src/shared/parallel.F90:368:17:
368 | call MPI_BCAST(buffer,countval,MPI_LOGICAL,0,my_local_mpi_comm_world,ier)
| 1
......
395 | call MPI_BCAST(buffer,1,MPI_LOGICAL,0,my_local_mpi_comm_world,ier)
| 2
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
export FCFLAGS="-w -fallow-argument-mismatch -O2"
export FFLAGS="-w -fallow-argument-mismatch -O2"
This Flag adding didn't work.
Errors still as gcc-9 gfortran-9
gfortran: error: unrecognized command line option ‘-fallow-invalid-boz’
gfortran: error: unrecognized command line option ‘-fallow-argument-mismatch’; did you mean ‘-Wno-argument-mismatch’?
make: *** [src/shared/rules.mk:102: obj/parallel.sharedmpi.o] Error 1
Hoping your help. Thanks very much.
The text was updated successfully, but these errors were encountered: