1
1

Do not destroy the sub-communicator until we have freed its attributes,

per the reason cited in the comment in the code.

This commit was SVN r28724.
Этот коммит содержится в:
Jeff Squyres 2013-07-05 12:15:03 +00:00
родитель 483ed8da8c
Коммит b417095639

Просмотреть файл

@ -1111,7 +1111,6 @@ int ompi_comm_free( ompi_communicator_t **comm )
int cid = (*comm)->c_contextid;
int is_extra_retain = OMPI_COMM_IS_EXTRA_RETAIN(*comm);
/* Release attributes. We do this now instead of during the
communicator destructor for 2 reasons:
@ -1130,10 +1129,6 @@ int ompi_comm_free( ompi_communicator_t **comm )
we delay releasing the attributes -- we need to release the
attributes right away so that we can report the error right
away. */
if ( OMPI_COMM_IS_INTER(*comm) ) {
ompi_comm_free (&(*comm)->c_local_comm);
}
if (NULL != (*comm)->c_keyhash) {
ret = ompi_attr_delete_all(COMM_ATTR, *comm, (*comm)->c_keyhash);
if (OMPI_SUCCESS != ret) {
@ -1142,6 +1137,10 @@ int ompi_comm_free( ompi_communicator_t **comm )
OBJ_RELEASE((*comm)->c_keyhash);
}
if ( OMPI_COMM_IS_INTER(*comm) ) {
ompi_comm_free (&(*comm)->c_local_comm);
}
/* Special case: if we are freeing the parent handle, then we need
to set our internal handle to the parent to be equal to
COMM_NULL. This is according to MPI-2:88-89. */