1
1

adding the correct calling of attr-copy and attr-delete functions to comm_set and comm_free.

This commit was SVN r1411.
Этот коммит содержится в:
Edgar Gabriel 2004-06-18 15:29:50 +00:00
родитель 900024ec17
Коммит 392115b9d5

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

@ -100,18 +100,21 @@ ompi_communicator_t * ompi_comm_set ( ompi_communicator_t* oldcomm,
newcomm->c_cube_dim = ompi_cube_dim(newcomm->c_local_group->grp_proc_count); newcomm->c_cube_dim = ompi_cube_dim(newcomm->c_local_group->grp_proc_count);
/* Set Topology, if required */ /* Set Topology, if required */
if ( NULL != topomodule ) { if ( NULL != topomodule ) {
if (OMPI_COMM_IS_CART ( oldcomm ) ) if (OMPI_COMM_IS_CART ( oldcomm ) )
newcomm->c_flags |= OMPI_COMM_CART; newcomm->c_flags |= OMPI_COMM_CART;
if (OMPI_COMM_IS_GRAPH ( oldcomm ) ) if (OMPI_COMM_IS_GRAPH ( oldcomm ) )
newcomm->c_flags |= OMPI_COMM_GRAPH; newcomm->c_flags |= OMPI_COMM_GRAPH;
/* set the topo-module */ /*set the topo-module */
} }
/* Copy attributes and call according copy functions, /* Copy attributes and call according copy functions,
if required */ if required */
ompi_attr_hash_init(&newcomm->c_keyash);
if ( attr != NULL ) { if ( attr != NULL ) {
ompi_attr_copy_all (COMM_ATTR, oldcomm, newcomm, attr, newcomm->c_keyhash);
} }
/* Initialize the PML stuff in the newcomm */ /* Initialize the PML stuff in the newcomm */
@ -610,10 +613,9 @@ static int ompi_comm_allgather_emulate_intra( void *inbuf, int incount,
int ompi_comm_free ( ompi_communicator_t **comm ) int ompi_comm_free ( ompi_communicator_t **comm )
{ {
#if 0
/* Release attributes */ /* Release attributes */
ompi_attr_delete_all ( COMM_ATTR, comm ); ompi_attr_delete_all ( COMM_ATTR, comm, comm->c_keyhash );
#endif OBJ_RELEASE(comm->c_keyhash);
/* Release the communicator */ /* Release the communicator */
OBJ_RELEASE ( comm ); OBJ_RELEASE ( comm );