Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] RFC: add support for large counts using derived datatypes
From: Nathan Hjelm (hjelmn_at_[hidden])
Date: 2013-07-16 17:12:42


On Tue, Jul 16, 2013 at 11:08:32PM +0200, George Bosilca wrote:
>
> On Jul 16, 2013, at 23:03 , Nathan Hjelm <hjelmn_at_[hidden]> wrote:
>
> > On Tue, Jul 16, 2013 at 10:22:33PM +0200, George Bosilca wrote:
> >> Nathan,
> >>
> >> I read your code and it's definitively looking good. I have however few minor issues with your patch.
> >>
> >> 1. MPI_Aint is unsigned as it must represent the difference between two memory arbitrary locations. In your MPI_Type_get_[true_]extent_x you go through size_t possibly reducing it's extent. I would suggest you used ssize_t instead.
> >> 2. In several other locations size_t is used as a conversion base. In some of these location there is even a comment talking about ssize_t ?
> >
> > I looked at the code in question and there shouldn't be an issue. Where we want to return MPI_Aint it is never converted to a size_t. The size_t is to ensure that if we return an MPI_Count that the value is never larger than SSIZE_MAX or negative. Am I wrong in assuming MPI_Count can never be negative?
>
> Based on the standard it is both a size and a displacement (including relative) in a file, so my understanding is that it can be negative.

Ugh, that isn't what I wanted to hear. MPI_Count can have the value of MPI_UNDEFINED which we define as -32766. Do we have to redefine this value to ensure there are no problems?

-Nathan