Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI devel] [EXTERNAL] Re: Compile-time MPI_Datatype checking
From: Dmitri Gribenko (gribozavr_at_[hidden])
Date: 2012-11-19 11:47:37


On Mon, Nov 19, 2012 at 6:35 PM, Jeff Squyres <jsquyres_at_[hidden]> wrote:
> (SC is now over, and, aside from the US holiday later this week, I'm picking up the items that I've let fall on the floor for the past 1-2 months...)
>
> On Oct 31, 2012, at 3:51 PM, Barrett, Brian W wrote:
>
>> That said, if we didn't throw a warning if the pointer is of type void* or
>> char*, I think I'd be mostly ok with the patch being on by default. I'm
>> not sure if that's possible or not...
>
>
> This might be a good compromise. How about the following (assuming this all only happens for compilers that support this stuff, which, at the moment, will be clang version >= X.Y.Z, for some values of X, Y, and Z):
>
> 1. the warnings are enabled by default in mpi.h

Awesome!

> 2. the warnings can be disabled by a magic -D (e.g., -DDISABLE_MPI_TYPE_CHECKING or whatever -- the -Wno-type-safety option sounds scary; does it really disable *ALL* type safety?)

-Wno-type-safety just turns off warnings from 'type-safety' group.
Just like -Wno-unitialize turns off warnings about 'uninitialized'.

> 3. the warnings are disabled for buffer types of (char*) or (void*)

I think that disabling warnings for char* might make sense. But
during the LLVM developer meeting I talked with Hal Finkel (MPICH2
developer) about this. These annotations are already integrated into
MPICH2. Hal said that he found real bugs with these warnings
involving char* buffers.

Is it really not an option for the codebase in question to build with
-D... or -Wno-...?

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr_at_[hidden]>*/