Fortran 2008 compatibility of mpif.h and mpiof.h: Suggested fix
Dear MPICH maintainers, when I try to compile my Fortran application in strict 2008 standard and include mpif.h, I'll get an error or a warning from both, the GNU and the Intel Fortran compiler, complaining about the declaration of some datatypes When invoking gfortran with -std=f2008ts, the complaints are: Error: GNU Extension: Nonstandard type declaration INTEGER*8 at (1) Warning: Obsolescent feature: Old-style character length at (1) and for ifort with -stand f08, I'll get : warning #6916: Fortran 2008 does not allow this length specification. [8] The CHARACTER* form of a CHARACTER declaration is an obsolescent feature in Fortran 2008. According to http://fortranwiki.org/fortran/show/Modernizing+Old +Fortran, this can be solved by the following changes in mpif.h and mpiof.h: diff mpif.h mpif.h_new 16,17c16,17 < CHARACTER*1 MPI_ARGVS_NULL(1,1) < CHARACTER*1 MPI_ARGV_NULL(1) ---
CHARACTER(len=1) MPI_ARGVS_NULL(1,1) CHARACTER(len=1) MPI_ARGV_NULL(1)
528c528 < integer*8 MPI_DISPLACEMENT_CURRENT ---
integer(kind=8) MPI_DISPLACEMENT_CURRENT
546,547c546,547 < REAL*8 MPI_WTIME, MPI_WTICK < REAL*8 PMPI_WTIME, PMPI_WTICK ---
REAL(kind=8) MPI_WTIME, MPI_WTICK REAL(kind=8) PMPI_WTIME, PMPI_WTICK
diff mpiof.h mpiof.h_new 29c29 < integer*8 MPI_DISPLACEMENT_CURRENT ---
integer(kind=8) MPI_DISPLACEMENT_CURRENT
Please find the modified files attached. best regards Martin Diehl -- ------------------------------------------------- Max-Planck-Institut für Eisenforschung GmbH Max-Planck-Straße 1 D-40237 Düsseldorf Handelsregister B 2533 Amtsgericht Düsseldorf Geschäftsführung Prof. Dr. Gerhard Dehm Prof. Dr. Jörg Neugebauer Prof. Dr. Dierk Raabe Dr. Kai de Weldige Ust.-Id.-Nr.: DE 11 93 58 514 Steuernummer: 105 5891 1000 Please consider that invitations and e-mails of our institute are only valid if they end with …@mpie.de. If you are not sure of the validity please contact [email protected] Bitte beachten Sie, dass Einladungen zu Veranstaltungen und E-Mails aus unserem Haus nur mit der Endung …@mpie.de gültig sind. In Zweifelsfällen wenden Sie sich bitte an [email protected] ------------------------------------------------- _______________________________________________ discuss mailing list [email protected] To manage subscription options or unsubscribe: https://lists.mpich.org/mailman/listinfo/discuss
participants (1)
-
Martin Diehl