I am unable to replicate your problem, but admittedly I only have access to gfortran on Linux. And I am definitely *not* a Fortran expert. :-\
The code seems to run fine for me -- can you send another test program that actually tests the results of the all reduce? Fortran allocatable stuff always confuses me; I wonder if perhaps we're not getting the passed pointer properly. Checking the results of the all reduce would be a good way to check this theory. On Sep 6, 2012, at 12:05 PM, Yonghui wrote: > 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 > > _______________________________________________ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users -- Jeff Squyres jsquy...@cisco.com For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/