On Jul 2, 2013, at 4:58 PM, Fab Tillier <[email protected]> wrote:
Yes, and Dave highlighted the relevant section, specifically the paragraph starting on page 269 line 40: "This function is called by MPI_COMM_FREE ... to do whatever is needed to remove an attribute. The function returns ... an error code on failure (in which case MPI_COMM_FREE will fail)."
The second sentence defines behavior, and IMO eliminates any question as to the meaning "is called by".
FWIW, we have a comment in OMPI that we delete attributes at communicator "free" time (vs. communicator destruction time) for exactly this reason: /* Release attributes. We do this now instead of during the communicator destructor for 2 reasons: 1. The destructor will only NOT be called immediately during ompi_comm_free() if the reference count is still greater than zero at that point, meaning that there are ongoing communications. However, pending communications will never need attributes, so it's safe to release them directly here. 2. Releasing attributes in ompi_comm_free() enables us to check the return status of the attribute delete functions. At least one interpretation of the MPI standard (i.e., the one of the Intel test suite) is that if any of the attribute deletion functions fail, then MPI_COMM_FREE / MPI_COMM_DISCONNECT should also fail. We can't do that if we delay releasing the attributes -- we need to release the attributes right away so that we can report the error right away. */ -- Jeff Squyres [email protected] For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/