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)
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)
endprogram
The command that I used to compile:
gfortran Allreduce.f90 -IC:\OpenMPI-win32\include
C:\OpenMPI-win32\lib\libmpi_f77.lib
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!
Yonghui
|