[Mpi-forum] "BigCount" rendering in PDF
Joseph Schuchart
schuchart at hlrs.de
Wed Jul 31 03:31:37 CDT 2019
Jeff,
The first look at the definitions might indeed be a bit confusing, as it
is strange to see overloaded C functions (even though C11 _Generic has
been around for a while). It is also not clear when the second variant
(using MPI_Count) is available, that is only if C11 _Generic is
supported by my compiler. Even worse, a C99 compiler will happily cast
an MPI_Count argument passed by value to int without complaint or
warning by default. Should we mark in the interface the fact that the
MPI_Count overloads are only available in C11? I'm thinking about
something similar to cppreference's distinction between C/C++ standard
versions, e.g.,
```
int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int
dest, int tag, MPI_Comm comm)
int MPI_Send(const void *buf, MPI_Count count, MPI_Datatype datatype,
int dest, int tag, MPI_Comm comm) [>C11|C++]
int MPI_Send_x(const void *buf, MPI_Count count, MPI_Datatype datatype,
int dest, int tag, MPI_Comm comm)
```
That way it is immediately clear that there is a catch here and users
have to be careful. OpenShmem, for example, has that distinction too
(although more explicit using paragraphs for different language flavors).
Cheers,
Joseph
On 7/30/19 6:13 PM, Jeff Squyres (jsquyres) via mpi-forum wrote:
> _*SHORT VERSION*_
>
> See the attached two PDFs for how "BigCount" will be rendered in the
> MPI-4.0 PDF (pt2pt chapter and pt2pt/external interfaces in Annex A).
>
> Comments / suggestions are welcome, but you may only make comments /
> suggestions if you have read all of the "MORE DETAIL" section, below.
>
> _*MORE DETAIL*_
>
> We have split the work of the "BigCount" WG into two parts:
>
> 1. Updating all the bindings throughout the entire MPI spec. This is
> further sub-divided into two parts:
> 1a. Updating the bindings in the chapters of the MPI spec.
> 1b. Updating the bindings listing in Annex A.
>
> 2. Updating text in various chapters (e.g., Terms&Conventions and
> Language Bindings) describing BigCount, language consequences,
> describing how the bindings appear in the rest of the doc, ...etc.
>
> We've incorporated all the feedback from the BigCount Virtual Meeting
> last week, and I'd like to share samples of how #1a and #1b will look in
> the MPI 4.0 PDF.
>
> Text for #2 will be read at the September meeting (stay tuned -- that
> text will be published according to the normal 2-week deadline, etc.).
>
> Attached are 2 documents:
>
> 1. The point-to-point chapter rendered in the new style. Look at the
> bindings for MPI_SEND and MPI_RECV, for example.
>
> 2. Annex A rendered in the new style (only some of the bindings have
> been updated so far -- such as pt2pt and external interfaces).
>
> If you are confused when looking at these PDFs (e.g., why are there up
> to 3 C bindings?), and/or if you weren't at the Virtual Meeting / didn't
> watch the Webex after the fact, the feedback we received from the
> Virtual Meeting is summarized below. It is a lot of wordswordswords and
> is somewhat difficult to follow -- I highly suggest reading the rules
> below while simultaneously examining the attached PDFs. The summary
> below should make much more sense when looking at concrete examples.
>
> -----
>
> The overall intent is:
>
> A. In MPI-4.0, expose "BigCount" functionality through language
> polymorphism in the C bindings and the mpi_f08 module (we are /_not_/
> updating mpif.h or the mpi module).
>
> B. C11 _Generic polymorphism kinda sucks, *and* we're in a transition
> period where not all C compilers are C11-capable. Hence, we're exposing
> up to *3* C bindings per MPI procedure to applications (including
> explicitly exposing the "_x" variant where relevant).
>
> C. Fortran polymorphism "just works" (skipping a longer explanation here
> -- ask Rolf/Puri if you're interested in the details), so there will
> only be up to *2* F08 bindings per MPI procedure.
>
> -----
>
> For each binding in the main text of the document:
>
> 1. Show the "plain" MPI_Foo(...) C binding (e.g., as it appeared in MPI-3.1)
>
> 2. If the binding has count or displacement arguments:
> 2a. Show a second MPI_Foo() C binding with count and displacement
> arguments as MPI_Count and MPI_Aint, respectively.
> 2b. If MPI_Foo() DOES NOT HAVE a corresponding MPI_Foo_x() in
> MPI-3.1, show a third MPI_Foo_x(...) C binding with count/displacement
> as MPI_Count/MPI_Aint.
>
> 3. Show the "plain" MPI_Foo(...) F08 binding (e.g., as it appeared in
> MPI-3.1)
>
> 4. If the binding has count or displacement arguments:
> 4a. Show a second MPI_Foo() F08 binding with count and displacement
> arguments as INTEGER(KIND=MPI_COUNT_KIND) and INTEGER(MPI_ADDRESS_KIND),
> respectively.
>
> 5. Show the "plain" F90 binding
>
> -----
>
> References:
>
> - Slides we presented at the BigCount Virtual Meeting:
> https://docs.google.com/presentation/d/10D_ws5NYAOI8m6KZKb31s9HxiSSmc_k5C620Cuy3brY/edit
>
> - Webex Recording of the BigCount Virtual Meeting:
> https://www.mpi-forum.org/virtual_meetings/
>
> - Froozle MPI, a no-op MPI implementation showing a bindings
> implementation of BigCount: https://github.com/jsquyres/froozle-mpi
>
> If you have read all the way down to this point, comments and feedback
> are welcome. :-)
>
> --
> Jeff Squyres
> jsquyres at cisco.com <mailto:jsquyres at cisco.com>
>
>
> _______________________________________________
> mpi-forum mailing list
> mpi-forum at lists.mpi-forum.org
> https://lists.mpi-forum.org/mailman/listinfo/mpi-forum
>
More information about the mpi-forum
mailing list