Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] MPI_Allreduce fail (minGW gfortran + OpenMPI 1.6.1)
From: Yonghui (lyh03259.aps_at_[hidden])
Date: 2012-09-06 12:05:10

Dear mpi users and developers,


I am having some trouble with MPI_Allreduce. I am using MinGW (gcc 4.6.2)
with OpenMPI 1.6.1. The MPI_Allreduce in c version works fine, but the
fortran version failed with error. Here is the simple fortran code to
reproduce the error:


                program main

                                implicit none

                                include 'mpif.h'

                                character * (MPI_MAX_PROCESSOR_NAME)

                                integer myid, numprocs, namelen, rc, ierr

                                integer, allocatable :: mat1(:, :, :)


                                call MPI_INIT( ierr )

                                call MPI_COMM_RANK( MPI_COMM_WORLD, myid,
ierr )

                                call MPI_COMM_SIZE( MPI_COMM_WORLD,
numprocs, ierr )

                                allocate(mat1(-36:36, -36:36, -36:36))

                                mat1(:,:,:) = 111

                                print *, "Going to call MPI_Allreduce."

                                call MPI_Allreduce(MPI_IN_PLACE, mat1(-36,
-36, -36), 389017, MPI_INTEGER, MPI_BOR, MPI_COMM_WORLD, ierr)

                                print *, "MPI_Allreduce done!!!"

                                call MPI_FINALIZE(rc)



The command that I used to compile:

gfortran Allreduce.f90 -IC:\OpenMPI-win32\include


The MPI_Allreduce fail. [xxxxxxx:02112] [[17193,0],0]-[[17193,1],0]
mca_oob_tcp_msg_recv: readv failed: Unknown error (108).

I am not sure why this happens. But I think it is the windows build MPI
problem. Since the simple code works on a Linux system with gfortran.


Any ideas? I appreciate any response!