-
Notifications
You must be signed in to change notification settings - Fork 921
MPI 4: Add MPI_COMM_TYPE_HW_UNGUIDED and MPI_COMM_TYPE_HW_GUIDED #10630
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
Conversation
8236b2a
to
c93f38d
Compare
General question about |
I don't think we're isolating all MPI-4 features -- e.g., sessions support is built and included, regardless of My impression of using As a more concrete example: we probably do not want to emit deprecation warnings about canceling an MPI_Send request while Open MPI claims MPI-3.x conformance, because that behavior is not deprecated until MPI-4.0. We could warn about the upcoming deprecation -- i.e., emit a message something like "Although this version of Open MPI is MPI-3.whatever conformant, future versions of Open MPI will be MPI-4.0 conformant, and therefore canceling a send request will be deprecated. You should update your code!" But that seems pretty bulky / doesn't feel like it's worth it / might even end up confusing the user (i.e., warning about something that -- in the current version of Open MPI -- is perfectly valid). Hence, we put |
Good point. I'll take them out and repush. |
c93f38d
to
3e50202
Compare
Done. Ready for review. Once this is merged, then I'll file an enhancement to improve the implementation of |
@@ -65,6 +65,8 @@ int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, | |||
} | |||
|
|||
if ( MPI_COMM_TYPE_SHARED != split_type && // Same as OMPI_COMM_TYPE_NODE | |||
MPI_COMM_TYPE_HW_UNGUIDED != split_type && | |||
MPI_COMM_TYPE_HW_GUIDED != split_type && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not iterating directly over ompi_comm_split_type_hw_guided_support
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ompi_comm_split_type_hw_guided_support
doesn't include MPI_COMM_TYPE_HW_(UN)GUIDED
or MPI_UNDEFINED
So it wouldn't be a complete list.
We could make a little helper function to handle the set that is covered (like bool ompi_comm_is_valid_split_type(int split_type)
) I'm not sure it buys us much though since this is the only place that would be using it.
3e50202
to
8804c04
Compare
* `MPI_COMM_TYPE_HW_GUIDED` supports all of the existing `OMPI_COMM_TYPE_` options. * `MPI_COMM_TYPE_HW_UNGUIDED` is recognized, but not supported so it returns `MPI_COMM_NULL` indidicating that the MPI library cannot split the communicator any further. Signed-off-by: Joshua Hursey <[email protected]>
8804c04
to
19e24fa
Compare
* Stage 0: Recognized, but not implemented. | ||
* Stage 1: Do better than that | ||
*/ | ||
if (MPI_COMM_TYPE_HW_UNGUIDED == global_split_type) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A quick and simple solution to this. Add a field to ompi_communicator_t
after c_epoch
(there is room for exactly 4 bytes) and store the type used on the communicator creation (inherit from the parent for duplication, and set to undefined otherwise). Then use this type to go down the ompi_comm_split_type_hw_guided_support
for the next level in the hierarchy. It might work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good idea. I would like to experiment with that as a second effort (after this PR is merged). I'm going to talk with someone today that might have some cycles in the near term to work on it. Otherwise, I might take a crack at it.
(edit) I just filed Issue #10635 to track the "unguided" mode improvement.
@jjhursey Something seems to be wrong. As per the MPI-4 standard, Reproducerfrom mpi4py import MPI
comm = MPI.COMM_SELF.Split_type(MPI.COMM_TYPE_SHARED, info=MPI.INFO_NULL)
comm.Free()
info = MPI.Info.Create()
info.Set("mpi_hw_resource_type", "mpi_shared_memory")
comm = MPI.COMM_SELF.Split_type(MPI.COMM_TYPE_HW_GUIDED, info=info)
comm.Free() Output
|
Humm. That was working fine in the test I was using (it was in C not Python, but I'm not sure that should matter). Let me investigate. |
I see the problem. It must have cropped up in the re-organization (it's looking at the original split type not the adjusted split type). I'm working on a patch now. |
@dalcinl I posted a fix in #10681 I posted the C test program to the |
MPI_COMM_TYPE_HW_GUIDED
supports all of the existingOMPI_COMM_TYPE_
options.
MPI_COMM_TYPE_HW_UNGUIDED
is recognized, but not supported so it returnsMPI_COMM_NULL
indidicating that the MPI library cannot split thecommunicator any further.
Signed-off-by: Joshua Hursey [email protected]