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: Hugo Gagnon (opensource.openmpi_at_[hidden])
Date: 2013-09-10 08:33:21


I only get the correct output when I use the more "conventional" syntax:

...
call MPI_Allreduce(a_loc,a,2,MPI_INTEGER,MPI_SUM,MPI_COMM_WORLD,ierr)
...

However, I get the wrong output when I use MPI_IN_PLACE:

...
MPI_Allreduce(MPI_IN_PLACE,a,2,MPI_INTEGER,MPI_SUM,MPI_COMM_WORLD,ierr)
...

hence my question to this forum in the first place.

I also tried the code snippet at

https://svn.open-mpi.org/trac/ompi/ticket/1982

and that doesn't work for me either, i.e. all I get is zeros.

-- 
  Hugo Gagnon
On Tue, Sep 10, 2013, at 5:58, Jeff Squyres (jsquyres) wrote:
> On Sep 7, 2013, at 5:14 AM, Hugo Gagnon
> <opensource.openmpi_at_[hidden]> wrote:
> 
> > $ 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!
> 
> I don't understand -- this looks like the correct output to me.
> 
> Are you seeing some other problem?
> 
> -- 
> Jeff Squyres
> jsquyres_at_[hidden]
> For corporate legal information go to:
> http://www.cisco.com/web/about/doing_business/legal/cri/
> 
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users