Clean up the BML shutdown. Reviewed by George.
This commit was SVN r20586.
Этот коммит содержится в:
родитель
c43d2b6e67
Коммит
14a83a6bbc
@ -9,6 +9,7 @@
|
|||||||
* University of Stuttgart. All rights reserved.
|
* University of Stuttgart. All rights reserved.
|
||||||
* Copyright (c) 2004-2006 The Regents of the University of California.
|
* Copyright (c) 2004-2006 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -59,6 +60,7 @@ OMPI_DECLSPEC int mca_bml_base_ft_event(int state);
|
|||||||
/*
|
/*
|
||||||
* Globals
|
* Globals
|
||||||
*/
|
*/
|
||||||
|
extern int mca_bml_base_already_opened;
|
||||||
OMPI_DECLSPEC extern int mca_bml_base_output;
|
OMPI_DECLSPEC extern int mca_bml_base_output;
|
||||||
OMPI_DECLSPEC extern mca_bml_base_component_t mca_bml_component;
|
OMPI_DECLSPEC extern mca_bml_base_component_t mca_bml_component;
|
||||||
OMPI_DECLSPEC extern opal_list_t mca_bml_base_components_available;
|
OMPI_DECLSPEC extern opal_list_t mca_bml_base_components_available;
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
* University of Stuttgart. All rights reserved.
|
* University of Stuttgart. All rights reserved.
|
||||||
* Copyright (c) 2004-2006 The Regents of the University of California.
|
* Copyright (c) 2004-2006 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -23,10 +24,12 @@
|
|||||||
int mca_bml_base_close( void )
|
int mca_bml_base_close( void )
|
||||||
{
|
{
|
||||||
int rc;
|
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 mca_btl_base_close();
|
||||||
return rc;
|
|
||||||
|
|
||||||
return OMPI_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
* University of Stuttgart. All rights reserved.
|
* University of Stuttgart. All rights reserved.
|
||||||
* Copyright (c) 2004-2006 The Regents of the University of California.
|
* Copyright (c) 2004-2006 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -28,6 +29,7 @@
|
|||||||
#include "ompi/mca/bml/base/static-components.h"
|
#include "ompi/mca/bml/base/static-components.h"
|
||||||
#include "opal/mca/base/base.h"
|
#include "opal/mca/base/base.h"
|
||||||
|
|
||||||
|
int mca_bml_base_already_opened = 0;
|
||||||
opal_list_t mca_bml_base_components_available;
|
opal_list_t mca_bml_base_components_available;
|
||||||
|
|
||||||
#if OMPI_ENABLE_DEBUG_RELIABILITY
|
#if OMPI_ENABLE_DEBUG_RELIABILITY
|
||||||
@ -36,7 +38,12 @@ double mca_bml_base_error_rate_ceiling;
|
|||||||
int mca_bml_base_error_count;
|
int mca_bml_base_error_count;
|
||||||
#endif
|
#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 !=
|
if(OMPI_SUCCESS !=
|
||||||
mca_base_components_open("bml", 0, mca_bml_base_static_components,
|
mca_base_components_open("bml", 0, mca_bml_base_static_components,
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2007 Los Alamos National Security, LLC. All rights
|
* Copyright (c) 2007 Los Alamos National Security, LLC. All rights
|
||||||
* reserved.
|
* reserved.
|
||||||
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -646,7 +646,8 @@ int mca_bml_r2_finalize( void )
|
|||||||
mca_bml_r2.btl_progress = NULL;
|
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;
|
return OMPI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* University of Stuttgart. All rights reserved.
|
* University of Stuttgart. All rights reserved.
|
||||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -36,10 +36,8 @@ int mca_btl_base_close(void)
|
|||||||
|
|
||||||
if( mca_btl_base_already_opened <= 0 ) {
|
if( mca_btl_base_already_opened <= 0 ) {
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
} else {
|
} else if (--mca_btl_base_already_opened > 0) {
|
||||||
if( --mca_btl_base_already_opened > 0 ) {
|
return OMPI_SUCCESS;
|
||||||
return OMPI_SUCCESS;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* disable event processing while cleaning up btls */
|
/* disable event processing while cleaning up btls */
|
||||||
opal_event_disable();
|
opal_event_disable();
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user