MPI groups and communicators
Dec. 11th, 2006 08:42 pmInvestigating a problem with one of my MPI codes — it abended with a communicator error when I increased the number of CPUs — I uncovered an interesting difference between groups and communicators: it seems that groups are defined on all processors, regardless of whether they're members of the group, whereas communicators are only valid on processors within the group. Thus my code, which checked the validity of the group rather than the communicator, kept crashing in
When you think about it, it's actually kinda obvious why it works the way it does: the invalid communicator provides an easy test for group membership.
MPI_Comm_free() whilst attempting to free MPI_COMM_NULL because it foolishly tried to free up memory on all processors, rather than just group members.When you think about it, it's actually kinda obvious why it works the way it does: the invalid communicator provides an easy test for group membership.