[MPICH2-dev] reference counting communicators
David Gingold
david.gingold at sicortex.com
Tue Nov 29 15:34:44 CST 2005
I've been puzzling over this one this afternoon:
Is it a programming error to call MPI_Comm_free() when there are
outstanding unmatched sends that reference the communicator?
The MPI spec seems to say that a communicator is not internally
deallocated until these sends are completed at the receive end. But
how is the implementation to know? The processes could try to check
their early send queues (or increment reference counts as early sends
arrive), but with an eager message implementation it's possible that
the unmatched sends could be in flight, not accounted for by the
sender or the receiver.
(And if MPI deallocates and later re-uses the communicator before the
sends are matched, we can construe a scenario where a receive
mistakenly matches a send from the old communicator.)
I believe this has implications for how MPICH2 must reference count
communicators in send and receive requests. If the MPI
implementation doesn't need to account for these stranded sends, then
we might avoid creating references to the communicator in some cases.
-dg
--
David Gingold
Principal Software Engineer
SiCortex
One Clock Tower Place, Suite 100
Maynard MA 01754
(978) 897-0214 x224
More information about the mpich2-dev
mailing list