sawyl: (Default)
[personal profile] sawyl
Investigating 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 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.
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

sawyl: (Default)
sawyl

August 2018

S M T W T F S
   123 4
5 6 7 8910 11
12131415161718
192021222324 25
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 5th, 2026 06:57 am
Powered by Dreamwidth Studios