Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] MPI_IN_PLACE in a call to MPI_Allreduce in Fortran
From: Tom Rosmond (rosmond_at_[hidden])
Date: 2013-09-07 00:08:14


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!
>