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.open...@user.fastmail.fm> 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 > jsquy...@cisco.com > For corporate legal information go to: > http://www.cisco.com/web/about/doing_business/legal/cri/ > > _______________________________________________ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users