[mpich-devel] win_shared_noncontig test

Jeff Hammond jeff.science at gmail.com
Tue Jun 17 07:01:43 CDT 2014


On Tue, Jun 17, 2014 at 3:51 AM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
>
>
>
> On 17 June 2014 01:55, Dave Goodell (dgoodell) <dgoodell at cisco.com> wrote:
>>
>> This OMPI bug may be of note to the MPICH community:
>> https://svn.open-mpi.org/trac/ompi/ticket/4721
>>
>
> From a user point of view, I do not like that behaviour. I agree that the
> MPI implementation is free to allocate as much space it is convenient, but
> the size it reports back after a query is a different story. Does the MPI
> standard requires that the result query of the query is the exact allocated
> size? If not, I see more convenient to return the requested-at-allocation-
> time size the the allocated one. What's the use case of returning the exact
> allocated size? After all, I guess users cannot rely on "extra space" being
> available at the end of the buffer.

http://www.mpi-forum.org/docs/mpi-3.0/mpi30-report.pdf page 410
explicitly permits padding in the case of alloc_shared_noncontig=True.

The user can use exactly the amount in the window, which is either the
exact amount they requested or a slightly larger amount due to
padding.  What is wrong with that?

I think it is a very good idea to let users know how much memory is
being allocated, because this might cause them to improve their usage
of MPI.  For example, someone might think its a good idea to have a
C++ flag object in shared memory and allocate an 8-byte shared-memory
window in each object constructor.  They might think
alloc_shared_noncontig=True is an optimization, but the OS could
decide to round up to the page boundary.  Thus, the users lightweight
flag object is allocating 4096+n bytes instead of 8+n, where n is the
number of bytes in the object but not the window.  Exposing this
tidbit to the user might inspire them to allocate a pool for
shared-memory flag state that doesn't waste memory.  I suppose you
could complain about the implementation rounding up to page
boundaries, but this might be required by the OS, in which case you'll
have to complain to someone like Linus about it :-D

The MPI standard occasionally exposes low-level information to users
that is not necessarily helpful.  It is quite straightforward to
implement a library on top of MPI that hides this information if it is
considered detrimental to user experience.

Jeff

-- 
Jeff Hammond
jeff.science at gmail.com
http://jeffhammond.github.io/


More information about the devel mailing list