Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Bug in MPI_scatterv Fortran-90 implementation
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2011-04-21 12:07:31


I do believe you found a bona-fide bug.

Could you try the attached patch? (I think it should only affect f90 "large" builds) You should be able to check it quickly via:

cd top_of_ompi_source_tree
patch -p0 < scatterv-f90.patch
cd ompi/mpi/f90
make clean
rm mpi_scatterv_f90.f90
make all install

On Apr 21, 2011, at 10:37 AM, Stanislav Sazykin wrote:

> Hello,
>
> I came across what appears to be an error in implementation of
> MPI_scatterv Fortran-90 version. I am using OpenMPI 1.4.3 on Linux.
> This comes up when OpenMPI was configured with
> --with-mpi-f90-size=medium or --with-mpi-f90-size=large
>
> The standard specifies that the interface is
> MPI_SCATTERV(SENDBUF, SENDCOUNTS, DISPLS, SENDTYPE, RECVBUF,
> RECVCOUNT, RECVTYPE, ROOT, COMM, IERROR)
> <type> SENDBUF(*), RECVBUF(*)
> INTEGER SENDCOUNTS(*), DISPLS(*), SENDTYPE
>
> so that SENDCOUNTS and DISPLS are integer arrays. However, if
> I compile a fortran code with calls to MPI_scatterv and compile
> with argument checks, two Fortran compilers (Intel and Lahey)
> produce fatal errors saying there is no matching interface.
>
> Looking in the source code of OpenMPI, I see that in
> ompi/mpi/f90/scripts, the script mpi_scatterv_f90.f90.sh that
> is invoked when running "make" produces Fortran interfaces
> that list both SENDCOUNTS and DISPLS as
>
> integer, intent(in) ::
>
> This appears to be an error as it would be illegal to pass a scalar
> variable and receive it as an array in the subroutine. I have not
> figured out what happens in the code at this invocation (the code
> is complicated), but seems like a segfault situation.
>
> --
> Stan Sazykin
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/