It is a known bug in MPICH. http://trac.mpich.org/projects/mpich/ticket/1769 Rajeev On Aug 5, 2014, at 4:22 AM, marco restelli <[email protected]> wrote:
Hi, I have a problem using mpi_type_create_f90_real: I can compile the attached code but when I run it I get
$ mpiexec -n 1 ./mpitest Fatal error in MPI_Allreduce: Invalid MPI_Op, error stack: MPI_Allreduce(861)......: MPI_Allreduce(sbuf=0x7fff02a4eec0, rbuf=0x7fff02a4eed0, count=1, dtype=USER<f90_real>, MPI_SUM, MPI_COMM_WORLD) failed MPIR_SUM_check_dtype(97): MPI_Op MPI_SUM operation not defined for this datatype
I am using:
$ mpif90 -v mpif90 for MPICH2 version 1.5
Is this a problem in my use of mpi_type_create_f90_real or in mpich?
Thanks, Marco
program mpitest
use mpi implicit none
integer, parameter :: wp = selected_real_kind(12,307) integer, parameter :: & wp_p = precision(1.0_wp), & wp_r = range(1.0_wp)
integer :: wp_mpi, mpi_id, ierr real(wp) :: res
! MPI setup call mpi_init(ierr) call mpi_comm_rank(mpi_comm_world,mpi_id,ierr)
!wp_mpi = mpi_double_precision ! works fine call mpi_type_create_f90_real(wp_p,wp_r,wp_mpi,ierr)
call mpi_allreduce( real(mpi_id,wp) , res , 1 , & wp_mpi,mpi_sum,mpi_comm_world, ierr) write(*,*) "res = ",res
call mpi_finalize(ierr)
end program mpitest _______________________________________________ discuss mailing list [email protected] To manage subscription options or unsubscribe: https://lists.mpich.org/mailman/listinfo/discuss