Opened 3 years ago
#85 new enhancement
Compatibility with gfortran versions 10+
Reported by: | emillour | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | MARS GCM | Version: | |
Keywords: | Cc: |
Description
Recent version of gfortran (10+) are stricter than ever and report as errors "type mismatches" when calls to routines in the same file use different argument types (unless these routines are defined in a module, because then there are explicit interfaces),thus sending a scalar in one place and a 1D-1 element array in another raises and error... hence recent "fixes" such as r2572,r2573,r2577, which are fine workarounds. An alternative is using the "-fallow-argument-mismatch" gfortran option, but this will make gfortran miss cases where there is really a problem...
Still, there remains a problem with calls to MPI routines, e.g.:
/Volumes/ssi_raid2/lmd/gcm/trunk/LMDZ.COMMON/libo/mpigfortran_64x48x49_phymars_para.e/.config/ppsrc/phy_common/mod_phys_lmdz_mpi_transfert.f90:1249:19: 1249 | CALL MPI_BCAST(Var,nb,MPI_CHARACTER,mpi_master,COMM_LMDZ_PHY,ierr) | 1 ...... 1305 | CALL MPI_BCAST(Var,nb,MPI_LOGICAL,mpi_master,COMM_LMDZ_PHY,ierr) | 2 Error: Type mismatch between actual argument at (1) and actual argument at (2) (CHARACTER(*)/LOGICAL(4)).
In this case there is no trivial workaround (apart from the "-fallow-argument-mismatch" gfortran option). Moving to using the f90 MPI interface is probably the only way forward.