Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] Compile-time MPI_Datatype checking
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2012-10-30 22:25:44


On Oct 28, 2012, at 10:28 AM, Dmitri Gribenko wrote:

> Thank you for the feedback! Hopefully the attached patch fixes both of these.
>
> 1. There are two helper structs with complex numbers. I predicated
> the struct declarations and use to appear only in C99.
>
> 2. These macros were indeed missing.

I did a few tests and this now looks good; no more warnings.

I brought up this functionality on the weekly OMPI dev telecon today and got an important piece of feedback: apparently there are a large class of apps that wrap their messages as transparent blobs, and then use either non-blob-like or derived MPI datatypes. (I said something similar to this earlier in the thread, but I didn't know that there was a large class of apps that actually did it)

A very simple example is:

    char *foo = malloc(...);
    // ...fill foo...
    MPI_Send(foo, x, MPI_INT, ...);

Another not-uncommon example is:

    char *foo = malloc(...);
    // Receive some INTEGERs from a Fortran sender
    MPI_Recv(foo, x, MPI_INTEGER, ...);

With this patch, they'd get warnings about these uses, even though they are completely valid according to MPI.

A suggestion was that this functionality could be disabled by default, and enabled with a magic macro. Perhaps something like:

    mpicc -DOMPI_DDT_CHECKING ...

or something like that.

Thoughts?

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