-
Notifications
You must be signed in to change notification settings - Fork 127
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
Encapsulate multi-process communication (part 2) #1817
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use value `0` for consistency with `MPI_DATATYPE_NULL` and increment the index of other "op" constants.
bradking
force-pushed
the
mpi-encapsulation
branch
from
October 8, 2019 18:37
4d26c23
to
b5605b0
Compare
Create a dedicated header to hold functions to convert between the Comm encapsulation and MPI_Comm. In the future the main Comm header will not need to include raw MPI interfaces at all.
Move the MPI-backed implementation into a separate file. Use an abstraction layer with runtime dispatch so that the main Comm does not need MPI. Note that we still use a few MPI types and constants in the Comm interface, but those can be refactored later.
It was used only inside our own implementation in one place, and its implementation was just a thin wrapper around our `Allgather` interface, so simply use that directly.
With our general `Gatherv` interface we no longer need a per-type specialization of `GathervArrays`.
With our general `Gather` interface we no longer need a per-type specialization of `GatherArrays`.
With our general `Reduce` interface we no longer need a per-type specialization of `ReduceValues`.
With our general `Bcast` interface we no longer need a per-type specialization of `BroadcastValue`.
With our general `Bcast` interface we no longer need a per-type specialization of `BroadcastVector`.
Avoid explicitly passing `sizeof(T)` to `Bcast`.
Create a Comm implementation for serial programs. Use implementations inspired by `source/adios2/helper/mpidummy.cpp`.
If `CommFromMPI()` is given `MPI_COMM_NULL`, fall back to `CommDummy()` instead.
bradking
force-pushed
the
mpi-encapsulation
branch
from
October 9, 2019 13:10
b5605b0
to
c47c2b9
Compare
chuckatkins
reviewed
Oct 10, 2019
This was referenced Nov 1, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Continue work started in #1691 to encapsulate multi-process communication behind a
helper::Comm
API:helper::Comm
and offer equivalents publicly.helper::Comm
. Add APIs to the latter as needed. * Abstract thehelper::Comm
implementation internally to work with either MPI or a dummy backend.helper::Comm
in coreADIOS
,IO
, andStream
interfaces.ADIOSMPI.h
to only places that still use MPI directly.