diff --git a/ompi/mca/btl/base/btl_base_open.c b/ompi/mca/btl/base/btl_base_open.c index f190cf7048..62c13964f7 100644 --- a/ompi/mca/btl/base/btl_base_open.c +++ b/ompi/mca/btl/base/btl_base_open.c @@ -69,6 +69,7 @@ char* mca_btl_base_exclude = NULL; opal_list_t mca_btl_base_components_opened; opal_list_t mca_btl_base_modules_initialized; +static bool already_opened = false; /** * Function for finding and opening either all MCA components, or the one @@ -76,6 +77,9 @@ opal_list_t mca_btl_base_modules_initialized; */ int mca_btl_base_open(void) { + if (already_opened) return OMPI_SUCCESS; + already_opened = true; + /* Open up all available components */ if (OMPI_SUCCESS != diff --git a/ompi/tools/ompi_info/components.cc b/ompi/tools/ompi_info/components.cc index e3b7844850..0cb058c2dd 100644 --- a/ompi/tools/ompi_info/components.cc +++ b/ompi/tools/ompi_info/components.cc @@ -200,12 +200,8 @@ void ompi_info::open_components() */ component_map["ptl"] = &mca_ptl_base_components_opened; -#if 0 - /* mca_btl_base_open() should not be called directly. This call is performed - * in the PML base open. - */ + mca_btl_base_open(); component_map["btl"] = &mca_btl_base_components_opened; -#endif mca_topo_base_open(); component_map["topo"] = &mca_topo_base_components_opened; @@ -227,7 +223,7 @@ void ompi_info::close_components() mca_topo_base_close(); // the PML has to call the base PTL close function. - // the PML has to call the base BTL close function. + mca_btl_base_close(); mca_pml_base_close(); mca_mpool_base_close(); mca_io_base_close();