I'm afraid I can't answer that.   Here's my environment:

 OpenMPI 1.6.1
 IFORT 12.0.3.174
 Scientific Linux 6.4

 What fortran compiler are you using?  

T. Rosmond



On Fri, 2013-09-06 at 23:14 -0400, Hugo Gagnon wrote:
> Thanks for the input but it still doesn't work for me...  Here's the
> version without MPI_IN_PLACE that does work:
> 
> program test
> use mpi
> integer :: ierr, myrank, a(2), a_loc(2) = 0
> call MPI_Init(ierr)
> call MPI_Comm_rank(MPI_COMM_WORLD,myrank,ierr)
> if (myrank == 0) then
>   a_loc(1) = 1
>   a_loc(2) = 2
> else
>   a_loc(1) = 3
>   a_loc(2) = 4
> endif
> call MPI_Allreduce(a_loc,a,2,MPI_INTEGER,MPI_SUM,MPI_COMM_WORLD,ierr)
> write(*,*) myrank, a(:)
> call MPI_Finalize(ierr)
> end program test
> 
> $ openmpif90 test.f90
> $ openmpirun -np 2 a.out
>            0           4           6
>            1           4           6
> 
> Now I'd be curious to know why your OpenMPI implementation handles
> MPI_IN_PLACE correctly and not mine!
> 


Reply via email to