Blast. As usual, Michael is right -- we didn't account for MPI_IN_PLACE in the "large" F90 interface. We've opened ticket #39 on this:
https://svn.open-mpi.org/trac/ompi/ticket/39 I'm inclined to simply disable the "large" interfaces in v1.1 so that we can get it out the door, and work on fixing "large" properly in v1.2. Any objections? > -----Original Message----- > From: users-boun...@open-mpi.org > [mailto:users-boun...@open-mpi.org] On Behalf Of Michael Kluskens > Sent: Tuesday, May 30, 2006 6:19 PM > To: Open MPI Users > Subject: [OMPI users] MPI_REDUCE vs. MPI_IN_PLACE vs. F90 Interfaces > > Found serious issue for the f90 interfaces for --with-mpi-f90- > size=large > > Consider > > call MPI_REDUCE(MPI_IN_PLACE,sumpfi,sumpfmi,MPI_INTEGER,MPI_SUM, > 0,allmpi,ier) > > Error: Generic subroutine 'mpi_reduce' at (1) is not consistent with > a specific subroutine interface > > sumpfi is an integer array, sumpfmi is an integer. > > The problem is that MPI_IN_PLACE is an integer, so you can only > compile with the large interface file when the second argument of > MPI_REDUCE is an integer, not an integer array, or a character, or a > logical, ... > > So this doubles the number of f90 interfaces needed for MPI_REDUCE > (and anything else that uses MPI_IN_PLACE). > > > Configuration: OpenMPI 1.2a1r10111 (g95 on OS X 10.4.6), configured > with "./configure F77=g95 FC=g95 LDFLAGS=-lSystemStubs > --with-mpi-f90- > size=large --enable-static --with-f90-max-array-dim=3" > > I was using "--with-mpi-f90-size=large" to debug my code instead I'm > into the OpenMPI scripts. > > My solution to deal with this follows: > > *** mpi-f90-interfaces.h.sh *** > > output_183() { > if test "$output" = "0"; then > return 0 > fi > > procedure=$1 > rank=$2 > type=$4 > proc="$1$2D$3" > cat <<EOF > > subroutine ${proc}(sendbuf, recvbuf, count, datatype, op, & > root, comm, ierr) > include 'mpif-common.h' > ${type}, intent(in) :: sendbuf > ${type}, intent(out) :: recvbuf > integer, intent(in) :: count > integer, intent(in) :: datatype > integer, intent(in) :: op > integer, intent(in) :: root > integer, intent(in) :: comm > integer, intent(out) :: ierr > end subroutine ${proc} > > EOF > > if [ "${type}" != "integer*4" ]; then > cat <<EOF > > subroutine ${proc}M(sendbuf, recvbuf, count, datatype, op, & > root, comm, ierr) > include 'mpif-common.h' > integer, intent(in) :: sendbuf > ${type}, intent(out) :: recvbuf > integer, intent(in) :: count > integer, intent(in) :: datatype > integer, intent(in) :: op > integer, intent(in) :: root > integer, intent(in) :: comm > integer, intent(out) :: ierr > end subroutine ${proc}M > > EOF > > fi > > } > > ----- > *** mpi_reduce_f90.f90.sh *** > > output() { > procedure=$1 > rank=$2 > type=$4 > proc="$1$2D$3" > > cat <<EOF > > subroutine ${proc}(sendbuf, recvbuf, count, datatype, op, & > root, comm, ierr) > include "mpif-common.h" > ${type}, intent(in) :: sendbuf > ${type}, intent(out) :: recvbuf > integer, intent(in) :: count > integer, intent(in) :: datatype > integer, intent(in) :: op > integer, intent(in) :: root > integer, intent(in) :: comm > integer, intent(out) :: ierr > call ${procedure}(sendbuf, recvbuf, count, datatype, op, & > root, comm, ierr) > end subroutine ${proc} > EOF > > if [ "${type}" != "integer*4" ] ; then > cat <<EOF > > subroutine ${proc}M(sendbuf, recvbuf, count, datatype, op, & > root, comm, ierr) > include "mpif-common.h" > integer, intent(in) :: sendbuf > ${type}, intent(out) :: recvbuf > integer, intent(in) :: count > integer, intent(in) :: datatype > integer, intent(in) :: op > integer, intent(in) :: root > integer, intent(in) :: comm > integer, intent(out) :: ierr > call ${procedure}(sendbuf, recvbuf, count, datatype, op, & > root, comm, ierr) > end subroutine ${proc}M > > EOF > > fi > } > > > _______________________________________________ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users >