[mpich-discuss] MPICH mpif.h incompatible with gfortran-4.8 -std=f2003

Jed Brown jedbrown at mcs.anl.gov
Fri Jun 28 17:21:33 CDT 2013


As shown below in SPECFEM3D, mpif.h cannot be included when using
-std=f2003 with gfortran-4.8.  I've Cc'd the MPICH list in case there is
interest in converting mpif.h to be compatible with -std=f2003.  Open
MPI uses 'double precision' instead of 'real*8', rendering mpif.h safe
to include.

On the SPECFEM side, I believe this can be handled by switching from
including mpif.h to using the f90 mpi module.


configure:6665: /opt/mpich/bin/mpif90 -c -g -O2 -std=f2003 -fimplicit-none -frange-check -O2 -DFORCE_VECTORIZATION -fmax-errors=10 -pedantic -pedantic-errors -Waliasing -Wam
persand -Wcharacter-truncation -Wline-truncation -Wsurprising -Wno-tabs -Wunderflow -ffpe-trap=invalid,zero,overflow   conftest.f90 >&5
mpif.h:16.18:
    Included at conftest.f90:4:

       CHARACTER*1 MPI_ARGVS_NULL(1,1)
                  1
Warning: Obsolescent feature: Old-style character length at (1)
mpif.h:17.18:
    Included at conftest.f90:4:

       CHARACTER*1 MPI_ARGV_NULL(1)
                  1
Warning: Obsolescent feature: Old-style character length at (1)
mpif.h:528.16:
    Included at conftest.f90:4:

       integer*8 MPI_DISPLACEMENT_CURRENT
                1
Error: GNU Extension: Nonstandard type declaration INTEGER*8 at (1)
mpif.h:529.42:
    Included at conftest.f90:4:

       PARAMETER (MPI_DISPLACEMENT_CURRENT=-54278278)
                                          1
Error: Symbol 'mpi_displacement_current' at (1) has no IMPLICIT type
mpif.h:546.13:
    Included at conftest.f90:4:

       REAL*8 MPI_WTIME, MPI_WTICK
             1
Error: GNU Extension: Nonstandard type declaration REAL*8 at (1)
mpif.h:547.13:
    Included at conftest.f90:4:

       REAL*8 PMPI_WTIME, PMPI_WTICK
             1
Error: GNU Extension: Nonstandard type declaration REAL*8 at (1)
mpif.h:550.18:
    Included at conftest.f90:4:

       CHARACTER*1 PADS_A(3), PADS_B(3)
                  1
Warning: Obsolescent feature: Old-style character length at (1)
configure:6665: $? = 1
configure: failed program was:
| 
|       program main
| 
|       include 'mpif.h'
|       integer, parameter :: CUSTOM_MPI_TYPE = MPI_REAL
|       integer ier
|       call MPI_INIT(ier)
|       call MPI_BARRIER(MPI_COMM_WORLD,ier)
|       call MPI_FINALIZE(ier)
| 
|       end
| 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20130628/3a52f6fe/attachment.sig>


More information about the discuss mailing list