A user testing my MPI wrappers for Python found a couple of problems
with OMPI-1.1 using valgrind, here are his reports.

http://projects.scipy.org/mpi4py/ticket/9
http://projects.scipy.org/mpi4py/ticket/10

I've investigated this at OMPI-1.1.2 sources, and found the following
in file ompi/mpi/c/allgatherv.c

      size = ompi_comm_size(comm);
      for (i = 0; i < size; ++i) {
        if (recvcounts[i] < 0) {
          return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_COUNT, FUNC_NAME);
        } else if (MPI_DATATYPE_NULL == recvtype) {
          return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_TYPE, FUNC_NAME);
        }
      }

Two things to point on this source file :

- I cannot see any special check for the itercommuncator case, and
checking recvcount with 'ompi_comm_size' is wrong, it should be with
remote comm size. Am I right?

- Test for recvtype should be done outside the loop.

In file ompi/mpi/c/gatherv.c, there are special check for intercomms.
However, in the intercomm specific checks, you are still using
'ompi_comm_size'


As reference, in ompi/mpi/c/alltoallv.c you have

    size = ompi_comm_remote_size(comm);
    for (i = 0; i < size; ++i) {
      if (recvcounts[i] < 0) {
        err = MPI_ERR_COUNT;
      } else if (MPI_DATATYPE_NULL == recvtype) {
        err = MPI_ERR_TYPE;
      } else {
        OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtype, sendcounts[i]);
      }
      OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
    }

This is OK, but perhaps some things can be moved outside the loop.

Regards,

--
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594

Reply via email to