[mpich-discuss] Account Request / Bug report MPI_Type_create_f90_real

Harald Klimach harald at klimachs.de
Wed Dec 19 09:23:53 CST 2012

Hi there,

I installed MPICH2 3.0rc1 using GCC 4.7.2 and found a problem with MPI_Type_create_f90_real.
It is very similar to the problem I reported in OpenMPI under: https://svn.open-mpi.org/trac/ompi/ticket/3432

Running the following program:

program test_mpi
 use mpi
 implicit none

 integer, parameter :: rk_prec = 15
 integer, parameter :: rk = selected_real_kind(rk_prec)

 integer :: rk_mpi
 integer :: iError
 real(kind=rk) :: a_real
 real(kind=rk) :: res

 call MPI_Init(iError)
 call mpi_type_create_f90_real(rk_prec, MPI_UNDEFINED, rk_mpi, iError)
 write(*,*) 'MPI_REAL8:', MPI_REAL8
 write(*,*) 'type_create_f90_real:', rk_mpi
 a_real = 1.0
 call MPI_Reduce(a_real, res, 1, rk_mpi, MPI_MIN, 0, MPI_COMM_WORLD, iError)
 call MPI_Finalize(iError)

end program test_mpi

Results in the following output and error:

MPI_REAL8:  1275070505
type_create_f90_real: -1946157049
Fatal error in PMPI_Reduce: Invalid MPI_Op, error stack:
PMPI_Reduce(1217)........: MPI_Reduce(sbuf=0x7fff43637108, rbuf=0x7fff436370f8, count=1, dtype=USER<f90_real>, MPI_MIN, root=0, MPI_COMM_WORLD) failed
MPIR_MINF_check_dtype(71): MPI_Op MPI_MIN operation not defined for this datatype

Further the quadruple precision data type is not properly supported:
MPI_Type_create_f90_real will complain about wrong exponent, regardless of its value,
while MPI_REAL16 is available and the Reduction operation does not complain, it produces
wrong results. Again there is a similar problem with OpenMPI, as reported under:

Thanks a lot,
Harald Klimach

More information about the discuss mailing list