On Jul 16, 2013, at 23:03 , Nathan Hjelm <hje...@lanl.gov> 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. George. > If so I can change the checks in MPI_Type_get_[true_]_extent_x to not loose > this value. > > The other places that use size_t (MPI_Get_elements for example) are in places > where I beleive the value will never legally be negative so it is safe to > assume the returned value should be MPI_UNDEFINED in those cases. Is there a > particular case I should look at? > > -Nathan > > _______________________________________________ > devel mailing list > de...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/devel