[CIG-SEISMO] MPICH mpif.h incompatible with gfortran-4.8 -std=f2003
Dimitri Komatitsch
komatitsch at lma.cnrs-mrs.fr
Fri Jun 28 15:30:53 PDT 2013
Dear Jed,
Elliott Sales de Andrade in Toronto is in the process of changing that
by using "use mpi" statements instead of "include mpif.h". Thus in a few
days please svn update and the problem should be fixed.
PS: I mentioned that to MPICH developers seven years ago, back then they
said they would fix it i.e. switch to standard-conforming headers but
never did...
Best regards,
Dimitri.
On 06/29/2013 12:21 AM, Jed Brown 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
> |
>
>
>
> _______________________________________________
> CIG-SEISMO mailing list
> CIG-SEISMO at geodynamics.org
> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-seismo
>
--
Dimitri Komatitsch
CNRS Research Director (DR CNRS), Laboratory of Mechanics and Acoustics,
UPR 7051, Marseille, France http://komatitsch.free.fr
More information about the CIG-SEISMO
mailing list