Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] [EXTERNAL] Re: Compile-time MPI_Datatype checking
From: Barrett, Brian W (bwbarre_at_[hidden])
Date: 2012-10-31 16:01:56


On 10/31/12 1:57 PM, "Dmitri Gribenko" <gribozavr_at_[hidden]> wrote:

>On Wed, Oct 31, 2012 at 9:51 PM, Barrett, Brian W <bwbarre_at_[hidden]>
>wrote:
>> On 10/31/12 1:39 PM, "Paul Hargrove" <phhargrove_at_[hidden]> wrote:
>>
>>>No, I don't have specific usage cases that concern me.
>>>
>>>
>>>As I said a minute or two ago in a reply to Ralph, my concern is that
>>>the
>>>Sandia codes provide an "existence proof" that "really smart people" can
>>>write questionable code at times. So, I fear that a
>>>larger-than-expected
>>>fraction of real codes would generate warnings.
>>
>> Not surprisingly, most of the codes I'm concerned about are really old
>> (like pre-MPI old). The authors were dealing with more than one
>> communication library, so they wrote wrappers inside their code for
>> communication. The wrappers were for a bunch of different communication
>> interfaces and so fairly agnostic, but looked a lot like MPI (because
>>MPI
>> looks a lot like NX, PVM, etc.). Anyway, they squashed down everything
>>to
>> either a void* or char* (remember, this is when void* was not always
>> supported), passed that to MPI with a datatype, and off we go.
>
>Thank you for sharing the context.
>
>> 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...
>
>It is certainly possible to do that. However, we would lose the
>ability to diagnose type mismatches for MPI_CHARACTER, but it is a
>rarely-used type tag (is it?).

My experience is that MPI_CHAR / MPI_CHARACTER are frequently used when
MPI_BYTE should be used. So this is yet another mismatch that it's
probably not a bad idea to complain too much about :).

Brian

-- 
  Brian W. Barrett
  Dept. 1423: Scalable System Software
  Sandia National Laboratories