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

Reply via email to