[mpich-discuss] Fortran 2008 compatibility of mpif.h and mpiof.h: Suggested fix
Martin Diehl
m.diehl at mpie.de
Thu Aug 13 00:59:07 CDT 2015
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 rco at mpie.de
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 rco at mpie.de
-------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpif.h
Type: text/x-chdr
Size: 20918 bytes
Desc: not available
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20150813/b005b07a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpiof.h
Type: text/x-chdr
Size: 1242 bytes
Desc: not available
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20150813/b005b07a/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 501 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20150813/b005b07a/attachment.sig>
-------------- next part --------------
_______________________________________________
discuss mailing list discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss
More information about the discuss
mailing list