Unfortunately, this is a known issue. :-\ I have not found a reliable way to deduce that MPI_IN_PLACE has been passed as the parameter to MPI_REDUCE (and friends) on OS X. There's something very strange going on with regards to the Fortran compiler and common block variables (which is where we have MPI_IN_PLACE and other sentinel-value MPI constants defined).
We have a very old ticket open on this issue: https://svn.open-mpi.org/trac/ompi/ticket/1982 Any suggestions would be welcome. :-\ On Nov 23, 2011, at 1:20 PM, Arjen van Elteren wrote: > Dear All, > > I'm running a complex program with a number of MPI_REDUCE calls, every call > uses MPI_IN_PLACE as the first parameter (the send buffer). > > I'm currently testing this program on Mac 10.6 with macports installed. > > Unfortunately all MPI_REDUCE calls with MPI_IN_PLACE, seem to fail. > > I've pinpointed the problem to the MPI_IN_PLACE parameter location, it seems > to matter if it is the first or the second parameter to the MPI_REDUCE call. > > This is specific for fortran, in C the sequence does not matter! > > A simple program to test this: > > PROGRAM MAIN > implicit none > include 'mpif.h' > integer :: x(10) > integer :: provided,ioerror > call MPI_INIT(ioerror) > x = 1 > > print *, x > call MPI_REDUCE(x, MPI_IN_PLACE,10, MPI_INTEGER, MPI_SUM, 0,MPI_COMM_WORLD, > ioerror) > print *, x > call MPI_REDUCE(MPI_IN_PLACE, x,10, MPI_INTEGER, MPI_SUM, 0,MPI_COMM_WORLD, > ioerror) > print *, x > > call MPI_FINALIZE(ioerror) > END PROGRAM > > I run this on one process (mpiexec ./a.out) > > I'm running with openmpi version 1.5.4 (macports) > > The openmpi is compiled with gfortran 4.4.6 > > Is this a bug in openmpi or is my understanding of MPI_REDUCE wrong? > > Best regards, > > Arjen > _______________________________________________ > 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/