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: Dmitri Gribenko (gribozavr_at_[hidden])
Date: 2012-10-31 09:38:43

On Wed, Oct 31, 2012 at 2:36 PM, Jeff Squyres <jsquyres_at_[hidden]> wrote:
> On Oct 31, 2012, at 3:45 AM, Dmitri Gribenko wrote:
>>> 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:
>> This is a vaild concern and a good idea for a FAQ entry.
> Can we flip the orientation such that -Wmpi-type-safety needs to be specified to enable this behavior, rather than -Wno-mpi-type-safety is required to disable it? (or the equivalent -D's)
> The rationale here is that correct MPI applications should not need to add any extra compiler files to compile without warnings.

I would disagree with this. Compiler warnings are most useful when
they are on by default. Only a few developers will turn on a warning
because warnings are hard to discover and enabling a warning requires
an explicit action from the developer.

The pattern you described is an important one, but most MPI
applications will have matching buffer types/type tags. Applications
that use code like that can disable the warning or silence it.

If the pattern you describe is extremely frequent, we could disable
checking for 'char *' buffer type, just like for 'void *'.


(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr_at_[hidden]>*/