-
Notifications
You must be signed in to change notification settings - Fork 879
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
Not all communicators subscribe to info keys #13067
Comments
@devreal what about the dynamic communicator creation functions? Spawn, Join and Connect/Accept? |
I don't see the subscriber mechanism used in https://github.com/open-mpi/ompi/blob/main/ompi/dpm/dpm.c |
Shouldn't it be used however? Comm_spawn and friends take an info object as an argument as well |
Yes, it is being used. The info object is queried for various info keys (starting at https://github.com/open-mpi/ompi/blob/main/ompi/dpm/dpm.c#L929) but as far as I can tell they are never added to the communicator so asking for them will not return anything. And of course things like allow-overtake seem to be dropped entirely. I believe we have to make these keys available for query later so the application can see if we understood them. |
|
@bosilca regarding Comm_spawn, MPI4.1 does make the explicit statement that the memory_alloc_kind info object can be passed to COmm_spawn as well, so we might need to add that ability:
|
I have a different understanding of that statement. Yes, the memkind info key applies to the newly created world but not to the intercomm resulting from the |
Yes. We can ignore them everywhere. Or flip a coin and pretend we don't know any of the keys. Neither is what our users expect. |
we're not disagreeing there. I just pointed out that this is not a bug, or a divergence from the MPI standard requirements. |
We should probably bring this up in the hybrid working group to clarify the expected behavior. I am fine either way to be honest, its not like Comm_spawn is used thaat heavily. |
While reviewing #12189 I found what seems to be a discrepancy in the info key handling between communicators created with different functions. Some communicators subscribe to the info keys, some only copy them. When subscribed, the communicator will get notified of updates when the user calls
MPI_Comm_set_info
. Otherwise, no such update happens and we don't even parse the info keys. Some time ago we fixed the handling ofmpi_assert_allow_overtake
so that it can be set once after the communicator has been created (#9843) so that is a valid use-case.Here is the list of functions that support changing info keys through
MPI_Comm_set_info
:ompi_comm_dup_with_info
(https://github.com/open-mpi/ompi/blob/main/ompi/communicator/comm.c#L1348) andompi_comm_split_type_core
(incl.ompi_comm_split_with_info
,ompi_comm_split_unguided
) (https://github.com/open-mpi/ompi/blob/main/ompi/communicator/comm.c#L995): MPI_Comm_dup_with_info,
MPI_Comm_dup,
MPI_Comm_split_type`, and some han, acoll, and rdma communicator.The list of functions that do not support it:
ompi_comm_create_w_info
, which only copies the info objects (https://github.com/open-mpi/ompi/blob/main/ompi/communicator/comm.c#L446):MPI_Comm_create
ompi_comm_split_with_info
, which only copies the info objects (https://github.com/open-mpi/ompi/blob/main/ompi/communicator/comm.c#L703):MPI_Comm_split
(throughompi_comm_split
) and internal HAN and acoll communicators.We should probably harmonize that in some way, i.e., always subscribe to the info keys. For internal communicators that will never have other info keys set we could pass a flag to suppress. However, it's strange that setting
mpi_assert_allow_overtake
on a communicator created withMPI_Comm_dup
would work while it wouldn't work on a communicator created withMPI_Comm_create
.The text was updated successfully, but these errors were encountered: