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

Add Buffer type, improve Datatype handling #329

Merged
merged 1 commit into from
Jan 3, 2020
Merged

Add Buffer type, improve Datatype handling #329

merged 1 commit into from
Jan 3, 2020

Conversation

simonbyrne
Copy link
Member

This contains two related changes:

  1. Defines a specific Buffer type, which contains the reference to the storage buffer, its count and datatype. This allows us to simplify the type signatures of various functions, as count and datatype no longer need to be arguments to the functions. This also adds default conversion methods for Arrays and Subarrays (creating the derived datatypes where necessary, and determining the appropriate counts), and moves the point-to-point operations to use these conversions.

  2. Improves the handling of Datatype handles, by making them garbage-collected objects (like other MPI handles), moves lower-level functions to a submodule, defines consistent interfaces. Also fixes MPI crashing when buffer contains a reference to nothing #327.

I still need to move the collective calls over as well, however that will require more thought on how to handle the "chunked" operations like scatter/gather.

I also removed the inverse dictionary mappings from MPI Datatype -> Julia Type, as that is no longer so easy to determine.

@simonbyrne simonbyrne force-pushed the sb/buffer branch 5 times, most recently from 1f911c6 to 89609b8 Compare January 2, 2020 18:53
This contains two related changes:

1. Defines a specific `Buffer` type, which contains the reference to the storage buffer, its count and datatype. This allows us to simplify the type signatures of various functions, as `count` and `datatype` no longer need to be arguments to the functions. This also adds default conversion methods for `Array`s and `Subarray`s (creating the derived datatypes where necessary, and determining the appropriate `count`s), and moves the point-to-point operations to use these conversions.

2. Improves the handling of `Datatype` handles, by making them garbage-collected objects (like other MPI handles), moves lower-level functions to a submodule, defines consistent interfaces. Also fixes #327.

I still need to move the collective calls over as well, however that will require more thought on how to handle the "chunked" operations like scatter/gather.

I also removed the inverse dictionary mappings from MPI Datatype -> Julia Type, as that is no longer so easy to determine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MPI crashing when buffer contains a reference to nothing
1 participant