1
1

Amendment to r22671: change the name of the new communicator flag from

INTERNAL to EXTRA_RETAIN, because not all "internal" communicators
have this flag set (only internal communicators with CIDs less than
their parent).  Hence, what this flag ''really'' means is that there
was an extra RETAIN performed on it.  So name the flag just that --
EXTRA_RETAIN -- indicating that an extra RETAIN has occurred.

This commit was SVN r22690.

The following SVN revision numbers were found above:
  r22671 --> open-mpi/ompi@61dee816db
Этот коммит содержится в:
Jeff Squyres 2010-02-23 21:24:07 +00:00
родитель 583394e30b
Коммит 5ec2d8764b
5 изменённых файлов: 17 добавлений и 17 удалений

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

@ -952,7 +952,7 @@ int ompi_comm_free ( ompi_communicator_t **comm )
{
int ret;
int cid = (*comm)->c_contextid;
int is_internal = OMPI_COMM_IS_INTERNAL(*comm);
int is_extra_retain = OMPI_COMM_IS_EXTRA_RETAIN(*comm);
/* Release attributes. We do this now instead of during the
@ -999,8 +999,8 @@ int ompi_comm_free ( ompi_communicator_t **comm )
}
OBJ_RELEASE ( (*comm) );
if ( is_internal) {
/* This communicator has been marked as an internal
if ( is_extra_retain) {
/* This communicator has been marked as an "extra retain"
* communicator. This can happen if a communicator creates
* 'dependent' subcommunicators (e.g. for inter
* communicators or when using hierarch collective

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

@ -489,7 +489,7 @@ int ompi_comm_activate ( ompi_communicator_t** newcomm,
*/
if ( OMPI_COMM_IS_INTER(*newcomm)) {
if ( OMPI_COMM_CID_IS_LOWER(*newcomm, comm)) {
OMPI_COMM_SET_INTERNAL (*newcomm);
OMPI_COMM_SET_EXTRA_RETAIN (*newcomm);
OBJ_RETAIN (*newcomm);
}
}

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

@ -256,10 +256,10 @@ int ompi_comm_finalize(void)
comm=(ompi_communicator_t *)opal_pointer_array_get_item(&ompi_mpi_communicators, i);
if ( NULL != comm ) {
/* Still here ? */
if ( !OMPI_COMM_IS_INTERNAL(comm)) {
if ( !OMPI_COMM_IS_EXTRA_RETAIN(comm)) {
/* For communicator that have been marked as internal, we do not further
* enforce to decrease the reference counter once more. These internal
/* For communicator that have been marked as "extra retain", we do not further
* enforce to decrease the reference counter once more. These "extra retain"
* communicators created e.g. by the hierarch or inter module did increase
* the reference count by one more than other communicators, on order to
* allow for deallocation with the parent communicator. Note, that

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

@ -10,7 +10,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2006-2010 University of Houston. All rights reserved.
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
* $COPYRIGHT$
@ -47,7 +47,7 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_communicator_t);
#define OMPI_COMM_DYNAMIC 0x00000040
#define OMPI_COMM_INVALID 0x00000080
#define OMPI_COMM_PML_ADDED 0x00000100
#define OMPI_COMM_INTERNAL 0x00000200
#define OMPI_COMM_EXTRA_RETAIN 0x00000200
/* some utility #defines */
#define OMPI_COMM_IS_INTER(comm) ((comm)->c_flags & OMPI_COMM_INTER)
@ -59,13 +59,13 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_communicator_t);
#define OMPI_COMM_IS_DYNAMIC(comm) ((comm)->c_flags & OMPI_COMM_DYNAMIC)
#define OMPI_COMM_IS_INVALID(comm) ((comm)->c_flags & OMPI_COMM_INVALID)
#define OMPI_COMM_IS_PML_ADDED(comm) ((comm)->c_flags & OMPI_COMM_PML_ADDED)
#define OMPI_COMM_IS_INTERNAL(comm) ((comm)->c_flags & OMPI_COMM_INTERNAL)
#define OMPI_COMM_IS_EXTRA_RETAIN(comm) ((comm)->c_flags & OMPI_COMM_EXTRA_RETAIN)
#define OMPI_COMM_SET_DYNAMIC(comm) ((comm)->c_flags |= OMPI_COMM_DYNAMIC)
#define OMPI_COMM_SET_INVALID(comm) ((comm)->c_flags |= OMPI_COMM_INVALID)
#define OMPI_COMM_SET_PML_ADDED(comm) ((comm)->c_flags |= OMPI_COMM_PML_ADDED)
#define OMPI_COMM_SET_INTERNAL(comm) ((comm)->c_flags |= OMPI_COMM_INTERNAL)
#define OMPI_COMM_SET_EXTRA_RETAIN(comm) ((comm)->c_flags |= OMPI_COMM_EXTRA_RETAIN)
/* a set of special tags: */

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

@ -269,11 +269,11 @@ int mca_coll_hierarch_module_enable (mca_coll_base_module_t *module,
goto exit;
}
if ( OMPI_COMM_CID_IS_LOWER ( lcomm, comm ) ) {
/* Mark the communicator as 'interna' and increase the
/* Mark the communicator as 'extra retain' and increase the
reference count by one more. See ompi_comm_activate
for detailed comments
*/
OMPI_COMM_SET_INTERNAL (lcomm);
OMPI_COMM_SET_EXTRA_RETAIN (lcomm);
OBJ_RETAIN(lcomm);
}
@ -315,11 +315,11 @@ int mca_coll_hierarch_module_enable (mca_coll_base_module_t *module,
goto exit;
}
if ( OMPI_COMM_CID_IS_LOWER ( llcomm, comm ) ) {
/* Mark the communicator as 'internal' and increase the
/* Mark the communicator as 'extra retain' and increase the
reference count by one more. See ompi_comm_activate
for detailed explanation.
*/
OMPI_COMM_SET_INTERNAL (llcomm);
OMPI_COMM_SET_EXTRA_RETAIN (llcomm);
OBJ_RETAIN(llcomm);
}
@ -518,10 +518,10 @@ struct ompi_communicator_t* mca_coll_hierarch_get_llcomm (int root,
return NULL;
}
if ( OMPI_COMM_CID_IS_LOWER ( llcomm, hierarch_module->hier_comm ) ) {
/* Mark the communicator as 'interna' and increase the
/* Mark the communicator as 'extra retain' and increase the
reference count by one more. See ompi_comm_activate
for detailed explanation. */
OMPI_COMM_SET_INTERNAL (llcomm);
OMPI_COMM_SET_EXTRA_RETAIN (llcomm);
OBJ_RETAIN(llcomm);
}