Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Predefined datatypes for MPI_Count and friends #109

Closed
jdinan opened this issue Sep 21, 2018 · 13 comments
Closed

Predefined datatypes for MPI_Count and friends #109

jdinan opened this issue Sep 21, 2018 · 13 comments
Assignees
Labels
wg-large-counts Large Counts Working Group

Comments

@jdinan
Copy link

jdinan commented Sep 21, 2018

Problem

We don't have MPI predefined datatypes for MPI_Count, MPI_Aint, and the other opaque types (see pg. 683 of MPI 3.1).

Proposal

Add predefined datatypes for these MPI types so they can be communicated.

Changes to the Text

TBD

Impact on Implementations

Should be easy to implement.

Impact on Users

Happiness.

References

@dholmes-epcc-ed-ac-uk
Copy link
Member

potentially others

Such as MPI_Group, MPI_Comm, MPI_Request? Interesting use-cases for serialising MPI opaque handles, sending them to other ranks, and de-serialising them into a working object.

I particularly like the idea of triggering a message transfer (e.g. Bcast) between some remote MPI processes using the MPI_Request handle for a persistent collective operation created by one of those MPI processes (e.g. root of Bcast) and sent to the local MPI process. I can't immediately think of a compelling use-case but standardising datatypes for "others" can only lead to good things.

@dholmes-epcc-ed-ac-uk
Copy link
Member

The comment on #107 also applies to this issue: if MPI_COUNT and MPI_AINT are replaced with size_t and ptrdiff_t (and we get the datatype naming rule intended to cover the FP16 case) then no new pre-defined types are needed.

@jeffhammond
Copy link
Member

jeffhammond commented Sep 22, 2018 via email

@tonyskjellum
Copy link

tonyskjellum commented Sep 22, 2018 via email

@mhoemmen
Copy link

mhoemmen commented Sep 22, 2018

Wait, hold on, I know I'm a newbie here, but I see a big difference between serializing a group (really just a finite set of integers) and serializing a comm. Group is to comm like (path, offset) is to FILE* in C. FILE* doesn't just point to a path and an offset; it has local things like buffers that aren't useful to serialize.

I see this distinction between "unrealized potential thing" (e.g., group) and "realized active thing" (e.g., comm) as useful for fault tolerance. Realization queries availability of claimed resources. Opening a file asks whether the file is still there. Creating a comm means that MPI is in a sane enough state that it can turn a group into a comm.

@bosilca
Copy link
Member

bosilca commented Sep 22, 2018

Objects where serialization/deserialization make sense already have such support (datatypes), or there is a way to achieve it under special circumstances (such as MPI_Group where one can always translate ranks to a common underlying communicator such as MPI_COMM_WORLD, or for dynamic cases some user-level "universe" communicator). For everything else I agree with @jeffhammond, the MPI handles should remains opaque to users.

@jeffhammond
Copy link
Member

I agree that MPI_Group can be (de)serialized because it is really just an array of ranks, but why then does MPI need to provide a method for this? Users who want to (de)serialize these things can easily do so manually. Following the usual prescription, I'd like to see a use case where this is required and a comparison of the implementation of (de)serialization above and below MPI before making any decision about whether this is worthwhile.

@jeffhammond
Copy link
Member

@jdinan Dumb question but is this proposal hetero-safe? Is MPI_Aint guaranteed to be the same size everywhere even when running on a collection of 32- and 64-bit systems?

@tonyskjellum
Copy link

tonyskjellum commented Sep 23, 2018 via email

@jeffhammond
Copy link
Member

@tonyskjellum My use of "dumb question but..." is often a rhetorical device rather than an actual dumb question 😉

In any case, I am open to the idea of deprecating heterogeneous support in MPI but we should start by doing that rather than introducing features that would break it.

@jdinan
Copy link
Author

jdinan commented Sep 25, 2018

Opaque types listed on pg. 683 of MPI 3.1. I should know better than to file open-ended issues. 🤦‍♂️

@raffenet
Copy link

raffenet commented Dec 5, 2018

Just to be clear, MPI_AINT, MPI_COUNT, and MPI_OFFSET are defined for both C and Fortran. See pgs 673-674.

@jdinan
Copy link
Author

jdinan commented Dec 5, 2018

@raffenet You're right. I'm not sure how we missed this in Barcelona. Sounds like this issue can be closed?

@jdinan jdinan closed this as completed Dec 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wg-large-counts Large Counts Working Group
Projects
None yet
Development

No branches or pull requests

7 participants