I agree that MPI_COMM_FREE on the parent intercommunicator is
fairly useless. We have essentially deprecated MPI_COMM_FREE
in favor of MPI_COMM_DISCONNECT. I'd be happy to put in an
advice to users to this effect if there is no objection.
Seems to me though that disallowing COMM_FREE would just
confuse the issue (because it would be a special case
with no precedent).
Do any implementors expect that MPI_COMM_DISCONNECT might be
substantially more expensive than MPI_COMM_FREE? If so, there
is one case where a library might want to use COMM_FREE for its
side effect of hiding the fact that there is a parent.
For instance, user code might do:
MPI_Comm_get_parent(&parent);
if (parent == MPI_COMM_NULL) {
/* I'm a parent... */
spawn children...
} else {
/* I'm a child ... */
be a child
}
Now imagine that the parent is spawned by a library that wants
to allow the above user code to work.
The hiding can also be done with MPI_COMM_DISCONNECT, so the
only benefit to COMM_FREE might be performance.
I'm not advocating we recommend COMM_FREE for this, just trying
to make sure we don't miss anything.
Bill