1
1

Clean up the BML shutdown. Reviewed by George.

This commit was SVN r20586.
Этот коммит содержится в:
Jeff Squyres 2009-02-19 13:17:01 +00:00
родитель c43d2b6e67
Коммит 14a83a6bbc
5 изменённых файлов: 24 добавлений и 13 удалений

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

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2006 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -59,6 +60,7 @@ OMPI_DECLSPEC int mca_bml_base_ft_event(int state);
/*
* Globals
*/
extern int mca_bml_base_already_opened;
OMPI_DECLSPEC extern int mca_bml_base_output;
OMPI_DECLSPEC extern mca_bml_base_component_t mca_bml_component;
OMPI_DECLSPEC extern opal_list_t mca_bml_base_components_available;

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

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2006 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -23,10 +24,12 @@
int mca_bml_base_close( void )
{
int rc;
if (mca_bml_base_already_opened <= 0) {
return OMPI_ERROR;
} else if (--mca_bml_base_already_opened > 0) {
return OMPI_SUCCESS;
}
if(OMPI_SUCCESS != (rc = mca_btl_base_close()))
return rc;
return OMPI_SUCCESS;
return mca_btl_base_close();
}

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

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2006 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -28,6 +29,7 @@
#include "ompi/mca/bml/base/static-components.h"
#include "opal/mca/base/base.h"
int mca_bml_base_already_opened = 0;
opal_list_t mca_bml_base_components_available;
#if OMPI_ENABLE_DEBUG_RELIABILITY
@ -36,8 +38,13 @@ double mca_bml_base_error_rate_ceiling;
int mca_bml_base_error_count;
#endif
int mca_bml_base_open( void ) {
int mca_bml_base_open(void)
{
/* See if we've already been here */
if (++mca_bml_base_already_opened > 1) {
return OMPI_SUCCESS;
}
if(OMPI_SUCCESS !=
mca_base_components_open("bml", 0, mca_bml_base_static_components,
&mca_bml_base_components_available,

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

@ -12,7 +12,7 @@
* All rights reserved.
* Copyright (c) 2007 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -646,7 +646,8 @@ int mca_bml_r2_finalize( void )
mca_bml_r2.btl_progress = NULL;
}
mca_btl_base_close();
/* Do not close the BTL base here; the BML upper layer will take
care of that. */
return OMPI_SUCCESS;
}

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

@ -9,7 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -36,10 +36,8 @@ int mca_btl_base_close(void)
if( mca_btl_base_already_opened <= 0 ) {
return OMPI_ERROR;
} else {
if( --mca_btl_base_already_opened > 0 ) {
return OMPI_SUCCESS;
}
} else if (--mca_btl_base_already_opened > 0) {
return OMPI_SUCCESS;
}
/* disable event processing while cleaning up btls */
opal_event_disable();