pmodels/mpich

MPI_Comm_split_type with MPI_COMM_TYPE_HW_GUIDED seems inconsistent

Opened this issue · 0 comments

The current implementation leads to the (in my opinion) weird behavior that using MPI_Comm_split_type with MPI_COMM_TYPE_HW_GUIDED

  • and setting the `info` to `mpi_hw_resource_type = mpi_shared_memory` one gets a valid new communicator
    
  • while setting the `info` to `mpi_hw_resource_type = Package` leads to `MPI_COMM_NULL` on a system with only one package (since there is no proper subset) and the `if` statement at https://github.com/pmodels/mpich/blob/b53cc3fb5bb36aac7c244ba6d65ee2fdf3df8a44/src/mpi/comm/comm_split_type.c#L180C5-L180C7
    

At least that is how I read the code and what my experiments showed (on a server and my laptop).

My understanding of the MPI standard is that for MPI_COMM_TYPE_HW_GUIDED no proper subset is required

The MPI implementation will return in the group of the output communicator newcomm the largest subset of MPI processes that match the splitting criterion.