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

Jeff Hammond jeff.science at gmail.com
Fri Jun 28 17:52:30 CDT 2013


mpif.h is for F77 codes. Use the module for F90+.  There is no point
in fixing mpif.h for F03 because the solution already exists.

The F08 bindings in MPI-3 are the long-term solution.

Jeff

Sent from my iPhone

On Jun 28, 2013, at 5:21 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> 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
> |
> _______________________________________________
> 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