1
1

Refactor ompi_info, splitting it into parts according to the layer involved. Thus, we call down to the opal layer to get those frameworks and components, and down to the orte layer to get those. Still some abstraction breaks, but they mostly involve renaming of OMPI_foo labels that have been around since before we split the build system by layer.

This commit was SVN r26695.
This commit is contained in:
Ralph Castain 2012-06-28 18:23:34 +00:00
parent 8bebf2fa47
commit e335de3564
15 changed files with 2220 additions and 2008 deletions

View File

@ -24,4 +24,3 @@ TARGET_LINK_LIBRARIES (ompi_info libmpi libopen-rte libopen-pal Ws2_32.lib shlwa
INSTALL(TARGETS ompi_info
DESTINATION bin)
INSTALL(FILES help-ompi_info.txt DESTINATION share/openmpi)

View File

@ -11,6 +11,8 @@
# All rights reserved.
# Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
# Copyright (c) 2012 Los Alamos National Security, LLC.
# All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -45,8 +47,6 @@ if OMPI_INSTALL_BINARIES
bin_PROGRAMS = ompi_info
dist_pkgdata_DATA = help-ompi_info.txt
nodist_man_MANS = $(man_pages)
# Ensure that the man pages are rebuilt if the opal_config.h file
@ -59,7 +59,6 @@ endif
ompi_info_SOURCES = \
ompi_info.h \
ompi_info.c \
output.c \
param.c \
components.c \
version.c

View File

@ -25,36 +25,11 @@
#include <stdlib.h>
#include <string.h>
#include "ompi/runtime/params.h"
#include "orte/runtime/runtime.h"
#include "opal/util/argv.h"
#include "opal/runtime/opal_info_support.h"
#include "opal/mca/event/base/base.h"
#include "opal/util/output.h"
#include "opal/mca/base/base.h"
#include "opal/mca/backtrace/backtrace.h"
#include "opal/mca/backtrace/base/base.h"
#include "opal/mca/shmem/shmem.h"
#include "opal/mca/shmem/base/base.h"
#include "opal/mca/memory/memory.h"
#include "opal/mca/memory/base/base.h"
#include "opal/mca/memchecker/memchecker.h"
#include "opal/mca/memchecker/base/base.h"
#include "opal/mca/timer/timer.h"
#include "opal/mca/timer/base/base.h"
#include "opal/mca/installdirs/installdirs.h"
#include "opal/mca/installdirs/base/base.h"
#include "opal/mca/hwloc/base/base.h"
#if OPAL_ENABLE_FT_CR == 1
#include "opal/mca/crs/crs.h"
#include "opal/mca/crs/base/base.h"
#include "opal/mca/compress/compress.h"
#include "opal/mca/compress/base/base.h"
#endif
#include "opal/runtime/opal.h"
#include "opal/dss/dss.h"
#include "opal/mca/if/base/base.h"
#include "orte/runtime/runtime.h"
#include "orte/runtime/orte_info_support.h"
#include "ompi/mca/allocator/base/base.h"
#include "ompi/mca/coll/base/base.h"
@ -84,80 +59,19 @@
#include "ompi/mca/fcoll/base/base.h"
#include "ompi/mca/sharedfp/sharedfp.h"
#include "ompi/mca/sharedfp/base/base.h"
#include "ompi/runtime/params.h"
#if OPAL_ENABLE_FT_CR == 1
#include "ompi/mca/crcp/crcp.h"
#include "ompi/mca/crcp/base/base.h"
#endif
#include "orte/mca/errmgr/errmgr.h"
#include "orte/mca/errmgr/base/base.h"
#include "orte/mca/state/state.h"
#include "orte/mca/state/base/base.h"
#include "orte/mca/grpcomm/grpcomm.h"
#include "orte/mca/grpcomm/base/base.h"
#include "orte/mca/db/db.h"
#include "orte/mca/db/base/base.h"
#include "orte/mca/ess/ess.h"
#include "orte/mca/ess/base/base.h"
#include "orte/util/show_help.h"
#include "orte/util/proc_info.h"
#if !ORTE_DISABLE_FULL_SUPPORT
#include "orte/mca/iof/iof.h"
#include "orte/mca/iof/base/base.h"
#include "orte/mca/oob/oob.h"
#include "orte/mca/oob/base/base.h"
#include "orte/mca/odls/odls.h"
#include "orte/mca/odls/base/base.h"
#include "orte/mca/ras/ras.h"
#include "orte/mca/ras/base/ras_private.h"
#include "orte/mca/rmaps/rmaps.h"
#include "orte/mca/rmaps/base/base.h"
#include "orte/mca/rml/rml.h"
#include "orte/mca/rml/base/base.h"
#include "orte/mca/routed/routed.h"
#include "orte/mca/routed/base/base.h"
#include "orte/mca/plm/plm.h"
#include "orte/mca/plm/base/base.h"
#if OPAL_ENABLE_FT_CR == 1
#include "orte/mca/snapc/snapc.h"
#include "orte/mca/snapc/base/base.h"
#include "orte/mca/sstore/sstore.h"
#include "orte/mca/sstore/base/base.h"
#endif
#if ORTE_ENABLE_SENSORS
#include "orte/mca/sensor/sensor.h"
#include "orte/mca/sensor/base/base.h"
#endif
#include "orte/mca/filem/filem.h"
#include "orte/mca/filem/base/base.h"
#endif
#include "ompi/tools/ompi_info/ompi_info.h"
/*
* Public variables
*/
static void component_map_construct(ompi_info_component_map_t *map)
{
map->type = NULL;
}
static void component_map_destruct(ompi_info_component_map_t *map)
{
if (NULL != map->type) {
free(map->type);
}
/* the type close functions will release the
* list of components
*/
}
OBJ_CLASS_INSTANCE(ompi_info_component_map_t,
opal_list_item_t,
component_map_construct,
component_map_destruct);
opal_pointer_array_t component_map;
/*
* Private variables
@ -173,30 +87,23 @@ static bool opened_components = false;
* out the environment of all OMPI_MCA_<type> variables to ensure
* that the open algorithms don't try to only open one component.
*/
void ompi_info_open_components(void)
int ompi_info_register_components(opal_pointer_array_t *mca_types,
opal_pointer_array_t *component_map)
{
int i;
char *env, *str;
char *target, *save, *type;
char **env_save=NULL;
bool need_close_components = false;
ompi_info_component_map_t *map;
if (opened_components) {
return;
}
/* init the map */
OBJ_CONSTRUCT(&component_map, opal_pointer_array_t);
opal_pointer_array_init(&component_map, 256, INT_MAX, 128);
opal_info_component_map_t *map;
/* Clear out the environment. Use strdup() to orphan the resulting
* strings because items are placed in the environment by reference,
* not by value.
*/
for (i = 0; i < mca_types.size; ++i) {
if (NULL == (type = (char*)opal_pointer_array_get_item(&mca_types, i))) {
for (i = 0; i < mca_types->size; ++i) {
if (NULL == (type = (char*)opal_pointer_array_get_item(mca_types, i))) {
continue;
}
asprintf(&env, "OMPI_MCA_%s", type);
@ -213,463 +120,182 @@ void ompi_info_open_components(void)
free(env);
}
/* some components require the event library be active, so activate it */
if (OPAL_SUCCESS != opal_event_base_open()) {
str = "opal_event_base_open";
goto error;
}
/* Open the DSS */
if (OPAL_SUCCESS != opal_dss_open()) {
str = "Unable to initialize the DSS";
goto error;
}
/* Open up the MCA */
if (OPAL_SUCCESS != mca_base_open()) {
str = "mca_base_open failed";
goto error;
}
/* Register the OPAL layer's MCA parameters */
if (OPAL_SUCCESS != opal_register_params()) {
str = "opal_register_params failed";
goto error;
}
/* Register the ORTE layer's MCA parameters */
if (ORTE_SUCCESS != orte_register_params()) {
str = "orte_register_params failed";
goto error;
}
/* Initialize the opal_output system */
if (!opal_output_init()) {
str = "opal_output_init failed";
goto error;
}
/* Register the MPI layer's MCA parameters */
if (OMPI_SUCCESS != ompi_mpi_register_params()) {
str = "ompi_mpi_Register_params failed";
goto error;
}
/* Find / open all components */
map = OBJ_NEW(ompi_info_component_map_t);
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("base");
opal_pointer_array_add(&component_map, map);
opal_pointer_array_add(component_map, map);
/* set default error message from here forward */
str = "A component framework failed to open properly.";
/* OPAL frameworks */
if (OPAL_SUCCESS != opal_backtrace_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("backtrace");
map->components = &opal_backtrace_base_components_opened;
opal_pointer_array_add(&component_map, map);
if (OPAL_SUCCESS != opal_memory_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("memory");
map->components = &opal_memory_base_components_opened;
opal_pointer_array_add(&component_map, map);
/* the event framework is already open - just get its components */
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("event");
map->components = &opal_event_components;
opal_pointer_array_add(&component_map, map);
if (OPAL_SUCCESS != opal_memchecker_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("memchecker");
map->components = &opal_memchecker_base_components_opened;
opal_pointer_array_add(&component_map, map);
if (OPAL_SUCCESS != opal_shmem_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("shmem");
map->components = &opal_shmem_base_components_opened;
opal_pointer_array_add(&component_map, map);
#if OPAL_HAVE_HWLOC
if (OPAL_SUCCESS != opal_hwloc_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("hwloc");
map->components = &opal_hwloc_base_components;
opal_pointer_array_add(&component_map, map);
#endif
if (OPAL_SUCCESS != opal_timer_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("timer");
map->components = &opal_timer_base_components_opened;
opal_pointer_array_add(&component_map, map);
#if OPAL_ENABLE_FT_CR == 1
if (OPAL_SUCCESS != opal_crs_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("crs");
map->components = &opal_crs_base_components_available;
opal_pointer_array_add(&component_map, map);
if (OPAL_SUCCESS != opal_compress_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("compress");
map->components = &opal_compress_base_components_available;
opal_pointer_array_add(&component_map, map);
#endif
if (OPAL_SUCCESS != opal_if_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("if");
map->components = &opal_if_components;
opal_pointer_array_add(&component_map, map);
/* OPAL's installdirs base open has already been called as part of
* opal_init_util() back in main().
*/
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("installdirs");
map->components = &opal_installdirs_components;
opal_pointer_array_add(&component_map, map);
/* ORTE frameworks
* Set orte_process_info.proc_type to HNP to force all frameworks to
* open components
*/
orte_process_info.proc_type = ORTE_PROC_HNP;
if (ORTE_SUCCESS != orte_state_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("state");
map->components = &orte_state_base_components_available;
opal_pointer_array_add(&component_map, map);
if (ORTE_SUCCESS != orte_errmgr_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("errmgr");
map->components = &orte_errmgr_base_components_available;
opal_pointer_array_add(&component_map, map);
if (ORTE_SUCCESS != orte_grpcomm_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("grpcomm");
map->components = &orte_grpcomm_base.components_available;
opal_pointer_array_add(&component_map, map);
if (ORTE_SUCCESS != orte_db_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("db");
map->components = &orte_db_base.available_components;
opal_pointer_array_add(&component_map, map);
if (ORTE_SUCCESS != orte_ess_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("ess");
map->components = &orte_ess_base_components_available;
opal_pointer_array_add(&component_map, map);
#if !ORTE_DISABLE_FULL_SUPPORT
if (ORTE_SUCCESS != mca_oob_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("oob");
map->components = &mca_oob_base_components;
opal_pointer_array_add(&component_map, map);
if (ORTE_SUCCESS != orte_odls_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("odls");
map->components = &orte_odls_base.available_components;
opal_pointer_array_add(&component_map, map);
if (ORTE_SUCCESS != orte_iof_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("iof");
map->components = &orte_iof_base.iof_components_opened;
opal_pointer_array_add(&component_map, map);
if (ORTE_SUCCESS != orte_ras_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("ras");
map->components = &orte_ras_base.ras_opened;
opal_pointer_array_add(&component_map, map);
if (ORTE_SUCCESS != orte_rmaps_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("rmaps");
map->components = &orte_rmaps_base.available_components;
opal_pointer_array_add(&component_map, map);
if (ORTE_SUCCESS != orte_rml_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("rml");
map->components = &orte_rml_base_components;
opal_pointer_array_add(&component_map, map);
if (ORTE_SUCCESS != orte_routed_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("routed");
map->components = &orte_routed_base_components;
opal_pointer_array_add(&component_map, map);
if (ORTE_SUCCESS != orte_plm_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("plm");
map->components = &orte_plm_base.available_components;
opal_pointer_array_add(&component_map, map);
#if OPAL_ENABLE_FT_CR == 1
if (ORTE_SUCCESS != orte_sstore_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("sstore");
map->components = &orte_sstore_base_components_available;
opal_pointer_array_add(&component_map, map);
if (ORTE_SUCCESS != orte_snapc_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("snapc");
map->components = &orte_snapc_base_components_available;
opal_pointer_array_add(&component_map, map);
#endif
#if ORTE_ENABLE_SENSORS
if (ORTE_SUCCESS != orte_sensor_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("sensor");
map->components = &mca_sensor_base_components_available;
opal_pointer_array_add(&component_map, map);
#endif
if (ORTE_SUCCESS != orte_filem_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("filem");
map->components = &orte_filem_base_components_available;
opal_pointer_array_add(&component_map, map);
#endif
/* MPI frameworks */
if (OMPI_SUCCESS != mca_allocator_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("allocator");
map->components = &mca_allocator_base_components;
opal_pointer_array_add(&component_map, map);
if (OMPI_SUCCESS != mca_coll_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("coll");
map->components = &mca_coll_base_components_opened;
opal_pointer_array_add(&component_map, map);
if (OMPI_SUCCESS != mca_io_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("io");
map->components = &mca_io_base_components_opened;
opal_pointer_array_add(&component_map, map);
if (OMPI_SUCCESS != mca_fcoll_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("fcoll");
map->components = &mca_fcoll_base_components_opened;
opal_pointer_array_add(&component_map, map);
if (OMPI_SUCCESS != mca_fs_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("fs");
map->components = &mca_fs_base_components_opened;
opal_pointer_array_add(&component_map, map);
if (OMPI_SUCCESS != mca_fbtl_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("fbtl");
map->components = &mca_fbtl_base_components_opened;
opal_pointer_array_add(&component_map, map);
if (OMPI_SUCCESS != mca_sharedfp_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("sharedfp");
map->components = &mca_sharedfp_base_components_opened;
opal_pointer_array_add(&component_map, map);
if (OMPI_SUCCESS != mca_rcache_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("rcache");
map->components = &mca_rcache_base_components;
opal_pointer_array_add(&component_map, map);
if (OMPI_SUCCESS != mca_mpool_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("mpool");
map->components = &mca_mpool_base_components;
opal_pointer_array_add(&component_map, map);
if (OMPI_SUCCESS != mca_pml_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("pml");
map->components = &mca_pml_base_components_available;
opal_pointer_array_add(&component_map, map);
/* No need to call the bml_base_open() because the ob1 pml calls it.
* mca_bml_base_open();
*/
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("bml");
map->components = &mca_bml_base_components_available;
opal_pointer_array_add(&component_map, map);
if (OMPI_SUCCESS != ompi_osc_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("osc");
map->components = &ompi_osc_base_open_components;
opal_pointer_array_add(&component_map, map);
opal_pointer_array_add(component_map, map);
if (OMPI_SUCCESS != mca_btl_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("btl");
map->components = &mca_btl_base_components_opened;
opal_pointer_array_add(&component_map, map);
opal_pointer_array_add(component_map, map);
if (OMPI_SUCCESS != ompi_mtl_base_open()) {
if (OMPI_SUCCESS != mca_coll_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("mtl");
map->components = &ompi_mtl_base_components_opened;
opal_pointer_array_add(&component_map, map);
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("coll");
map->components = &mca_coll_base_components_opened;
opal_pointer_array_add(component_map, map);
if (OMPI_SUCCESS != mca_topo_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("topo");
map->components = &mca_topo_base_components_opened;
opal_pointer_array_add(&component_map, map);
if (OMPI_SUCCESS != ompi_pubsub_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("pubsub");
map->components = &ompi_pubsub_base_components_available;
opal_pointer_array_add(&component_map, map);
if (OMPI_SUCCESS != ompi_dpm_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("dpm");
map->components = &ompi_dpm_base_components_available;
opal_pointer_array_add(&component_map, map);
ompi_op_base_open();
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("op");
map->components = &ompi_op_base_components_opened;
opal_pointer_array_add(&component_map, map);
if (OMPI_SUCCESS != mca_vprotocol_base_open(NULL)) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map->type = strdup("vprotocol");
map->components = &mca_vprotocol_base_components_available;
opal_pointer_array_add(&component_map, map);
#if OPAL_ENABLE_FT_CR == 1
if (OMPI_SUCCESS != ompi_crcp_base_open()) {
goto error;
}
map = OBJ_NEW(ompi_info_component_map_t);
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("crcp");
map->components = &ompi_crcp_base_components_available;
opal_pointer_array_add(&component_map, map);
opal_pointer_array_add(component_map, map);
#endif
if (OMPI_SUCCESS != ompi_dpm_base_open()) {
goto error;
}
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("dpm");
map->components = &ompi_dpm_base_components_available;
opal_pointer_array_add(component_map, map);
if (OMPI_SUCCESS != mca_fbtl_base_open()) {
goto error;
}
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("fbtl");
map->components = &mca_fbtl_base_components_opened;
opal_pointer_array_add(component_map, map);
if (OMPI_SUCCESS != mca_fcoll_base_open()) {
goto error;
}
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("fcoll");
map->components = &mca_fcoll_base_components_opened;
opal_pointer_array_add(component_map, map);
if (OMPI_SUCCESS != mca_fs_base_open()) {
goto error;
}
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("fs");
map->components = &mca_fs_base_components_opened;
opal_pointer_array_add(component_map, map);
if (OMPI_SUCCESS != mca_io_base_open()) {
goto error;
}
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("io");
map->components = &mca_io_base_components_opened;
opal_pointer_array_add(component_map, map);
if (OMPI_SUCCESS != mca_mpool_base_open()) {
goto error;
}
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("mpool");
map->components = &mca_mpool_base_components;
opal_pointer_array_add(component_map, map);
if (OMPI_SUCCESS != ompi_mtl_base_open()) {
goto error;
}
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("mtl");
map->components = &ompi_mtl_base_components_opened;
opal_pointer_array_add(component_map, map);
ompi_op_base_open();
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("op");
map->components = &ompi_op_base_components_opened;
opal_pointer_array_add(component_map, map);
if (OMPI_SUCCESS != ompi_osc_base_open()) {
goto error;
}
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("osc");
map->components = &ompi_osc_base_open_components;
opal_pointer_array_add(component_map, map);
if (OMPI_SUCCESS != mca_pml_base_open()) {
goto error;
}
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("pml");
map->components = &mca_pml_base_components_available;
opal_pointer_array_add(component_map, map);
/* No need to call the bml_base_open() because the ob1 pml calls it.
* mca_bml_base_open();
*/
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("bml");
map->components = &mca_bml_base_components_available;
opal_pointer_array_add(component_map, map);
if (OMPI_SUCCESS != ompi_pubsub_base_open()) {
goto error;
}
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("pubsub");
map->components = &ompi_pubsub_base_components_available;
opal_pointer_array_add(component_map, map);
if (OMPI_SUCCESS != mca_rcache_base_open()) {
goto error;
}
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("rcache");
map->components = &mca_rcache_base_components;
opal_pointer_array_add(component_map, map);
if (OMPI_SUCCESS != mca_sharedfp_base_open()) {
goto error;
}
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("sharedfp");
map->components = &mca_sharedfp_base_components_opened;
opal_pointer_array_add(component_map, map);
if (OMPI_SUCCESS != mca_topo_base_open()) {
goto error;
}
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("topo");
map->components = &mca_topo_base_components_opened;
opal_pointer_array_add(component_map, map);
if (OMPI_SUCCESS != mca_vprotocol_base_open(NULL)) {
goto error;
}
map = OBJ_NEW(opal_info_component_map_t);
map->type = strdup("vprotocol");
map->components = &mca_vprotocol_base_components_available;
opal_pointer_array_add(component_map, map);
/* flag that we need to close components */
need_close_components = true;
@ -687,7 +313,7 @@ void ompi_info_open_components(void)
/* All done */
opened_components = true;
return;
return OMPI_SUCCESS;
error:
fprintf(stderr, "%s\n", str);
@ -696,93 +322,46 @@ error:
opened_components = true;
ompi_info_close_components();
}
return OMPI_ERROR;
}
void ompi_info_close_components()
{
int i;
ompi_info_component_map_t *map;
if (opened_components) {
/* Note that the order of shutdown here doesn't matter because
* we aren't *using* any components -- none were selected, so
* there are no dependencies between the frameworks. We list
* them generally "in order", but it doesn't really matter.
/* Note that the order of shutdown here doesn't matter because
* we aren't *using* any components -- none were selected, so
* there are no dependencies between the frameworks. We list
* them generally "in order", but it doesn't really matter.
* We also explicitly ignore the return values from the
* close() functions -- what would we do if there was an
* error?
*/
* We also explicitly ignore the return values from the
* close() functions -- what would we do if there was an
* error?
*/
#if OPAL_ENABLE_FT_CR == 1
(void) ompi_crcp_base_close();
#endif
(void) ompi_op_base_close();
(void) ompi_dpm_base_close();
(void) ompi_pubsub_base_close();
(void) mca_topo_base_close();
(void) mca_btl_base_close();
(void) ompi_mtl_base_close();
(void) mca_pml_base_close();
(void) mca_mpool_base_close();
(void) mca_rcache_base_close();
(void) mca_io_base_close();
(void) mca_fbtl_base_close();
(void) mca_fcoll_base_close();
(void) mca_fs_base_close();
(void) mca_sharedfp_base_close();
(void) mca_coll_base_close();
(void) mca_allocator_base_close();
(void) ompi_osc_base_close();
/* close the OPAL components */
(void) opal_info_close_components();
(void) orte_grpcomm_base_close();
(void) orte_db_base_close();
(void) orte_ess_base_close();
(void) orte_show_help_finalize();
#if !ORTE_DISABLE_FULL_SUPPORT
#if OPAL_ENABLE_FT_CR == 1
(void) orte_snapc_base_close();
(void) orte_sstore_base_close();
#endif
(void) orte_filem_base_close();
(void) orte_iof_base_close();
(void) orte_plm_base_close();
(void) orte_odls_base_close();
(void) orte_rmaps_base_close();
(void) orte_ras_base_close();
(void) orte_rml_base_close();
(void) orte_routed_base_close();
(void) mca_oob_base_close();
/* close the ORTE components */
(void) orte_info_close_components();
#endif
(void) orte_errmgr_base_close();
(void) orte_state_base_close();
(void) opal_backtrace_base_close();
(void) opal_memory_base_close();
(void) opal_memchecker_base_close();
(void) opal_timer_base_close();
#if OPAL_HAVE_HWLOC
(void) opal_hwloc_base_close();
#endif
#if OPAL_ENABLE_FT_CR == 1
(void) opal_crs_base_close();
(void) ompi_crcp_base_close();
#endif
(void) opal_dss_close();
(void) opal_event_base_close();
/* Do not call OPAL's installdirs close; it will be handled in
* opal_finalize_util().
*/
for (i=0; i < component_map.size; i++) {
if (NULL != (map = (ompi_info_component_map_t*)opal_pointer_array_get_item(&component_map, i))) {
OBJ_RELEASE(map);
}
}
OBJ_DESTRUCT(&component_map);
}
opened_components = false;
(void) ompi_op_base_close();
(void) ompi_dpm_base_close();
(void) ompi_pubsub_base_close();
(void) mca_topo_base_close();
(void) mca_btl_base_close();
(void) ompi_mtl_base_close();
(void) mca_pml_base_close();
(void) mca_mpool_base_close();
(void) mca_rcache_base_close();
(void) mca_io_base_close();
(void) mca_fbtl_base_close();
(void) mca_fcoll_base_close();
(void) mca_fs_base_close();
(void) mca_sharedfp_base_close();
(void) mca_coll_base_close();
(void) mca_allocator_base_close();
(void) ompi_osc_base_close();
}

View File

@ -11,6 +11,8 @@
* All rights reserved.
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2011-2012 University of Houston. All rights reserved.
* Copyright (c) 2010-2012 Los Alamos National Security, LLC.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -41,13 +43,11 @@
#if OPAL_ENABLE_FT_CR == 1
#include "opal/runtime/opal_cr.h"
#endif
#include "opal/util/cmd_line.h"
#include "opal/util/error.h"
#include "opal/util/argv.h"
#include "opal/util/show_help.h"
#include "opal/mca/base/base.h"
#include "opal/runtime/opal_info_support.h"
#include "opal/util/show_help.h"
#include "orte/util/show_help.h"
#include "orte/runtime/orte_info_support.h"
#include "ompi/communicator/communicator.h"
#include "ompi/tools/ompi_info/ompi_info.h"
@ -56,270 +56,146 @@
* Public variables
*/
bool ompi_info_pretty = true;
opal_cmd_line_t *ompi_info_cmd_line = NULL;
const char *ompi_info_type_all = "all";
const char *ompi_info_type_ompi = "ompi";
const char *ompi_info_type_orte = "orte";
const char *ompi_info_type_opal = "opal";
const char *ompi_info_type_base = "base";
opal_pointer_array_t mca_types;
int main(int argc, char *argv[])
{
int ret = 0;
bool want_help = false;
bool cmd_error = false;
bool acted = false;
bool want_all = false;
char **app_env = NULL, **global_env = NULL;
int i, len;
int i;
char *str;
opal_cmd_line_t *ompi_info_cmd_line;
opal_pointer_array_t mca_types;
opal_pointer_array_t component_map;
opal_info_component_map_t *map;
/* Initialize the argv parsing handle */
if (OMPI_SUCCESS != opal_init_util(&argc, &argv)) {
orte_show_help("help-ompi_info.txt", "lib-call-fail", true,
if (OPAL_SUCCESS != opal_init_util(&argc, &argv)) {
opal_show_help("help-opal_info.txt", "lib-call-fail", true,
"opal_init_util", __FILE__, __LINE__, NULL);
exit(ret);
}
ompi_info_cmd_line = OBJ_NEW(opal_cmd_line_t);
if (NULL == ompi_info_cmd_line) {
ret = errno;
orte_show_help("help-ompi_info.txt", "lib-call-fail", true,
opal_show_help("help-opal_info.txt", "lib-call-fail", true,
"opal_cmd_line_create", __FILE__, __LINE__, NULL);
opal_finalize_util();
exit(ret);
}
opal_cmd_line_make_opt3(ompi_info_cmd_line, 'v', NULL, "version", 2,
"Show version of Open MPI or a component. The first parameter can be the keywords \"ompi\" or \"all\", a framework name (indicating all components in a framework), or a framework:component string (indicating a specific component). The second parameter can be one of: full, major, minor, release, greek, svn.");
opal_cmd_line_make_opt3(ompi_info_cmd_line, '\0', NULL, "param", 2,
"Show MCA parameters. The first parameter is the framework (or the keyword \"all\"); the second parameter is the specific component name (or the keyword \"all\").");
opal_cmd_line_make_opt3(ompi_info_cmd_line, '\0', NULL, "internal", 0,
"Show internal MCA parameters (not meant to be modified by users)");
opal_cmd_line_make_opt3(ompi_info_cmd_line, '\0', NULL, "path", 1,
"Show paths that Open MPI was configured with. Accepts the following parameters: prefix, bindir, libdir, incdir, mandir, pkglibdir, sysconfdir");
opal_cmd_line_make_opt3(ompi_info_cmd_line, '\0', NULL, "arch", 0,
"Show architecture Open MPI was compiled on");
opal_cmd_line_make_opt3(ompi_info_cmd_line, 'c', NULL, "config", 0,
"Show configuration options");
opal_cmd_line_make_opt3(ompi_info_cmd_line, 'h', NULL, "help", 0,
"Show this help message");
opal_cmd_line_make_opt3(ompi_info_cmd_line, '\0', NULL, "ompi_info_pretty", 0,
"When used in conjunction with other parameters, the output is displayed in 'ompi_info_prettyprint' format (default)");
opal_cmd_line_make_opt3(ompi_info_cmd_line, '\0', NULL, "parsable", 0,
"When used in conjunction with other parameters, the output is displayed in a machine-parsable format");
opal_cmd_line_make_opt3(ompi_info_cmd_line, '\0', NULL, "parseable", 0,
"Synonym for --parsable");
opal_cmd_line_make_opt3(ompi_info_cmd_line, '\0', NULL, "hostname", 0,
"Show the hostname that Open MPI was configured "
"and built on");
opal_cmd_line_make_opt3(ompi_info_cmd_line, 'a', NULL, "all", 0,
"Show all configuration options and MCA parameters");
/* Call some useless functions in order to guarantee to link in some
* global variables. Only check the return value so that the
* compiler doesn't optimize out the useless function.
*/
if (OMPI_SUCCESS != ompi_comm_link_function()) {
/* Stop .. or I'll say stop again! */
++ret;
} else {
--ret;
}
/* set our threading level */
opal_set_using_threads(false);
/* Get MCA parameters, if any */
if( OMPI_SUCCESS != mca_base_open() ) {
orte_show_help("help-ompi_info.txt", "lib-call-fail", true, "mca_base_open", __FILE__, __LINE__ );
OBJ_RELEASE(ompi_info_cmd_line);
opal_finalize_util();
exit(1);
}
mca_base_cmd_line_setup(ompi_info_cmd_line);
/* Do the parsing */
ret = opal_cmd_line_parse(ompi_info_cmd_line, false, argc, argv);
if (OMPI_SUCCESS != ret) {
cmd_error = true;
if (OPAL_ERR_SILENT != ret) {
fprintf(stderr, "%s: command line error (%s)\n", argv[0],
opal_strerror(ret));
}
}
if (!cmd_error &&
(opal_cmd_line_is_taken(ompi_info_cmd_line, "help") ||
opal_cmd_line_is_taken(ompi_info_cmd_line, "h"))) {
char *str, *usage;
want_help = true;
usage = opal_cmd_line_get_usage_msg(ompi_info_cmd_line);
str = opal_show_help_string("help-ompi_info.txt", "usage",
true, usage);
if (NULL != str) {
printf("%s", str);
free(str);
}
free(usage);
/* initialize the command line, parse it, and return the directives
* telling us what the user wants output
*/
if (OPAL_SUCCESS != (ret = opal_info_init(argc, argv, ompi_info_cmd_line))) {
exit(ret);
}
/* If we had a cmd line parse error, or we showed the help
message, it's time to exit. */
if (cmd_error || want_help) {
mca_base_close();
OBJ_RELEASE(ompi_info_cmd_line);
opal_finalize_util();
exit(cmd_error ? 1 : 0);
}
mca_base_cmd_line_process_args(ompi_info_cmd_line, &app_env, &global_env);
/* putenv() all the stuff that we got back from env (in case the
* user specified some --mca params on the command line). This
* creates a memory leak, but that's unfortunately how putenv()
* works. :-(
*/
len = opal_argv_count(app_env);
for (i = 0; i < len; ++i) {
putenv(app_env[i]);
}
len = opal_argv_count(global_env);
for (i = 0; i < len; ++i) {
putenv(global_env[i]);
}
/* setup the mca_types array */
OBJ_CONSTRUCT(&mca_types, opal_pointer_array_t);
opal_pointer_array_init(&mca_types, 256, INT_MAX, 128);
opal_pointer_array_add(&mca_types, "mca");
opal_pointer_array_add(&mca_types, "mpi");
opal_pointer_array_add(&mca_types, "orte");
opal_pointer_array_add(&mca_types, "opal");
opal_pointer_array_add(&mca_types, "filter");
opal_pointer_array_add(&mca_types, "backtrace");
opal_pointer_array_add(&mca_types, "memchecker");
opal_pointer_array_add(&mca_types, "memory");
opal_pointer_array_add(&mca_types, "shmem");
opal_pointer_array_add(&mca_types, "timer");
opal_pointer_array_add(&mca_types, "installdirs");
opal_pointer_array_add(&mca_types, "hwloc");
#if OPAL_ENABLE_FT_CR == 1
opal_cr_set_enabled(true);
opal_pointer_array_add(&mca_types, "crs");
opal_pointer_array_add(&mca_types, "compress");
#endif
opal_pointer_array_add(&mca_types, "if");
opal_pointer_array_add(&mca_types, "event");
/* add in the opal frameworks */
opal_info_register_types(&mca_types);
opal_pointer_array_add(&mca_types, "dpm");
opal_pointer_array_add(&mca_types, "pubsub");
/* add in the orte frameworks */
orte_info_register_types(&mca_types);
/* add in the ompi frameworks */
opal_pointer_array_add(&mca_types, "allocator");
opal_pointer_array_add(&mca_types, "coll");
opal_pointer_array_add(&mca_types, "io");
opal_pointer_array_add(&mca_types, "mpool");
opal_pointer_array_add(&mca_types, "pml");
opal_pointer_array_add(&mca_types, "bml");
opal_pointer_array_add(&mca_types, "rcache");
opal_pointer_array_add(&mca_types, "btl");
opal_pointer_array_add(&mca_types, "mtl");
opal_pointer_array_add(&mca_types, "topo");
opal_pointer_array_add(&mca_types, "osc");
opal_pointer_array_add(&mca_types, "op");
opal_pointer_array_add(&mca_types, "coll");
opal_pointer_array_add(&mca_types, "common");
opal_pointer_array_add(&mca_types, "fbtl");
opal_pointer_array_add(&mca_types, "fs");
opal_pointer_array_add(&mca_types, "fcoll");
opal_pointer_array_add(&mca_types, "sharedfp");
#if OPAL_ENABLE_FT_CR == 1
opal_pointer_array_add(&mca_types, "crcp");
#endif
opal_pointer_array_add(&mca_types, "dpm");
opal_pointer_array_add(&mca_types, "fbtl");
opal_pointer_array_add(&mca_types, "fcoll");
opal_pointer_array_add(&mca_types, "fs");
opal_pointer_array_add(&mca_types, "io");
opal_pointer_array_add(&mca_types, "mpi");
opal_pointer_array_add(&mca_types, "mpool");
opal_pointer_array_add(&mca_types, "mtl");
opal_pointer_array_add(&mca_types, "ompi");
opal_pointer_array_add(&mca_types, "op");
opal_pointer_array_add(&mca_types, "osc");
opal_pointer_array_add(&mca_types, "pml");
opal_pointer_array_add(&mca_types, "pubsub");
opal_pointer_array_add(&mca_types, "rcache");
opal_pointer_array_add(&mca_types, "sharedfp");
opal_pointer_array_add(&mca_types, "topo");
#if !ORTE_DISABLE_FULL_SUPPORT
opal_pointer_array_add(&mca_types, "iof");
opal_pointer_array_add(&mca_types, "oob");
opal_pointer_array_add(&mca_types, "odls");
opal_pointer_array_add(&mca_types, "ras");
opal_pointer_array_add(&mca_types, "rmaps");
opal_pointer_array_add(&mca_types, "rml");
opal_pointer_array_add(&mca_types, "routed");
opal_pointer_array_add(&mca_types, "plm");
#if OPAL_ENABLE_FT_CR == 1
opal_pointer_array_add(&mca_types, "sstore");
opal_pointer_array_add(&mca_types, "snapc");
#endif
#if ORTE_ENABLE_SENSORS
opal_pointer_array_add(&mca_types, "sensor");
#endif
opal_pointer_array_add(&mca_types, "filem");
#endif
/* these are always included */
opal_pointer_array_add(&mca_types, "state");
opal_pointer_array_add(&mca_types, "errmgr");
opal_pointer_array_add(&mca_types, "ess");
opal_pointer_array_add(&mca_types, "grpcomm");
opal_pointer_array_add(&mca_types, "db");
/* init the component map */
OBJ_CONSTRUCT(&component_map, opal_pointer_array_t);
opal_pointer_array_init(&component_map, 256, INT_MAX, 128);
/* Execute the desired action(s) */
if (opal_cmd_line_is_taken(ompi_info_cmd_line, "ompi_info_pretty")) {
ompi_info_pretty = true;
} else if (opal_cmd_line_is_taken(ompi_info_cmd_line, "parsable") || opal_cmd_line_is_taken(ompi_info_cmd_line, "parseable")) {
ompi_info_pretty = false;
/* Register OPAL's params */
if (OPAL_SUCCESS != (ret = opal_info_register_components(&mca_types, &component_map))) {
exit(ret);
}
/* Register ORTE's params */
if (ORTE_SUCCESS != (ret = orte_info_register_components(&mca_types, &component_map))) {
exit(ret);
}
/* Register OMPI's params */
if (OMPI_SUCCESS != (ret = ompi_info_register_components(&mca_types, &component_map))) {
exit(ret);
}
/* Execute the desired action(s) */
want_all = opal_cmd_line_is_taken(ompi_info_cmd_line, "all");
if (want_all || opal_cmd_line_is_taken(ompi_info_cmd_line, "version")) {
ompi_info_do_version(want_all, ompi_info_cmd_line);
ompi_info_do_version(want_all, ompi_info_cmd_line,
&mca_types, &component_map);
acted = true;
}
if (want_all || opal_cmd_line_is_taken(ompi_info_cmd_line, "path")) {
ompi_info_do_path(want_all, ompi_info_cmd_line);
opal_info_do_path(want_all, ompi_info_cmd_line);
acted = true;
}
if (want_all || opal_cmd_line_is_taken(ompi_info_cmd_line, "arch")) {
ompi_info_do_arch();
opal_info_do_arch();
acted = true;
}
if (want_all || opal_cmd_line_is_taken(ompi_info_cmd_line, "hostname")) {
ompi_info_do_hostname();
opal_info_do_hostname();
acted = true;
}
if (want_all || opal_cmd_line_is_taken(ompi_info_cmd_line, "config")) {
ompi_info_do_config(true);
acted = true;
}
if (want_all || opal_cmd_line_is_taken(ompi_info_cmd_line, "param")) {
ompi_info_do_params(want_all, opal_cmd_line_is_taken(ompi_info_cmd_line, "internal"));
if (want_all || opal_cmd_line_is_taken(ompi_info_cmd_line, "param") ||
opal_cmd_line_is_taken(ompi_info_cmd_line, "params")) {
opal_info_do_params(want_all, opal_cmd_line_is_taken(ompi_info_cmd_line, "internal"),
&mca_types, ompi_info_cmd_line);
acted = true;
}
/* If no command line args are specified, show default set */
if (!acted) {
ompi_info_show_ompi_version(ompi_info_ver_full);
ompi_info_show_path(ompi_info_path_prefix, opal_install_dirs.prefix);
ompi_info_do_arch();
ompi_info_do_hostname();
ompi_info_show_ompi_version(opal_info_ver_full);
opal_info_show_path(opal_info_path_prefix, opal_install_dirs.prefix);
opal_info_do_arch();
opal_info_do_hostname();
ompi_info_do_config(false);
ompi_info_open_components();
for (i = 0; i < mca_types.size; ++i) {
if (NULL == (str = (char*)opal_pointer_array_get_item(&mca_types, i))) {
continue;
}
if (0 != strcmp("mpi", str)) {
ompi_info_show_component_version(str, ompi_info_component_all,
ompi_info_ver_full, ompi_info_type_all);
opal_info_show_component_version(&mca_types, &component_map,
str, opal_info_component_all,
opal_info_ver_full, opal_info_type_all);
}
}
}
@ -335,9 +211,14 @@ int main(int argc, char *argv[])
ompi_info_close_components();
OBJ_RELEASE(ompi_info_cmd_line);
OBJ_DESTRUCT(&mca_types);
mca_base_close();
opal_finalize_util();
for (i=0; i < component_map.size; i++) {
if (NULL != (map = (opal_info_component_map_t*)opal_pointer_array_get_item(&component_map, i))) {
OBJ_RELEASE(map);
}
}
OBJ_DESTRUCT(&component_map);
opal_info_finalize();
return 0;
}

View File

@ -32,97 +32,21 @@ BEGIN_C_DECLS
* Globals
*/
extern bool ompi_info_pretty;
extern opal_cmd_line_t *ompi_info_cmd_line;
extern const char *ompi_info_type_all;
extern const char *ompi_info_type_ompi;
extern const char *ompi_info_type_orte;
extern const char *ompi_info_type_opal;
extern const char *ompi_info_type_base;
extern opal_pointer_array_t mca_types;
void ompi_info_do_version(bool want_all, opal_cmd_line_t *cmd_line,
opal_pointer_array_t *mca_types,
opal_pointer_array_t *component_map);
/*
* Version-related strings and functions
*/
extern const char *ompi_info_ver_full;
extern const char *ompi_info_ver_major;
extern const char *ompi_info_ver_minor;
extern const char *ompi_info_ver_release;
extern const char *ompi_info_ver_greek;
extern const char *ompi_info_ver_svn;
void ompi_info_do_version(bool want_all, opal_cmd_line_t *cmd_line);
void ompi_info_show_ompi_version(const char *scope);
void ompi_info_show_component_version(const char *type_name,
const char *component_name,
const char *scope,
const char *ver_type);
/*
* Parameter/configuration-related functions
*/
extern const char *ompi_info_component_all;
extern const char *ompi_info_param_all;
extern const char *ompi_info_path_prefix;
extern const char *ompi_info_path_bindir;
extern const char *ompi_info_path_libdir;
extern const char *ompi_info_path_incdir;
extern const char *ompi_info_path_mandir;
extern const char *ompi_info_path_pkglibdir;
extern const char *ompi_info_path_sysconfdir;
extern const char *ompi_info_path_exec_prefix;
extern const char *ompi_info_path_sbindir;
extern const char *ompi_info_path_libexecdir;
extern const char *ompi_info_path_datarootdir;
extern const char *ompi_info_path_datadir;
extern const char *ompi_info_path_sharedstatedir;
extern const char *ompi_info_path_localstatedir;
extern const char *ompi_info_path_infodir;
extern const char *ompi_info_path_pkgdatadir;
extern const char *ompi_info_path_pkgincludedir;
void ompi_info_do_params(bool want_all, bool want_internal);
void ompi_info_show_mca_params(opal_list_t *info,
const char *type, const char *component,
bool want_internal);
void ompi_info_do_path(bool want_all, opal_cmd_line_t *cmd_line);
void ompi_info_show_path(const char *type, const char *value);
void ompi_info_do_arch(void);
void ompi_info_do_hostname(void);
void ompi_info_do_config(bool want_all);
/*
* Output-related functions
*/
void ompi_info_out(const char *pretty_message,
const char *plain_message,
const char *value);
void ompi_info_out_int(const char *pretty_message,
const char *plain_message,
int value);
/*
* Component-related functions
*/
typedef struct {
opal_list_item_t super;
char *type;
opal_list_t *components;
} ompi_info_component_map_t;
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(ompi_info_component_map_t);
extern opal_pointer_array_t component_map;
void ompi_info_open_components(void);
int ompi_info_register_components(opal_pointer_array_t *mca_types,
opal_pointer_array_t *component_map);
void ompi_info_close_components(void);
void ompi_info_do_config(bool want_all);
END_C_DECLS
#endif /* OMPI_INFO_H */