On 12/3/21 5:53 PM, Jed Brown wrote:
Ah, interesting. I guess mpi_comm_split() might also have the advantage
that each rank only needs to know if it is in the group or not, rather
than needing an array of all participating ranks, as mpi_comm_create()
and mpi_comm_create_group() do.
That's exactly why it's often more convenient. But it is collective on the
parent communicator.
Yes, I was a bit concerned about that after reading this (from
https://cvw.cac.cornell.edu/MPIAdvTopics/subdividing):
" ...the MPI specification states that the call to MPI_Comm_create must
be executed by all processes in the input communicator (in our case,
MPI_COMM_WORLD), and that all processes must pass the same value for the
group argument (grp), even if they do not belong to the new group. This
can be a dire problem with a very large number of processes, such as are
found in petascale systems, so MPI_COMM_CREATE_GROUP was introduced in
MPI-3 to alleviate this problem."
- Adrian
--
Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email: a.crouc...@auckland.ac.nz
tel: +64 (0)9 923 4611