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.
Этот коммит содержится в:
родитель
8bebf2fa47
Коммит
e335de3564
@ -24,4 +24,3 @@ TARGET_LINK_LIBRARIES (ompi_info libmpi libopen-rte libopen-pal Ws2_32.lib shlwa
|
|||||||
|
|
||||||
INSTALL(TARGETS ompi_info
|
INSTALL(TARGETS ompi_info
|
||||||
DESTINATION bin)
|
DESTINATION bin)
|
||||||
INSTALL(FILES help-ompi_info.txt DESTINATION share/openmpi)
|
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
# Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
# Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
||||||
# Copyright (c) 2008 Sun Microsystems, 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$
|
# $COPYRIGHT$
|
||||||
#
|
#
|
||||||
# Additional copyrights may follow
|
# Additional copyrights may follow
|
||||||
@ -45,8 +47,6 @@ if OMPI_INSTALL_BINARIES
|
|||||||
|
|
||||||
bin_PROGRAMS = ompi_info
|
bin_PROGRAMS = ompi_info
|
||||||
|
|
||||||
dist_pkgdata_DATA = help-ompi_info.txt
|
|
||||||
|
|
||||||
nodist_man_MANS = $(man_pages)
|
nodist_man_MANS = $(man_pages)
|
||||||
|
|
||||||
# Ensure that the man pages are rebuilt if the opal_config.h file
|
# Ensure that the man pages are rebuilt if the opal_config.h file
|
||||||
@ -59,7 +59,6 @@ endif
|
|||||||
ompi_info_SOURCES = \
|
ompi_info_SOURCES = \
|
||||||
ompi_info.h \
|
ompi_info.h \
|
||||||
ompi_info.c \
|
ompi_info.c \
|
||||||
output.c \
|
|
||||||
param.c \
|
param.c \
|
||||||
components.c \
|
components.c \
|
||||||
version.c
|
version.c
|
||||||
|
@ -25,36 +25,11 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "ompi/runtime/params.h"
|
|
||||||
#include "orte/runtime/runtime.h"
|
|
||||||
|
|
||||||
#include "opal/util/argv.h"
|
#include "opal/util/argv.h"
|
||||||
|
#include "opal/runtime/opal_info_support.h"
|
||||||
|
|
||||||
#include "opal/mca/event/base/base.h"
|
#include "orte/runtime/runtime.h"
|
||||||
#include "opal/util/output.h"
|
#include "orte/runtime/orte_info_support.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 "ompi/mca/allocator/base/base.h"
|
#include "ompi/mca/allocator/base/base.h"
|
||||||
#include "ompi/mca/coll/base/base.h"
|
#include "ompi/mca/coll/base/base.h"
|
||||||
@ -84,80 +59,19 @@
|
|||||||
#include "ompi/mca/fcoll/base/base.h"
|
#include "ompi/mca/fcoll/base/base.h"
|
||||||
#include "ompi/mca/sharedfp/sharedfp.h"
|
#include "ompi/mca/sharedfp/sharedfp.h"
|
||||||
#include "ompi/mca/sharedfp/base/base.h"
|
#include "ompi/mca/sharedfp/base/base.h"
|
||||||
|
#include "ompi/runtime/params.h"
|
||||||
|
|
||||||
#if OPAL_ENABLE_FT_CR == 1
|
#if OPAL_ENABLE_FT_CR == 1
|
||||||
#include "ompi/mca/crcp/crcp.h"
|
#include "ompi/mca/crcp/crcp.h"
|
||||||
#include "ompi/mca/crcp/base/base.h"
|
#include "ompi/mca/crcp/base/base.h"
|
||||||
#endif
|
#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"
|
#include "ompi/tools/ompi_info/ompi_info.h"
|
||||||
/*
|
/*
|
||||||
* Public variables
|
* 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
|
* Private variables
|
||||||
@ -173,30 +87,23 @@ static bool opened_components = false;
|
|||||||
* out the environment of all OMPI_MCA_<type> variables to ensure
|
* out the environment of all OMPI_MCA_<type> variables to ensure
|
||||||
* that the open algorithms don't try to only open one component.
|
* 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;
|
int i;
|
||||||
char *env, *str;
|
char *env, *str;
|
||||||
char *target, *save, *type;
|
char *target, *save, *type;
|
||||||
char **env_save=NULL;
|
char **env_save=NULL;
|
||||||
bool need_close_components = false;
|
bool need_close_components = false;
|
||||||
ompi_info_component_map_t *map;
|
opal_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);
|
|
||||||
|
|
||||||
/* Clear out the environment. Use strdup() to orphan the resulting
|
/* Clear out the environment. Use strdup() to orphan the resulting
|
||||||
* strings because items are placed in the environment by reference,
|
* strings because items are placed in the environment by reference,
|
||||||
* not by value.
|
* not by value.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (i = 0; i < mca_types.size; ++i) {
|
for (i = 0; i < mca_types->size; ++i) {
|
||||||
if (NULL == (type = (char*)opal_pointer_array_get_item(&mca_types, i))) {
|
if (NULL == (type = (char*)opal_pointer_array_get_item(mca_types, i))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
asprintf(&env, "OMPI_MCA_%s", type);
|
asprintf(&env, "OMPI_MCA_%s", type);
|
||||||
@ -213,463 +120,182 @@ void ompi_info_open_components(void)
|
|||||||
free(env);
|
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 */
|
/* Register the MPI layer's MCA parameters */
|
||||||
|
|
||||||
if (OMPI_SUCCESS != ompi_mpi_register_params()) {
|
if (OMPI_SUCCESS != ompi_mpi_register_params()) {
|
||||||
str = "ompi_mpi_Register_params failed";
|
str = "ompi_mpi_Register_params failed";
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find / open all components */
|
/* Find / open all components */
|
||||||
map = OBJ_NEW(ompi_info_component_map_t);
|
map = OBJ_NEW(opal_info_component_map_t);
|
||||||
map->type = strdup("base");
|
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 */
|
/* set default error message from here forward */
|
||||||
str = "A component framework failed to open properly.";
|
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 */
|
/* MPI frameworks */
|
||||||
|
|
||||||
if (OMPI_SUCCESS != mca_allocator_base_open()) {
|
if (OMPI_SUCCESS != mca_allocator_base_open()) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
map = OBJ_NEW(ompi_info_component_map_t);
|
map = OBJ_NEW(opal_info_component_map_t);
|
||||||
map->type = strdup("allocator");
|
map->type = strdup("allocator");
|
||||||
map->components = &mca_allocator_base_components;
|
map->components = &mca_allocator_base_components;
|
||||||
opal_pointer_array_add(&component_map, map);
|
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);
|
|
||||||
|
|
||||||
if (OMPI_SUCCESS != mca_btl_base_open()) {
|
if (OMPI_SUCCESS != mca_btl_base_open()) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
map = OBJ_NEW(ompi_info_component_map_t);
|
map = OBJ_NEW(opal_info_component_map_t);
|
||||||
map->type = strdup("btl");
|
map->type = strdup("btl");
|
||||||
map->components = &mca_btl_base_components_opened;
|
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;
|
goto error;
|
||||||
}
|
}
|
||||||
map = OBJ_NEW(ompi_info_component_map_t);
|
map = OBJ_NEW(opal_info_component_map_t);
|
||||||
map->type = strdup("mtl");
|
map->type = strdup("coll");
|
||||||
map->components = &ompi_mtl_base_components_opened;
|
map->components = &mca_coll_base_components_opened;
|
||||||
opal_pointer_array_add(&component_map, map);
|
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 OPAL_ENABLE_FT_CR == 1
|
||||||
if (OMPI_SUCCESS != ompi_crcp_base_open()) {
|
if (OMPI_SUCCESS != ompi_crcp_base_open()) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
map = OBJ_NEW(ompi_info_component_map_t);
|
map = OBJ_NEW(opal_info_component_map_t);
|
||||||
map->type = strdup("crcp");
|
map->type = strdup("crcp");
|
||||||
map->components = &ompi_crcp_base_components_available;
|
map->components = &ompi_crcp_base_components_available;
|
||||||
opal_pointer_array_add(&component_map, map);
|
opal_pointer_array_add(component_map, map);
|
||||||
#endif
|
#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 */
|
/* flag that we need to close components */
|
||||||
need_close_components = true;
|
need_close_components = true;
|
||||||
|
|
||||||
@ -687,7 +313,7 @@ void ompi_info_open_components(void)
|
|||||||
/* All done */
|
/* All done */
|
||||||
|
|
||||||
opened_components = true;
|
opened_components = true;
|
||||||
return;
|
return OMPI_SUCCESS;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
fprintf(stderr, "%s\n", str);
|
fprintf(stderr, "%s\n", str);
|
||||||
@ -696,93 +322,46 @@ error:
|
|||||||
opened_components = true;
|
opened_components = true;
|
||||||
ompi_info_close_components();
|
ompi_info_close_components();
|
||||||
}
|
}
|
||||||
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ompi_info_close_components()
|
void ompi_info_close_components()
|
||||||
{
|
{
|
||||||
int i;
|
/* Note that the order of shutdown here doesn't matter because
|
||||||
ompi_info_component_map_t *map;
|
* we aren't *using* any components -- none were selected, so
|
||||||
|
* there are no dependencies between the frameworks. We list
|
||||||
if (opened_components) {
|
* 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
|
* We also explicitly ignore the return values from the
|
||||||
* close() functions -- what would we do if there was an
|
* close() functions -- what would we do if there was an
|
||||||
* error?
|
* error?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if OPAL_ENABLE_FT_CR == 1
|
/* close the OPAL components */
|
||||||
(void) ompi_crcp_base_close();
|
(void) opal_info_close_components();
|
||||||
#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();
|
|
||||||
|
|
||||||
(void) orte_grpcomm_base_close();
|
/* close the ORTE components */
|
||||||
(void) orte_db_base_close();
|
(void) orte_info_close_components();
|
||||||
(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();
|
|
||||||
|
|
||||||
#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
|
#if OPAL_ENABLE_FT_CR == 1
|
||||||
(void) opal_crs_base_close();
|
(void) ompi_crcp_base_close();
|
||||||
#endif
|
#endif
|
||||||
(void) opal_dss_close();
|
(void) ompi_op_base_close();
|
||||||
(void) opal_event_base_close();
|
(void) ompi_dpm_base_close();
|
||||||
|
(void) ompi_pubsub_base_close();
|
||||||
/* Do not call OPAL's installdirs close; it will be handled in
|
(void) mca_topo_base_close();
|
||||||
* opal_finalize_util().
|
(void) mca_btl_base_close();
|
||||||
*/
|
(void) ompi_mtl_base_close();
|
||||||
for (i=0; i < component_map.size; i++) {
|
(void) mca_pml_base_close();
|
||||||
if (NULL != (map = (ompi_info_component_map_t*)opal_pointer_array_get_item(&component_map, i))) {
|
(void) mca_mpool_base_close();
|
||||||
OBJ_RELEASE(map);
|
(void) mca_rcache_base_close();
|
||||||
}
|
(void) mca_io_base_close();
|
||||||
}
|
(void) mca_fbtl_base_close();
|
||||||
OBJ_DESTRUCT(&component_map);
|
(void) mca_fcoll_base_close();
|
||||||
}
|
(void) mca_fs_base_close();
|
||||||
|
(void) mca_sharedfp_base_close();
|
||||||
opened_components = false;
|
(void) mca_coll_base_close();
|
||||||
|
(void) mca_allocator_base_close();
|
||||||
|
(void) ompi_osc_base_close();
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2007-2012 Cisco Systems, Inc. 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) 2011-2012 University of Houston. All rights reserved.
|
||||||
|
* Copyright (c) 2010-2012 Los Alamos National Security, LLC.
|
||||||
|
* All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -41,13 +43,11 @@
|
|||||||
#if OPAL_ENABLE_FT_CR == 1
|
#if OPAL_ENABLE_FT_CR == 1
|
||||||
#include "opal/runtime/opal_cr.h"
|
#include "opal/runtime/opal_cr.h"
|
||||||
#endif
|
#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/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/communicator/communicator.h"
|
||||||
#include "ompi/tools/ompi_info/ompi_info.h"
|
#include "ompi/tools/ompi_info/ompi_info.h"
|
||||||
@ -56,270 +56,146 @@
|
|||||||
* Public variables
|
* 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_ompi = "ompi";
|
||||||
const char *ompi_info_type_orte = "orte";
|
|
||||||
const char *ompi_info_type_opal = "opal";
|
|
||||||
const char *ompi_info_type_base = "base";
|
const char *ompi_info_type_base = "base";
|
||||||
|
|
||||||
opal_pointer_array_t mca_types;
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
bool want_help = false;
|
|
||||||
bool cmd_error = false;
|
|
||||||
bool acted = false;
|
bool acted = false;
|
||||||
bool want_all = false;
|
bool want_all = false;
|
||||||
char **app_env = NULL, **global_env = NULL;
|
char **app_env = NULL, **global_env = NULL;
|
||||||
int i, len;
|
int i;
|
||||||
char *str;
|
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 */
|
/* Initialize the argv parsing handle */
|
||||||
if (OMPI_SUCCESS != opal_init_util(&argc, &argv)) {
|
if (OPAL_SUCCESS != opal_init_util(&argc, &argv)) {
|
||||||
orte_show_help("help-ompi_info.txt", "lib-call-fail", true,
|
opal_show_help("help-opal_info.txt", "lib-call-fail", true,
|
||||||
"opal_init_util", __FILE__, __LINE__, NULL);
|
"opal_init_util", __FILE__, __LINE__, NULL);
|
||||||
exit(ret);
|
exit(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
ompi_info_cmd_line = OBJ_NEW(opal_cmd_line_t);
|
ompi_info_cmd_line = OBJ_NEW(opal_cmd_line_t);
|
||||||
if (NULL == ompi_info_cmd_line) {
|
if (NULL == ompi_info_cmd_line) {
|
||||||
ret = errno;
|
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_cmd_line_create", __FILE__, __LINE__, NULL);
|
||||||
opal_finalize_util();
|
|
||||||
exit(ret);
|
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;
|
/* initialize the command line, parse it, and return the directives
|
||||||
usage = opal_cmd_line_get_usage_msg(ompi_info_cmd_line);
|
* telling us what the user wants output
|
||||||
str = opal_show_help_string("help-ompi_info.txt", "usage",
|
*/
|
||||||
true, usage);
|
if (OPAL_SUCCESS != (ret = opal_info_init(argc, argv, ompi_info_cmd_line))) {
|
||||||
if (NULL != str) {
|
exit(ret);
|
||||||
printf("%s", str);
|
|
||||||
free(str);
|
|
||||||
}
|
|
||||||
free(usage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 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 */
|
/* setup the mca_types array */
|
||||||
OBJ_CONSTRUCT(&mca_types, opal_pointer_array_t);
|
OBJ_CONSTRUCT(&mca_types, opal_pointer_array_t);
|
||||||
opal_pointer_array_init(&mca_types, 256, INT_MAX, 128);
|
opal_pointer_array_init(&mca_types, 256, INT_MAX, 128);
|
||||||
|
|
||||||
opal_pointer_array_add(&mca_types, "mca");
|
/* add in the opal frameworks */
|
||||||
opal_pointer_array_add(&mca_types, "mpi");
|
opal_info_register_types(&mca_types);
|
||||||
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");
|
|
||||||
|
|
||||||
opal_pointer_array_add(&mca_types, "dpm");
|
/* add in the orte frameworks */
|
||||||
opal_pointer_array_add(&mca_types, "pubsub");
|
orte_info_register_types(&mca_types);
|
||||||
|
|
||||||
|
/* add in the ompi frameworks */
|
||||||
opal_pointer_array_add(&mca_types, "allocator");
|
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, "bml");
|
||||||
opal_pointer_array_add(&mca_types, "rcache");
|
|
||||||
opal_pointer_array_add(&mca_types, "btl");
|
opal_pointer_array_add(&mca_types, "btl");
|
||||||
opal_pointer_array_add(&mca_types, "mtl");
|
opal_pointer_array_add(&mca_types, "coll");
|
||||||
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, "common");
|
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
|
#if OPAL_ENABLE_FT_CR == 1
|
||||||
opal_pointer_array_add(&mca_types, "crcp");
|
opal_pointer_array_add(&mca_types, "crcp");
|
||||||
#endif
|
#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
|
/* init the component map */
|
||||||
opal_pointer_array_add(&mca_types, "iof");
|
OBJ_CONSTRUCT(&component_map, opal_pointer_array_t);
|
||||||
opal_pointer_array_add(&mca_types, "oob");
|
opal_pointer_array_init(&component_map, 256, INT_MAX, 128);
|
||||||
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");
|
|
||||||
|
|
||||||
/* Execute the desired action(s) */
|
/* Register OPAL's params */
|
||||||
|
if (OPAL_SUCCESS != (ret = opal_info_register_components(&mca_types, &component_map))) {
|
||||||
if (opal_cmd_line_is_taken(ompi_info_cmd_line, "ompi_info_pretty")) {
|
exit(ret);
|
||||||
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 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");
|
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")) {
|
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;
|
acted = true;
|
||||||
}
|
}
|
||||||
if (want_all || opal_cmd_line_is_taken(ompi_info_cmd_line, "path")) {
|
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;
|
acted = true;
|
||||||
}
|
}
|
||||||
if (want_all || opal_cmd_line_is_taken(ompi_info_cmd_line, "arch")) {
|
if (want_all || opal_cmd_line_is_taken(ompi_info_cmd_line, "arch")) {
|
||||||
ompi_info_do_arch();
|
opal_info_do_arch();
|
||||||
acted = true;
|
acted = true;
|
||||||
}
|
}
|
||||||
if (want_all || opal_cmd_line_is_taken(ompi_info_cmd_line, "hostname")) {
|
if (want_all || opal_cmd_line_is_taken(ompi_info_cmd_line, "hostname")) {
|
||||||
ompi_info_do_hostname();
|
opal_info_do_hostname();
|
||||||
acted = true;
|
acted = true;
|
||||||
}
|
}
|
||||||
if (want_all || opal_cmd_line_is_taken(ompi_info_cmd_line, "config")) {
|
if (want_all || opal_cmd_line_is_taken(ompi_info_cmd_line, "config")) {
|
||||||
ompi_info_do_config(true);
|
ompi_info_do_config(true);
|
||||||
acted = true;
|
acted = true;
|
||||||
}
|
}
|
||||||
if (want_all || opal_cmd_line_is_taken(ompi_info_cmd_line, "param")) {
|
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"));
|
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;
|
acted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If no command line args are specified, show default set */
|
/* If no command line args are specified, show default set */
|
||||||
|
|
||||||
if (!acted) {
|
if (!acted) {
|
||||||
ompi_info_show_ompi_version(ompi_info_ver_full);
|
ompi_info_show_ompi_version(opal_info_ver_full);
|
||||||
ompi_info_show_path(ompi_info_path_prefix, opal_install_dirs.prefix);
|
opal_info_show_path(opal_info_path_prefix, opal_install_dirs.prefix);
|
||||||
ompi_info_do_arch();
|
opal_info_do_arch();
|
||||||
ompi_info_do_hostname();
|
opal_info_do_hostname();
|
||||||
ompi_info_do_config(false);
|
ompi_info_do_config(false);
|
||||||
ompi_info_open_components();
|
|
||||||
for (i = 0; i < mca_types.size; ++i) {
|
for (i = 0; i < mca_types.size; ++i) {
|
||||||
if (NULL == (str = (char*)opal_pointer_array_get_item(&mca_types, i))) {
|
if (NULL == (str = (char*)opal_pointer_array_get_item(&mca_types, i))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (0 != strcmp("mpi", str)) {
|
if (0 != strcmp("mpi", str)) {
|
||||||
ompi_info_show_component_version(str, ompi_info_component_all,
|
opal_info_show_component_version(&mca_types, &component_map,
|
||||||
ompi_info_ver_full, ompi_info_type_all);
|
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();
|
ompi_info_close_components();
|
||||||
OBJ_RELEASE(ompi_info_cmd_line);
|
OBJ_RELEASE(ompi_info_cmd_line);
|
||||||
OBJ_DESTRUCT(&mca_types);
|
OBJ_DESTRUCT(&mca_types);
|
||||||
mca_base_close();
|
for (i=0; i < component_map.size; i++) {
|
||||||
|
if (NULL != (map = (opal_info_component_map_t*)opal_pointer_array_get_item(&component_map, i))) {
|
||||||
opal_finalize_util();
|
OBJ_RELEASE(map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
OBJ_DESTRUCT(&component_map);
|
||||||
|
|
||||||
|
opal_info_finalize();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -32,97 +32,21 @@ BEGIN_C_DECLS
|
|||||||
* Globals
|
* 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_ompi;
|
||||||
extern const char *ompi_info_type_orte;
|
|
||||||
extern const char *ompi_info_type_opal;
|
|
||||||
extern const char *ompi_info_type_base;
|
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_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);
|
|
||||||
|
|
||||||
/*
|
int ompi_info_register_components(opal_pointer_array_t *mca_types,
|
||||||
* Parameter/configuration-related functions
|
opal_pointer_array_t *component_map);
|
||||||
*/
|
|
||||||
|
|
||||||
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);
|
|
||||||
void ompi_info_close_components(void);
|
void ompi_info_close_components(void);
|
||||||
|
|
||||||
|
void ompi_info_do_config(bool want_all);
|
||||||
|
|
||||||
END_C_DECLS
|
END_C_DECLS
|
||||||
|
|
||||||
#endif /* OMPI_INFO_H */
|
#endif /* OMPI_INFO_H */
|
||||||
|
@ -1,203 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
|
|
||||||
* University Research and Technology
|
|
||||||
* Corporation. All rights reserved.
|
|
||||||
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
|
||||||
* of Tennessee Research Foundation. All rights
|
|
||||||
* reserved.
|
|
||||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
||||||
* University of Stuttgart. All rights reserved.
|
|
||||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
||||||
* All rights reserved.
|
|
||||||
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
|
||||||
* $COPYRIGHT$
|
|
||||||
*
|
|
||||||
* Additional copyrights may follow
|
|
||||||
*
|
|
||||||
* $HEADER$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "ompi_config.h"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_SIGNAL_H
|
|
||||||
#include <signal.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_TERMIOS_H
|
|
||||||
#include <termios.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_SYS_IOCTL_H
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
#endif
|
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
|
||||||
#include <io.h>
|
|
||||||
#endif /* __WINDOWS__ */
|
|
||||||
|
|
||||||
#include "ompi/tools/ompi_info/ompi_info.h"
|
|
||||||
|
|
||||||
#include "opal/util/show_help.h"
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Private variables - set some reasonable screen size defaults
|
|
||||||
*/
|
|
||||||
|
|
||||||
static int centerpoint = 24;
|
|
||||||
static int screen_width = 78;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Prints the passed integer in a pretty or parsable format.
|
|
||||||
*/
|
|
||||||
void ompi_info_out(const char *pretty_message, const char *plain_message, const char *value)
|
|
||||||
{
|
|
||||||
size_t i, len, max_value_width;
|
|
||||||
char *spaces = NULL;
|
|
||||||
char *filler = NULL;
|
|
||||||
char *pos, *v, savev, *v_to_free;
|
|
||||||
|
|
||||||
#ifdef HAVE_ISATTY
|
|
||||||
/* If we have isatty(), if this is not a tty, then disable
|
|
||||||
* wrapping for grep-friendly behavior
|
|
||||||
*/
|
|
||||||
if (0 == isatty(STDOUT_FILENO)) {
|
|
||||||
screen_width = INT_MAX;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef TIOCGWINSZ
|
|
||||||
if (screen_width < INT_MAX) {
|
|
||||||
struct winsize size;
|
|
||||||
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, (char*) &size) >= 0) {
|
|
||||||
screen_width = size.ws_col;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Strip leading and trailing whitespace from the string value */
|
|
||||||
v = v_to_free = strdup(value);
|
|
||||||
len = strlen(v);
|
|
||||||
if (isspace(v[0])) {
|
|
||||||
char *newv;
|
|
||||||
i = 0;
|
|
||||||
while (isspace(v[i]) && i < len) {
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
newv = strdup(v + i);
|
|
||||||
free(v_to_free);
|
|
||||||
v_to_free = v = newv;
|
|
||||||
len = strlen(v);
|
|
||||||
}
|
|
||||||
if (len > 0 && isspace(v[len - 1])) {
|
|
||||||
i = len - 1;
|
|
||||||
/* Note that i is size_t (unsigned), so we can't check for i
|
|
||||||
>= 0. But we don't need to, because if the value was all
|
|
||||||
whitespace, stripping whitespace from the left (above)
|
|
||||||
would have resulted in an empty string, and we wouldn't
|
|
||||||
have gotten into this block. */
|
|
||||||
while (isspace(v[i]) && i > 0) {
|
|
||||||
--i;
|
|
||||||
}
|
|
||||||
v[i + 1] = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ompi_info_pretty && NULL != pretty_message) {
|
|
||||||
if (centerpoint > (int)strlen(pretty_message)) {
|
|
||||||
asprintf(&spaces, "%*s", centerpoint -
|
|
||||||
(int)strlen(pretty_message), " ");
|
|
||||||
} else {
|
|
||||||
spaces = strdup("");
|
|
||||||
#if OPAL_ENABLE_DEBUG
|
|
||||||
if (centerpoint < (int)strlen(pretty_message)) {
|
|
||||||
opal_show_help("help-ompi_info.txt",
|
|
||||||
"developer warning: field too long", false,
|
|
||||||
pretty_message, centerpoint);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
max_value_width = screen_width - strlen(spaces) - strlen(pretty_message) - 2;
|
|
||||||
if (0 < strlen(pretty_message)) {
|
|
||||||
asprintf(&filler, "%s%s: ", spaces, pretty_message);
|
|
||||||
} else {
|
|
||||||
asprintf(&filler, "%s ", spaces);
|
|
||||||
}
|
|
||||||
free(spaces);
|
|
||||||
spaces = NULL;
|
|
||||||
|
|
||||||
while (true) {
|
|
||||||
if (strlen(v) < max_value_width) {
|
|
||||||
printf("%s%s\n", filler, v);
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
asprintf(&spaces, "%*s", centerpoint + 2, " ");
|
|
||||||
|
|
||||||
/* Work backwards to find the first space before
|
|
||||||
* max_value_width
|
|
||||||
*/
|
|
||||||
savev = v[max_value_width];
|
|
||||||
v[max_value_width] = '\0';
|
|
||||||
pos = (char*)strrchr(v, (int)' ');
|
|
||||||
v[max_value_width] = savev;
|
|
||||||
if (NULL == pos) {
|
|
||||||
/* No space found < max_value_width. Look for the first
|
|
||||||
* space after max_value_width.
|
|
||||||
*/
|
|
||||||
pos = strchr(&v[max_value_width], ' ');
|
|
||||||
|
|
||||||
if (NULL == pos) {
|
|
||||||
|
|
||||||
/* There's just no spaces. So just print it and be done. */
|
|
||||||
|
|
||||||
printf("%s%s\n", filler, v);
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
*pos = '\0';
|
|
||||||
printf("%s%s\n", filler, v);
|
|
||||||
v = pos + 1;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
*pos = '\0';
|
|
||||||
printf("%s%s\n", filler, v);
|
|
||||||
v = pos + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Reset for the next iteration */
|
|
||||||
free(filler);
|
|
||||||
filler = strdup(spaces);
|
|
||||||
free(spaces);
|
|
||||||
spaces = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (NULL != filler) {
|
|
||||||
free(filler);
|
|
||||||
}
|
|
||||||
if (NULL != spaces) {
|
|
||||||
free(spaces);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (NULL != plain_message && 0 < strlen(plain_message)) {
|
|
||||||
printf("%s:%s\n", plain_message, value);
|
|
||||||
} else {
|
|
||||||
printf(" %s\n", value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (NULL != v_to_free) {
|
|
||||||
free(v_to_free);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ompi_info_out_int(const char *pretty_message,
|
|
||||||
const char *plain_message,
|
|
||||||
int value)
|
|
||||||
{
|
|
||||||
char *valstr;
|
|
||||||
|
|
||||||
asprintf(&valstr, "%d", (int)value);
|
|
||||||
ompi_info_out(pretty_message, plain_message, valstr);
|
|
||||||
free(valstr);
|
|
||||||
}
|
|
@ -34,12 +34,12 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include MCA_timer_IMPLEMENTATION_HEADER
|
#include MCA_timer_IMPLEMENTATION_HEADER
|
||||||
#include "opal/mca/installdirs/installdirs.h"
|
|
||||||
#include "opal/class/opal_value_array.h"
|
#include "opal/class/opal_value_array.h"
|
||||||
#include "opal/class/opal_pointer_array.h"
|
#include "opal/class/opal_pointer_array.h"
|
||||||
#include "opal/util/printf.h"
|
#include "opal/util/printf.h"
|
||||||
#include "opal/memoryhooks/memory.h"
|
#include "opal/memoryhooks/memory.h"
|
||||||
#include "opal/mca/base/mca_base_param.h"
|
#include "opal/mca/base/mca_base_param.h"
|
||||||
|
#include "opal/runtime/opal_info_support.h"
|
||||||
|
|
||||||
#include "orte/util/show_help.h"
|
#include "orte/util/show_help.h"
|
||||||
|
|
||||||
@ -47,439 +47,8 @@
|
|||||||
#include "ompi/include/mpi_portable_platform.h"
|
#include "ompi/include/mpi_portable_platform.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Public variables
|
|
||||||
*/
|
|
||||||
|
|
||||||
const char *ompi_info_component_all = "all";
|
|
||||||
const char *ompi_info_param_all = "all";
|
|
||||||
|
|
||||||
const char *ompi_info_path_prefix = "prefix";
|
|
||||||
const char *ompi_info_path_bindir = "bindir";
|
|
||||||
const char *ompi_info_path_libdir = "libdir";
|
|
||||||
const char *ompi_info_path_incdir = "incdir";
|
|
||||||
const char *ompi_info_path_mandir = "mandir";
|
|
||||||
const char *ompi_info_path_pkglibdir = "pkglibdir";
|
|
||||||
const char *ompi_info_path_sysconfdir = "sysconfdir";
|
|
||||||
const char *ompi_info_path_exec_prefix = "exec_prefix";
|
|
||||||
const char *ompi_info_path_sbindir = "sbindir";
|
|
||||||
const char *ompi_info_path_libexecdir = "libexecdir";
|
|
||||||
const char *ompi_info_path_datarootdir = "datarootdir";
|
|
||||||
const char *ompi_info_path_datadir = "datadir";
|
|
||||||
const char *ompi_info_path_sharedstatedir = "sharedstatedir";
|
|
||||||
const char *ompi_info_path_localstatedir = "localstatedir";
|
|
||||||
const char *ompi_info_path_infodir = "infodir";
|
|
||||||
const char *ompi_info_path_pkgdatadir = "pkgdatadir";
|
|
||||||
const char *ompi_info_path_pkgincludedir = "pkgincludedir";
|
|
||||||
|
|
||||||
const char *ompi_info_deprecated_value = "deprecated-ompi-info-value";
|
const char *ompi_info_deprecated_value = "deprecated-ompi-info-value";
|
||||||
|
|
||||||
/*
|
|
||||||
* External variables
|
|
||||||
*
|
|
||||||
* This exists in mca/base/mca_base_param.c. It's not extern'ed
|
|
||||||
* in mca_base_param.h so that no one else will use it.
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern opal_value_array_t mca_base_params;
|
|
||||||
|
|
||||||
|
|
||||||
void ompi_info_do_params(bool want_all_in, bool want_internal)
|
|
||||||
{
|
|
||||||
int count;
|
|
||||||
char *type, *component, *str;
|
|
||||||
bool found;
|
|
||||||
int i;
|
|
||||||
bool want_all = false;
|
|
||||||
opal_list_t *info;
|
|
||||||
|
|
||||||
ompi_info_open_components();
|
|
||||||
|
|
||||||
if (want_all_in) {
|
|
||||||
want_all = true;
|
|
||||||
} else {
|
|
||||||
/* See if the special param "all" was givin to --param; that
|
|
||||||
* superceeds any individual type
|
|
||||||
*/
|
|
||||||
count = opal_cmd_line_get_ninsts(ompi_info_cmd_line, "param");
|
|
||||||
for (i = 0; i < count; ++i) {
|
|
||||||
type = opal_cmd_line_get_param(ompi_info_cmd_line, "param", (int)i, 0);
|
|
||||||
if (0 == strcmp(ompi_info_type_all, type)) {
|
|
||||||
want_all = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get a dump of all the MCA params */
|
|
||||||
mca_base_param_dump(&info, want_internal);
|
|
||||||
|
|
||||||
/* Show the params */
|
|
||||||
|
|
||||||
if (want_all) {
|
|
||||||
for (i = 0; i < mca_types.size; ++i) {
|
|
||||||
if (NULL == (type = (char *)opal_pointer_array_get_item(&mca_types, i))) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
ompi_info_show_mca_params(info, type, ompi_info_component_all, want_internal);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < count; ++i) {
|
|
||||||
type = opal_cmd_line_get_param(ompi_info_cmd_line, "param", (int)i, 0);
|
|
||||||
component = opal_cmd_line_get_param(ompi_info_cmd_line, "param", (int)i, 1);
|
|
||||||
|
|
||||||
for (found = false, i = 0; i < mca_types.size; ++i) {
|
|
||||||
if (NULL == (str = (char *)opal_pointer_array_get_item(&mca_types, i))) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (0 == strcmp(str, type)) {
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!found) {
|
|
||||||
char *usage = opal_cmd_line_get_usage_msg(ompi_info_cmd_line);
|
|
||||||
orte_show_help("help-ompi_info.txt", "not-found", true, type);
|
|
||||||
free(usage);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
ompi_info_show_mca_params(info, type, component, want_internal);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Release all the MCA param memory */
|
|
||||||
mca_base_param_dump_release(info);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ompi_info_show_mca_params(opal_list_t *info,
|
|
||||||
const char *type, const char *component,
|
|
||||||
bool want_internal)
|
|
||||||
{
|
|
||||||
opal_list_item_t *i;
|
|
||||||
mca_base_param_info_t *p;
|
|
||||||
char *value_string, *empty = "";
|
|
||||||
char *message, *content, *tmp;
|
|
||||||
int value_int, j;
|
|
||||||
mca_base_param_source_t source;
|
|
||||||
char *src_file;
|
|
||||||
|
|
||||||
for (i = opal_list_get_first(info); i != opal_list_get_last(info);
|
|
||||||
i = opal_list_get_next(i)) {
|
|
||||||
p = (mca_base_param_info_t*) i;
|
|
||||||
|
|
||||||
if (NULL != p->mbpp_type_name && 0 == strcmp(type, p->mbpp_type_name)) {
|
|
||||||
if (0 == strcmp(component, ompi_info_component_all) ||
|
|
||||||
NULL == p->mbpp_component_name ||
|
|
||||||
(NULL != p->mbpp_component_name &&
|
|
||||||
0 == strcmp(component, p->mbpp_component_name))) {
|
|
||||||
|
|
||||||
/* Find the source of the value */
|
|
||||||
if (OPAL_SUCCESS !=
|
|
||||||
mca_base_param_lookup_source(p->mbpp_index, &source, &src_file)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Make a char *for the default value. Invoke a
|
|
||||||
* lookup because it may transform the char *("~/" ->
|
|
||||||
* "<home dir>/") or get the value from the
|
|
||||||
* environment, a file, etc.
|
|
||||||
*/
|
|
||||||
if (MCA_BASE_PARAM_TYPE_STRING == p->mbpp_type) {
|
|
||||||
mca_base_param_lookup_string(p->mbpp_index,
|
|
||||||
&value_string);
|
|
||||||
|
|
||||||
/* Can't let the char *be NULL because we
|
|
||||||
* assign it to a std::string, below
|
|
||||||
*/
|
|
||||||
if (NULL == value_string) {
|
|
||||||
value_string = strdup(empty);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
mca_base_param_lookup_int(p->mbpp_index, &value_int);
|
|
||||||
asprintf(&value_string, "%d", value_int);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Build up the strings to ompi_info_output. */
|
|
||||||
|
|
||||||
if (ompi_info_pretty) {
|
|
||||||
asprintf(&message, "MCA %s", p->mbpp_type_name);
|
|
||||||
|
|
||||||
/* Put in the real, full name (which may be
|
|
||||||
* different than the categorization).
|
|
||||||
*/
|
|
||||||
asprintf(&content, "%s \"%s\" (%s: <%s>, data source: ",
|
|
||||||
p->mbpp_read_only ? "information" : "parameter",
|
|
||||||
p->mbpp_full_name,
|
|
||||||
p->mbpp_read_only ? "value" : "current value",
|
|
||||||
(0 == strlen(value_string)) ? "none" : value_string);
|
|
||||||
|
|
||||||
/* Indicate where the param was set from */
|
|
||||||
switch(source) {
|
|
||||||
case MCA_BASE_PARAM_SOURCE_DEFAULT:
|
|
||||||
asprintf(&tmp, "%sdefault value", content);
|
|
||||||
free(content);
|
|
||||||
content = tmp;
|
|
||||||
break;
|
|
||||||
case MCA_BASE_PARAM_SOURCE_ENV:
|
|
||||||
asprintf(&tmp, "%senvironment or cmdline", content);
|
|
||||||
free(content);
|
|
||||||
content = tmp;
|
|
||||||
break;
|
|
||||||
case MCA_BASE_PARAM_SOURCE_FILE:
|
|
||||||
asprintf(&tmp, "%sfile [%s]", content, src_file);
|
|
||||||
free(content);
|
|
||||||
content = tmp;
|
|
||||||
break;
|
|
||||||
case MCA_BASE_PARAM_SOURCE_OVERRIDE:
|
|
||||||
asprintf(&tmp, "%sAPI override", content);
|
|
||||||
free(content);
|
|
||||||
content = tmp;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Is this parameter deprecated? */
|
|
||||||
if (p->mbpp_deprecated) {
|
|
||||||
asprintf(&tmp, "%s, deprecated", content);
|
|
||||||
free(content);
|
|
||||||
content = tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Does this parameter have any synonyms? */
|
|
||||||
if (p->mbpp_synonyms_len > 0) {
|
|
||||||
asprintf(&tmp, "%s, synonyms: ", content);
|
|
||||||
free(content);
|
|
||||||
content = tmp;
|
|
||||||
for (j = 0; j < p->mbpp_synonyms_len; ++j) {
|
|
||||||
if (j > 0) {
|
|
||||||
asprintf(&tmp, "%s, %s", content, p->mbpp_synonyms[j]->mbpp_full_name);
|
|
||||||
free(content);
|
|
||||||
content = tmp;
|
|
||||||
} else {
|
|
||||||
asprintf(&tmp, "%s%s", content, p->mbpp_synonyms[j]->mbpp_full_name);
|
|
||||||
free(content);
|
|
||||||
content = tmp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Is this parameter a synonym of something else? */
|
|
||||||
else if (NULL != p->mbpp_synonym_parent) {
|
|
||||||
asprintf(&tmp, "%s, synonym of: %s", content, p->mbpp_synonym_parent->mbpp_full_name);
|
|
||||||
free(content);
|
|
||||||
content = tmp;
|
|
||||||
}
|
|
||||||
asprintf(&tmp, "%s)", content);
|
|
||||||
free(content);
|
|
||||||
content = tmp;
|
|
||||||
ompi_info_out(message, message, content);
|
|
||||||
free(message);
|
|
||||||
free(content);
|
|
||||||
|
|
||||||
/* If we have a help message, ompi_info_output it */
|
|
||||||
if (NULL != p->mbpp_help_msg) {
|
|
||||||
ompi_info_out("", "", p->mbpp_help_msg);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
/* build the message*/
|
|
||||||
asprintf(&tmp, "mca:%s:%s:param:%s:", p->mbpp_type_name,
|
|
||||||
(NULL == p->mbpp_component_name) ? "base" : p->mbpp_component_name,
|
|
||||||
p->mbpp_full_name);
|
|
||||||
|
|
||||||
/* Output the value */
|
|
||||||
asprintf(&message, "%svalue", tmp);
|
|
||||||
ompi_info_out(message, message, value_string);
|
|
||||||
free(message);
|
|
||||||
|
|
||||||
/* Indicate where the param was set from */
|
|
||||||
|
|
||||||
asprintf(&message, "%sdata_source", tmp);
|
|
||||||
switch(source) {
|
|
||||||
case MCA_BASE_PARAM_SOURCE_DEFAULT:
|
|
||||||
content = strdup("default value");
|
|
||||||
break;
|
|
||||||
case MCA_BASE_PARAM_SOURCE_ENV:
|
|
||||||
content = strdup("environment-cmdline");
|
|
||||||
break;
|
|
||||||
case MCA_BASE_PARAM_SOURCE_FILE:
|
|
||||||
asprintf(&content, "file: %s", src_file);
|
|
||||||
break;
|
|
||||||
case MCA_BASE_PARAM_SOURCE_OVERRIDE:
|
|
||||||
content = strdup("API override");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
ompi_info_out(message, message, content);
|
|
||||||
free(message);
|
|
||||||
free(content);
|
|
||||||
|
|
||||||
/* Output whether it's read only or writable */
|
|
||||||
|
|
||||||
asprintf(&message, "%sstatus", tmp);
|
|
||||||
content = p->mbpp_read_only ? "read-only" : "writable";
|
|
||||||
ompi_info_out(message, message, content);
|
|
||||||
free(message);
|
|
||||||
|
|
||||||
/* If it has a help message, ompi_info_output that */
|
|
||||||
|
|
||||||
if (NULL != p->mbpp_help_msg) {
|
|
||||||
asprintf(&message, "%shelp", tmp);
|
|
||||||
content = p->mbpp_help_msg;
|
|
||||||
ompi_info_out(message, message, content);
|
|
||||||
free(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Is this parameter deprecated? */
|
|
||||||
asprintf(&message, "%sdeprecated", tmp);
|
|
||||||
content = p->mbpp_deprecated ? "yes" : "no";
|
|
||||||
ompi_info_out(message, message, content);
|
|
||||||
free(message);
|
|
||||||
|
|
||||||
/* Does this parameter have any synonyms? */
|
|
||||||
if (p->mbpp_synonyms_len > 0) {
|
|
||||||
for (j = 0; j < p->mbpp_synonyms_len; ++j) {
|
|
||||||
asprintf(&message, "%ssynonym:name", tmp);
|
|
||||||
content = p->mbpp_synonyms[j]->mbpp_full_name;
|
|
||||||
ompi_info_out(message, message, content);
|
|
||||||
free(message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Is this parameter a synonym of something else? */
|
|
||||||
else if (NULL != p->mbpp_synonym_parent) {
|
|
||||||
asprintf(&message, "%ssynonym_of:name", tmp);
|
|
||||||
content = p->mbpp_synonym_parent->mbpp_full_name;
|
|
||||||
ompi_info_out(message, message, content);
|
|
||||||
free(message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If we allocated the string, then free it */
|
|
||||||
|
|
||||||
if (NULL != value_string) {
|
|
||||||
free(value_string);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ompi_info_do_path(bool want_all, opal_cmd_line_t *cmd_line)
|
|
||||||
{
|
|
||||||
int i, count;
|
|
||||||
char *scope;
|
|
||||||
|
|
||||||
/* Check bozo case */
|
|
||||||
count = opal_cmd_line_get_ninsts(cmd_line, "path");
|
|
||||||
for (i = 0; i < count; ++i) {
|
|
||||||
scope = opal_cmd_line_get_param(cmd_line, "path", i, 0);
|
|
||||||
if (0 == strcmp("all", scope)) {
|
|
||||||
want_all = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (want_all) {
|
|
||||||
ompi_info_show_path(ompi_info_path_prefix, opal_install_dirs.prefix);
|
|
||||||
ompi_info_show_path(ompi_info_path_exec_prefix, opal_install_dirs.exec_prefix);
|
|
||||||
ompi_info_show_path(ompi_info_path_bindir, opal_install_dirs.bindir);
|
|
||||||
ompi_info_show_path(ompi_info_path_sbindir, opal_install_dirs.sbindir);
|
|
||||||
ompi_info_show_path(ompi_info_path_libdir, opal_install_dirs.libdir);
|
|
||||||
ompi_info_show_path(ompi_info_path_incdir, opal_install_dirs.includedir);
|
|
||||||
ompi_info_show_path(ompi_info_path_mandir, opal_install_dirs.mandir);
|
|
||||||
ompi_info_show_path(ompi_info_path_pkglibdir, opal_install_dirs.pkglibdir);
|
|
||||||
ompi_info_show_path(ompi_info_path_libexecdir, opal_install_dirs.libexecdir);
|
|
||||||
ompi_info_show_path(ompi_info_path_datarootdir, opal_install_dirs.datarootdir);
|
|
||||||
ompi_info_show_path(ompi_info_path_datadir, opal_install_dirs.datadir);
|
|
||||||
ompi_info_show_path(ompi_info_path_sysconfdir, opal_install_dirs.sysconfdir);
|
|
||||||
ompi_info_show_path(ompi_info_path_sharedstatedir, opal_install_dirs.sharedstatedir);
|
|
||||||
ompi_info_show_path(ompi_info_path_localstatedir, opal_install_dirs.localstatedir);
|
|
||||||
ompi_info_show_path(ompi_info_path_infodir, opal_install_dirs.infodir);
|
|
||||||
ompi_info_show_path(ompi_info_path_pkgdatadir, opal_install_dirs.pkgdatadir);
|
|
||||||
ompi_info_show_path(ompi_info_path_pkglibdir, opal_install_dirs.pkglibdir);
|
|
||||||
ompi_info_show_path(ompi_info_path_pkgincludedir, opal_install_dirs.pkgincludedir);
|
|
||||||
} else {
|
|
||||||
count = opal_cmd_line_get_ninsts(cmd_line, "path");
|
|
||||||
for (i = 0; i < count; ++i) {
|
|
||||||
scope = opal_cmd_line_get_param(cmd_line, "path", i, 0);
|
|
||||||
|
|
||||||
if (0 == strcmp(ompi_info_path_prefix, scope)) {
|
|
||||||
ompi_info_show_path(ompi_info_path_prefix, opal_install_dirs.prefix);
|
|
||||||
} else if (0 == strcmp(ompi_info_path_bindir, scope)) {
|
|
||||||
ompi_info_show_path(ompi_info_path_bindir, opal_install_dirs.bindir);
|
|
||||||
} else if (0 == strcmp(ompi_info_path_libdir, scope)) {
|
|
||||||
ompi_info_show_path(ompi_info_path_libdir, opal_install_dirs.libdir);
|
|
||||||
} else if (0 == strcmp(ompi_info_path_incdir, scope)) {
|
|
||||||
ompi_info_show_path(ompi_info_path_incdir, opal_install_dirs.includedir);
|
|
||||||
} else if (0 == strcmp(ompi_info_path_mandir, scope)) {
|
|
||||||
ompi_info_show_path(ompi_info_path_mandir, opal_install_dirs.mandir);
|
|
||||||
} else if (0 == strcmp(ompi_info_path_pkglibdir, scope)) {
|
|
||||||
ompi_info_show_path(ompi_info_path_pkglibdir, opal_install_dirs.pkglibdir);
|
|
||||||
} else if (0 == strcmp(ompi_info_path_sysconfdir, scope)) {
|
|
||||||
ompi_info_show_path(ompi_info_path_sysconfdir, opal_install_dirs.sysconfdir);
|
|
||||||
} else if (0 == strcmp(ompi_info_path_exec_prefix, scope)) {
|
|
||||||
ompi_info_show_path(ompi_info_path_exec_prefix, opal_install_dirs.exec_prefix);
|
|
||||||
} else if (0 == strcmp(ompi_info_path_sbindir, scope)) {
|
|
||||||
ompi_info_show_path(ompi_info_path_sbindir, opal_install_dirs.sbindir);
|
|
||||||
} else if (0 == strcmp(ompi_info_path_libexecdir, scope)) {
|
|
||||||
ompi_info_show_path(ompi_info_path_libexecdir, opal_install_dirs.libexecdir);
|
|
||||||
} else if (0 == strcmp(ompi_info_path_datarootdir, scope)) {
|
|
||||||
ompi_info_show_path(ompi_info_path_datarootdir, opal_install_dirs.datarootdir);
|
|
||||||
} else if (0 == strcmp(ompi_info_path_datadir, scope)) {
|
|
||||||
ompi_info_show_path(ompi_info_path_datadir, opal_install_dirs.datadir);
|
|
||||||
} else if (0 == strcmp(ompi_info_path_sharedstatedir, scope)) {
|
|
||||||
ompi_info_show_path(ompi_info_path_sharedstatedir, opal_install_dirs.sharedstatedir);
|
|
||||||
} else if (0 == strcmp(ompi_info_path_localstatedir, scope)) {
|
|
||||||
ompi_info_show_path(ompi_info_path_localstatedir, opal_install_dirs.localstatedir);
|
|
||||||
} else if (0 == strcmp(ompi_info_path_infodir, scope)) {
|
|
||||||
ompi_info_show_path(ompi_info_path_infodir, opal_install_dirs.infodir);
|
|
||||||
} else if (0 == strcmp(ompi_info_path_pkgdatadir, scope)) {
|
|
||||||
ompi_info_show_path(ompi_info_path_pkgdatadir, opal_install_dirs.pkgdatadir);
|
|
||||||
} else if (0 == strcmp(ompi_info_path_pkgincludedir, scope)) {
|
|
||||||
ompi_info_show_path(ompi_info_path_pkgincludedir, opal_install_dirs.pkgincludedir);
|
|
||||||
} else {
|
|
||||||
char *usage = opal_cmd_line_get_usage_msg(cmd_line);
|
|
||||||
orte_show_help("help-ompi_info.txt", "usage", true, usage);
|
|
||||||
free(usage);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ompi_info_show_path(const char *type, const char *value)
|
|
||||||
{
|
|
||||||
char *pretty, *path;
|
|
||||||
|
|
||||||
pretty = strdup(type);
|
|
||||||
pretty[0] = toupper(pretty[0]);
|
|
||||||
|
|
||||||
asprintf(&path, "path:%s", type);
|
|
||||||
ompi_info_out(pretty, path, value);
|
|
||||||
free(pretty);
|
|
||||||
free(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ompi_info_do_arch()
|
|
||||||
{
|
|
||||||
ompi_info_out("Configured architecture", "config:arch", OPAL_ARCH);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ompi_info_do_hostname()
|
|
||||||
{
|
|
||||||
ompi_info_out("Configure host", "config:host", OPAL_CONFIGURE_HOST);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void append(char *dest, size_t max, int *first, char *src)
|
static void append(char *dest, size_t max, int *first, char *src)
|
||||||
{
|
{
|
||||||
size_t len;
|
size_t len;
|
||||||
@ -551,15 +120,15 @@ void ompi_info_do_config(bool want_all)
|
|||||||
char *topology_support;
|
char *topology_support;
|
||||||
char *vt_support;
|
char *vt_support;
|
||||||
|
|
||||||
/* Do a little preprocessor trickery here to figure ompi_info_out the
|
/* Do a little preprocessor trickery here to figure opal_info_out the
|
||||||
* tri-state of MPI_PARAM_CHECK (which will be either 0, 1, or
|
* tri-state of MPI_PARAM_CHECK (which will be either 0, 1, or
|
||||||
* ompi_mpi_param_check). The preprocessor will only allow
|
* ompi_mpi_param_check). The preprocessor will only allow
|
||||||
* comparisons against constants, so you'll get a warning if you
|
* comparisons against constants, so you'll get a warning if you
|
||||||
* check MPI_PARAM_CHECK against 0 or 1, but its real value is the
|
* check MPI_PARAM_CHECK against 0 or 1, but its real value is the
|
||||||
* char *ompi_mpi_param_check. So define ompi_mpi_param_check to
|
* char *ompi_mpi_param_check. So define ompi_mpi_param_check to
|
||||||
* be a constant, and then all the preprocessor comparisons work
|
* be a constant, and then all the preprocessor comparisons work
|
||||||
* ompi_info_out ok. Note that we chose the preprocessor
|
* opal_info_out ok. Note that we chose the preprocessor
|
||||||
* comparison rompi_info_oute because it is not sufficient to
|
* comparison ropal_info_oute because it is not sufficient to
|
||||||
* simply set the variable ompi_mpi_param_check to a non-0/non-1
|
* simply set the variable ompi_mpi_param_check to a non-0/non-1
|
||||||
* value. This is because the compiler will generate a warning
|
* value. This is because the compiler will generate a warning
|
||||||
* that that C variable is unused when MPI_PARAM_CHECK is
|
* that that C variable is unused when MPI_PARAM_CHECK is
|
||||||
@ -702,43 +271,43 @@ void ompi_info_do_config(bool want_all)
|
|||||||
OPAL_ENABLE_CRDEBUG ? "yes" : "no");
|
OPAL_ENABLE_CRDEBUG ? "yes" : "no");
|
||||||
|
|
||||||
/* output values */
|
/* output values */
|
||||||
ompi_info_out("Configured by", "config:user", OPAL_CONFIGURE_USER);
|
opal_info_out("Configured by", "config:user", OPAL_CONFIGURE_USER);
|
||||||
ompi_info_out("Configured on", "config:timestamp", OPAL_CONFIGURE_DATE);
|
opal_info_out("Configured on", "config:timestamp", OPAL_CONFIGURE_DATE);
|
||||||
ompi_info_out("Configure host", "config:host", OPAL_CONFIGURE_HOST);
|
opal_info_out("Configure host", "config:host", OPAL_CONFIGURE_HOST);
|
||||||
|
|
||||||
ompi_info_out("Built by", "build:user", OMPI_BUILD_USER);
|
opal_info_out("Built by", "build:user", OMPI_BUILD_USER);
|
||||||
ompi_info_out("Built on", "build:timestamp", OMPI_BUILD_DATE);
|
opal_info_out("Built on", "build:timestamp", OMPI_BUILD_DATE);
|
||||||
ompi_info_out("Built host", "build:host", OMPI_BUILD_HOST);
|
opal_info_out("Built host", "build:host", OMPI_BUILD_HOST);
|
||||||
|
|
||||||
ompi_info_out("C bindings", "bindings:c", "yes");
|
opal_info_out("C bindings", "bindings:c", "yes");
|
||||||
ompi_info_out("C++ bindings", "bindings:cxx", cxx);
|
opal_info_out("C++ bindings", "bindings:cxx", cxx);
|
||||||
ompi_info_out("Fort mpif.h", "bindings:mpif.h", fortran_mpifh);
|
opal_info_out("Fort mpif.h", "bindings:mpif.h", fortran_mpifh);
|
||||||
free(fortran_mpifh);
|
free(fortran_mpifh);
|
||||||
ompi_info_out("Fort use mpi", "bindings:use_mpi",
|
opal_info_out("Fort use mpi", "bindings:use_mpi",
|
||||||
fortran_usempi);
|
fortran_usempi);
|
||||||
ompi_info_out("Fort use mpi size", "bindings:use_mpi:size",
|
opal_info_out("Fort use mpi size", "bindings:use_mpi:size",
|
||||||
ompi_info_deprecated_value);
|
ompi_info_deprecated_value);
|
||||||
ompi_info_out("Fort use mpi_f08", "bindings:use_mpi_f08",
|
opal_info_out("Fort use mpi_f08", "bindings:use_mpi_f08",
|
||||||
fortran_usempif08);
|
fortran_usempif08);
|
||||||
ompi_info_out("Fort mpi_f08 compliance", "bindings:use_mpi_f08:compliance",
|
opal_info_out("Fort mpi_f08 compliance", "bindings:use_mpi_f08:compliance",
|
||||||
fortran_usempif08_compliance);
|
fortran_usempif08_compliance);
|
||||||
if (NULL != fortran_usempif08_compliance) {
|
if (NULL != fortran_usempif08_compliance) {
|
||||||
free(fortran_usempif08_compliance);
|
free(fortran_usempif08_compliance);
|
||||||
}
|
}
|
||||||
ompi_info_out("Fort mpi_f08 subarrays", "bindings:use_mpi_f08:subarrays-supported",
|
opal_info_out("Fort mpi_f08 subarrays", "bindings:use_mpi_f08:subarrays-supported",
|
||||||
fortran_build_f08_subarrays);
|
fortran_build_f08_subarrays);
|
||||||
ompi_info_out("Java bindings", "bindings:java", java);
|
opal_info_out("Java bindings", "bindings:java", java);
|
||||||
|
|
||||||
ompi_info_out("C compiler", "compiler:c:command", OPAL_CC);
|
opal_info_out("C compiler", "compiler:c:command", OPAL_CC);
|
||||||
ompi_info_out("C compiler absolute", "compiler:c:absolute",
|
opal_info_out("C compiler absolute", "compiler:c:absolute",
|
||||||
OPAL_CC_ABSOLUTE);
|
OPAL_CC_ABSOLUTE);
|
||||||
ompi_info_out("C compiler family name", "compiler:c:familyname",
|
opal_info_out("C compiler family name", "compiler:c:familyname",
|
||||||
_STRINGIFY(OPAL_BUILD_PLATFORM_COMPILER_FAMILYNAME));
|
_STRINGIFY(OPAL_BUILD_PLATFORM_COMPILER_FAMILYNAME));
|
||||||
ompi_info_out("C compiler version", "compiler:c:version",
|
opal_info_out("C compiler version", "compiler:c:version",
|
||||||
_STRINGIFY(OPAL_BUILD_PLATFORM_COMPILER_VERSION_STR));
|
_STRINGIFY(OPAL_BUILD_PLATFORM_COMPILER_VERSION_STR));
|
||||||
|
|
||||||
if (want_all) {
|
if (want_all) {
|
||||||
ompi_info_out_int("C char size", "compiler:c:sizeof:char", sizeof(char));
|
opal_info_out_int("C char size", "compiler:c:sizeof:char", sizeof(char));
|
||||||
/* JMS: should be fixed in MPI-2.2 to differentiate between C
|
/* JMS: should be fixed in MPI-2.2 to differentiate between C
|
||||||
_Bool and C++ bool. For the moment, the code base assumes
|
_Bool and C++ bool. For the moment, the code base assumes
|
||||||
that they are the same. Because of opal_config_bottom.h,
|
that they are the same. Because of opal_config_bottom.h,
|
||||||
@ -746,57 +315,57 @@ void ompi_info_do_config(bool want_all)
|
|||||||
though this technically isn't right. This should be fixed
|
though this technically isn't right. This should be fixed
|
||||||
when we update to MPI-2.2. See below for note about C++
|
when we update to MPI-2.2. See below for note about C++
|
||||||
bool alignment. */
|
bool alignment. */
|
||||||
ompi_info_out_int("C bool size", "compiler:c:sizeof:bool", sizeof(bool));
|
opal_info_out_int("C bool size", "compiler:c:sizeof:bool", sizeof(bool));
|
||||||
ompi_info_out_int("C short size", "compiler:c:sizeof:short", sizeof(short));
|
opal_info_out_int("C short size", "compiler:c:sizeof:short", sizeof(short));
|
||||||
ompi_info_out_int("C int size", "compiler:c:sizeof:int", sizeof(int));
|
opal_info_out_int("C int size", "compiler:c:sizeof:int", sizeof(int));
|
||||||
ompi_info_out_int("C long size", "compiler:c:sizeof:long", sizeof(long));
|
opal_info_out_int("C long size", "compiler:c:sizeof:long", sizeof(long));
|
||||||
ompi_info_out_int("C float size", "compiler:c:sizeof:float", sizeof(float));
|
opal_info_out_int("C float size", "compiler:c:sizeof:float", sizeof(float));
|
||||||
ompi_info_out_int("C double size", "compiler:c:sizeof:double", sizeof(double));
|
opal_info_out_int("C double size", "compiler:c:sizeof:double", sizeof(double));
|
||||||
ompi_info_out_int("C pointer size", "compiler:c:sizeof:pointer", sizeof(void *));
|
opal_info_out_int("C pointer size", "compiler:c:sizeof:pointer", sizeof(void *));
|
||||||
ompi_info_out_int("C char align", "compiler:c:align:char", OPAL_ALIGNMENT_CHAR);
|
opal_info_out_int("C char align", "compiler:c:align:char", OPAL_ALIGNMENT_CHAR);
|
||||||
#if OMPI_BUILD_CXX_BINDINGS
|
#if OMPI_BUILD_CXX_BINDINGS
|
||||||
/* JMS: See above for note about C++ bool size. We don't have
|
/* JMS: See above for note about C++ bool size. We don't have
|
||||||
the bool alignment the way configure currently runs -- need
|
the bool alignment the way configure currently runs -- need
|
||||||
to clean this up when we update for MPI-2.2. */
|
to clean this up when we update for MPI-2.2. */
|
||||||
ompi_info_out_int("C bool align", "compiler:c:align:bool", OPAL_ALIGNMENT_CXX_BOOL);
|
opal_info_out_int("C bool align", "compiler:c:align:bool", OPAL_ALIGNMENT_CXX_BOOL);
|
||||||
#else
|
#else
|
||||||
ompi_info_out("C bool align", "compiler:c:align:bool", "skipped");
|
opal_info_out("C bool align", "compiler:c:align:bool", "skipped");
|
||||||
#endif
|
#endif
|
||||||
ompi_info_out_int("C int align", "compiler:c:align:int", OPAL_ALIGNMENT_INT);
|
opal_info_out_int("C int align", "compiler:c:align:int", OPAL_ALIGNMENT_INT);
|
||||||
ompi_info_out_int("C float align", "compiler:c:align:float", OPAL_ALIGNMENT_FLOAT);
|
opal_info_out_int("C float align", "compiler:c:align:float", OPAL_ALIGNMENT_FLOAT);
|
||||||
ompi_info_out_int("C double align", "compiler:c:align:double", OPAL_ALIGNMENT_DOUBLE);
|
opal_info_out_int("C double align", "compiler:c:align:double", OPAL_ALIGNMENT_DOUBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
ompi_info_out("C++ compiler", "compiler:cxx:command", OMPI_CXX);
|
opal_info_out("C++ compiler", "compiler:cxx:command", OMPI_CXX);
|
||||||
ompi_info_out("C++ compiler absolute", "compiler:cxx:absolute", OMPI_CXX_ABSOLUTE);
|
opal_info_out("C++ compiler absolute", "compiler:cxx:absolute", OMPI_CXX_ABSOLUTE);
|
||||||
ompi_info_out("Fort compiler", "compiler:fortran:command", OMPI_FC);
|
opal_info_out("Fort compiler", "compiler:fortran:command", OMPI_FC);
|
||||||
ompi_info_out("Fort compiler abs", "compiler:fortran:absolute",
|
opal_info_out("Fort compiler abs", "compiler:fortran:absolute",
|
||||||
OMPI_FC_ABSOLUTE);
|
OMPI_FC_ABSOLUTE);
|
||||||
ompi_info_out("Fort ignore TKR", "compiler:fortran:ignore_tkr",
|
opal_info_out("Fort ignore TKR", "compiler:fortran:ignore_tkr",
|
||||||
fortran_have_ignore_tkr);
|
fortran_have_ignore_tkr);
|
||||||
free(fortran_have_ignore_tkr);
|
free(fortran_have_ignore_tkr);
|
||||||
ompi_info_out("Fort 08 assumed shape",
|
opal_info_out("Fort 08 assumed shape",
|
||||||
"compiler:fortran:f08_assumed_shape",
|
"compiler:fortran:f08_assumed_shape",
|
||||||
fortran_have_f08_assumed_shape);
|
fortran_have_f08_assumed_shape);
|
||||||
ompi_info_out("Fort optional args",
|
opal_info_out("Fort optional args",
|
||||||
"compiler:fortran:optional_arguments",
|
"compiler:fortran:optional_arguments",
|
||||||
fortran_have_optional_args);
|
fortran_have_optional_args);
|
||||||
ompi_info_out("Fort BIND(C)",
|
opal_info_out("Fort BIND(C)",
|
||||||
"compiler:fortran:bind_c",
|
"compiler:fortran:bind_c",
|
||||||
fortran_have_bind_c);
|
fortran_have_bind_c);
|
||||||
ompi_info_out("Fort PRIVATE",
|
opal_info_out("Fort PRIVATE",
|
||||||
"compiler:fortran:private",
|
"compiler:fortran:private",
|
||||||
fortran_have_private);
|
fortran_have_private);
|
||||||
ompi_info_out("Fort ABSTRACT",
|
opal_info_out("Fort ABSTRACT",
|
||||||
"compiler:fortran:abstract",
|
"compiler:fortran:abstract",
|
||||||
fortran_have_abstract);
|
fortran_have_abstract);
|
||||||
ompi_info_out("Fort ASYNCHRONOUS",
|
opal_info_out("Fort ASYNCHRONOUS",
|
||||||
"compiler:fortran:asynchronous",
|
"compiler:fortran:asynchronous",
|
||||||
fortran_have_asynchronous);
|
fortran_have_asynchronous);
|
||||||
ompi_info_out("Fort PROCEDURE",
|
opal_info_out("Fort PROCEDURE",
|
||||||
"compiler:fortran:procedure",
|
"compiler:fortran:procedure",
|
||||||
fortran_have_procedure);
|
fortran_have_procedure);
|
||||||
ompi_info_out("Fort f08 using wrappers",
|
opal_info_out("Fort f08 using wrappers",
|
||||||
"compiler:fortran:08_wrappers",
|
"compiler:fortran:08_wrappers",
|
||||||
fortran_08_using_wrappers_for_choice_buffer_functions);
|
fortran_08_using_wrappers_for_choice_buffer_functions);
|
||||||
|
|
||||||
@ -804,12 +373,12 @@ void ompi_info_do_config(bool want_all)
|
|||||||
|
|
||||||
/* Will always have the size of Fortran integer */
|
/* Will always have the size of Fortran integer */
|
||||||
|
|
||||||
ompi_info_out_int("Fort integer size", "compiler:fortran:sizeof:integer",
|
opal_info_out_int("Fort integer size", "compiler:fortran:sizeof:integer",
|
||||||
OMPI_SIZEOF_FORTRAN_INTEGER);
|
OMPI_SIZEOF_FORTRAN_INTEGER);
|
||||||
|
|
||||||
ompi_info_out_int("Fort logical size", "compiler:fortran:sizeof:logical",
|
opal_info_out_int("Fort logical size", "compiler:fortran:sizeof:logical",
|
||||||
OMPI_SIZEOF_FORTRAN_LOGICAL);
|
OMPI_SIZEOF_FORTRAN_LOGICAL);
|
||||||
ompi_info_out_int("Fort logical value true", "compiler:fortran:value:true",
|
opal_info_out_int("Fort logical value true", "compiler:fortran:value:true",
|
||||||
OMPI_FORTRAN_VALUE_TRUE);
|
OMPI_FORTRAN_VALUE_TRUE);
|
||||||
|
|
||||||
|
|
||||||
@ -818,137 +387,137 @@ void ompi_info_do_config(bool want_all)
|
|||||||
if (OMPI_BUILD_FORTRAN_MPIFH_BINDINGS ||
|
if (OMPI_BUILD_FORTRAN_MPIFH_BINDINGS ||
|
||||||
OMPI_BUILD_FORTRAN_USEMPI_BINDINGS ||
|
OMPI_BUILD_FORTRAN_USEMPI_BINDINGS ||
|
||||||
OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS) {
|
OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS) {
|
||||||
ompi_info_out("Fort have integer1", "compiler:fortran:have:integer1",
|
opal_info_out("Fort have integer1", "compiler:fortran:have:integer1",
|
||||||
OMPI_HAVE_FORTRAN_INTEGER1 ? "yes" : "no");
|
OMPI_HAVE_FORTRAN_INTEGER1 ? "yes" : "no");
|
||||||
ompi_info_out("Fort have integer2", "compiler:fortran:have:integer2",
|
opal_info_out("Fort have integer2", "compiler:fortran:have:integer2",
|
||||||
OMPI_HAVE_FORTRAN_INTEGER2 ? "yes" : "no");
|
OMPI_HAVE_FORTRAN_INTEGER2 ? "yes" : "no");
|
||||||
ompi_info_out("Fort have integer4", "compiler:fortran:have:integer4",
|
opal_info_out("Fort have integer4", "compiler:fortran:have:integer4",
|
||||||
OMPI_HAVE_FORTRAN_INTEGER4 ? "yes" : "no");
|
OMPI_HAVE_FORTRAN_INTEGER4 ? "yes" : "no");
|
||||||
ompi_info_out("Fort have integer8", "compiler:fortran:have:integer8",
|
opal_info_out("Fort have integer8", "compiler:fortran:have:integer8",
|
||||||
OMPI_HAVE_FORTRAN_INTEGER8 ? "yes" : "no");
|
OMPI_HAVE_FORTRAN_INTEGER8 ? "yes" : "no");
|
||||||
ompi_info_out("Fort have integer16", "compiler:fortran:have:integer16",
|
opal_info_out("Fort have integer16", "compiler:fortran:have:integer16",
|
||||||
OMPI_HAVE_FORTRAN_INTEGER16 ? "yes" : "no");
|
OMPI_HAVE_FORTRAN_INTEGER16 ? "yes" : "no");
|
||||||
|
|
||||||
ompi_info_out("Fort have real4", "compiler:fortran:have:real4",
|
opal_info_out("Fort have real4", "compiler:fortran:have:real4",
|
||||||
OMPI_HAVE_FORTRAN_REAL4 ? "yes" : "no");
|
OMPI_HAVE_FORTRAN_REAL4 ? "yes" : "no");
|
||||||
ompi_info_out("Fort have real8", "compiler:fortran:have:real8",
|
opal_info_out("Fort have real8", "compiler:fortran:have:real8",
|
||||||
OMPI_HAVE_FORTRAN_REAL8 ? "yes" : "no");
|
OMPI_HAVE_FORTRAN_REAL8 ? "yes" : "no");
|
||||||
ompi_info_out("Fort have real16", "compiler:fortran:have:real16",
|
opal_info_out("Fort have real16", "compiler:fortran:have:real16",
|
||||||
OMPI_HAVE_FORTRAN_REAL16 && OMPI_REAL16_MATCHES_C ? "yes" : "no");
|
OMPI_HAVE_FORTRAN_REAL16 && OMPI_REAL16_MATCHES_C ? "yes" : "no");
|
||||||
|
|
||||||
ompi_info_out("Fort have complex8", "compiler:fortran:have:complex8",
|
opal_info_out("Fort have complex8", "compiler:fortran:have:complex8",
|
||||||
OMPI_HAVE_FORTRAN_COMPLEX8 ? "yes" : "no");
|
OMPI_HAVE_FORTRAN_COMPLEX8 ? "yes" : "no");
|
||||||
ompi_info_out("Fort have complex16", "compiler:fortran:have:complex16",
|
opal_info_out("Fort have complex16", "compiler:fortran:have:complex16",
|
||||||
OMPI_HAVE_FORTRAN_COMPLEX16 ? "yes" : "no");
|
OMPI_HAVE_FORTRAN_COMPLEX16 ? "yes" : "no");
|
||||||
ompi_info_out("Fort have complex32", "compiler:fortran:have:complex32",
|
opal_info_out("Fort have complex32", "compiler:fortran:have:complex32",
|
||||||
OMPI_HAVE_FORTRAN_COMPLEX32 && OMPI_REAL16_MATCHES_C ? "yes" : "no");
|
OMPI_HAVE_FORTRAN_COMPLEX32 && OMPI_REAL16_MATCHES_C ? "yes" : "no");
|
||||||
|
|
||||||
ompi_info_out_int("Fort integer1 size", "compiler:fortran:sizeof:integer1",
|
opal_info_out_int("Fort integer1 size", "compiler:fortran:sizeof:integer1",
|
||||||
OMPI_HAVE_FORTRAN_INTEGER1 ? OMPI_SIZEOF_FORTRAN_INTEGER1 : -1);
|
OMPI_HAVE_FORTRAN_INTEGER1 ? OMPI_SIZEOF_FORTRAN_INTEGER1 : -1);
|
||||||
ompi_info_out_int("Fort integer2 size", "compiler:fortran:sizeof:integer2",
|
opal_info_out_int("Fort integer2 size", "compiler:fortran:sizeof:integer2",
|
||||||
OMPI_HAVE_FORTRAN_INTEGER2 ? OMPI_SIZEOF_FORTRAN_INTEGER2 : -1);
|
OMPI_HAVE_FORTRAN_INTEGER2 ? OMPI_SIZEOF_FORTRAN_INTEGER2 : -1);
|
||||||
ompi_info_out_int("Fort integer4 size", "compiler:fortran:sizeof:integer4",
|
opal_info_out_int("Fort integer4 size", "compiler:fortran:sizeof:integer4",
|
||||||
OMPI_HAVE_FORTRAN_INTEGER4 ? OMPI_SIZEOF_FORTRAN_INTEGER4 : -1);
|
OMPI_HAVE_FORTRAN_INTEGER4 ? OMPI_SIZEOF_FORTRAN_INTEGER4 : -1);
|
||||||
ompi_info_out_int("Fort integer8 size", "compiler:fortran:sizeof:integer8",
|
opal_info_out_int("Fort integer8 size", "compiler:fortran:sizeof:integer8",
|
||||||
OMPI_HAVE_FORTRAN_INTEGER8 ? OMPI_SIZEOF_FORTRAN_INTEGER8 : -1);
|
OMPI_HAVE_FORTRAN_INTEGER8 ? OMPI_SIZEOF_FORTRAN_INTEGER8 : -1);
|
||||||
ompi_info_out_int("Fort integer16 size", "compiler:fortran:sizeof:integer16",
|
opal_info_out_int("Fort integer16 size", "compiler:fortran:sizeof:integer16",
|
||||||
OMPI_HAVE_FORTRAN_INTEGER16 ? OMPI_SIZEOF_FORTRAN_INTEGER16 : -1);
|
OMPI_HAVE_FORTRAN_INTEGER16 ? OMPI_SIZEOF_FORTRAN_INTEGER16 : -1);
|
||||||
|
|
||||||
ompi_info_out_int("Fort real size", "compiler:fortran:sizeof:real",
|
opal_info_out_int("Fort real size", "compiler:fortran:sizeof:real",
|
||||||
OMPI_SIZEOF_FORTRAN_REAL);
|
OMPI_SIZEOF_FORTRAN_REAL);
|
||||||
ompi_info_out_int("Fort real4 size", "compiler:fortran:sizeof:real4",
|
opal_info_out_int("Fort real4 size", "compiler:fortran:sizeof:real4",
|
||||||
OMPI_HAVE_FORTRAN_REAL4 ? OMPI_SIZEOF_FORTRAN_REAL4 : -1);
|
OMPI_HAVE_FORTRAN_REAL4 ? OMPI_SIZEOF_FORTRAN_REAL4 : -1);
|
||||||
ompi_info_out_int("Fort real8 size", "compiler:fortran:sizeof:real8",
|
opal_info_out_int("Fort real8 size", "compiler:fortran:sizeof:real8",
|
||||||
OMPI_HAVE_FORTRAN_REAL8 ? OMPI_SIZEOF_FORTRAN_REAL8 : -1);
|
OMPI_HAVE_FORTRAN_REAL8 ? OMPI_SIZEOF_FORTRAN_REAL8 : -1);
|
||||||
ompi_info_out_int("Fort real16 size", "compiler:fortran:sizeof:real17",
|
opal_info_out_int("Fort real16 size", "compiler:fortran:sizeof:real17",
|
||||||
OMPI_HAVE_FORTRAN_REAL16 ? OMPI_SIZEOF_FORTRAN_REAL16 : -1);
|
OMPI_HAVE_FORTRAN_REAL16 ? OMPI_SIZEOF_FORTRAN_REAL16 : -1);
|
||||||
|
|
||||||
ompi_info_out_int("Fort dbl prec size",
|
opal_info_out_int("Fort dbl prec size",
|
||||||
"compiler:fortran:sizeof:double_precision",
|
"compiler:fortran:sizeof:double_precision",
|
||||||
OMPI_SIZEOF_FORTRAN_DOUBLE_PRECISION);
|
OMPI_SIZEOF_FORTRAN_DOUBLE_PRECISION);
|
||||||
|
|
||||||
ompi_info_out_int("Fort cplx size", "compiler:fortran:sizeof:complex",
|
opal_info_out_int("Fort cplx size", "compiler:fortran:sizeof:complex",
|
||||||
OMPI_SIZEOF_FORTRAN_COMPLEX);
|
OMPI_SIZEOF_FORTRAN_COMPLEX);
|
||||||
ompi_info_out_int("Fort dbl cplx size",
|
opal_info_out_int("Fort dbl cplx size",
|
||||||
"compiler:fortran:sizeof:double_complex",
|
"compiler:fortran:sizeof:double_complex",
|
||||||
OMPI_HAVE_FORTRAN_DOUBLE_COMPLEX ? OMPI_SIZEOF_FORTRAN_DOUBLE_COMPLEX : -1);
|
OMPI_HAVE_FORTRAN_DOUBLE_COMPLEX ? OMPI_SIZEOF_FORTRAN_DOUBLE_COMPLEX : -1);
|
||||||
ompi_info_out_int("Fort cplx8 size", "compiler:fortran:sizeof:complex8",
|
opal_info_out_int("Fort cplx8 size", "compiler:fortran:sizeof:complex8",
|
||||||
OMPI_HAVE_FORTRAN_COMPLEX8 ? OMPI_SIZEOF_FORTRAN_COMPLEX8 : -1);
|
OMPI_HAVE_FORTRAN_COMPLEX8 ? OMPI_SIZEOF_FORTRAN_COMPLEX8 : -1);
|
||||||
ompi_info_out_int("Fort cplx16 size", "compiler:fortran:sizeof:complex16",
|
opal_info_out_int("Fort cplx16 size", "compiler:fortran:sizeof:complex16",
|
||||||
OMPI_HAVE_FORTRAN_COMPLEX16 ? OMPI_SIZEOF_FORTRAN_COMPLEX16 : -1);
|
OMPI_HAVE_FORTRAN_COMPLEX16 ? OMPI_SIZEOF_FORTRAN_COMPLEX16 : -1);
|
||||||
ompi_info_out_int("Fort cplx32 size", "compiler:fortran:sizeof:complex32",
|
opal_info_out_int("Fort cplx32 size", "compiler:fortran:sizeof:complex32",
|
||||||
OMPI_HAVE_FORTRAN_COMPLEX32 ? OMPI_SIZEOF_FORTRAN_COMPLEX32 : -1);
|
OMPI_HAVE_FORTRAN_COMPLEX32 ? OMPI_SIZEOF_FORTRAN_COMPLEX32 : -1);
|
||||||
|
|
||||||
ompi_info_out_int("Fort integer align", "compiler:fortran:align:integer",
|
opal_info_out_int("Fort integer align", "compiler:fortran:align:integer",
|
||||||
OMPI_ALIGNMENT_FORTRAN_INTEGER);
|
OMPI_ALIGNMENT_FORTRAN_INTEGER);
|
||||||
ompi_info_out_int("Fort integer1 align", "compiler:fortran:align:integer1",
|
opal_info_out_int("Fort integer1 align", "compiler:fortran:align:integer1",
|
||||||
OMPI_HAVE_FORTRAN_INTEGER1 ? OMPI_ALIGNMENT_FORTRAN_INTEGER1 : -1);
|
OMPI_HAVE_FORTRAN_INTEGER1 ? OMPI_ALIGNMENT_FORTRAN_INTEGER1 : -1);
|
||||||
ompi_info_out_int("Fort integer2 align", "compiler:fortran:align:integer2",
|
opal_info_out_int("Fort integer2 align", "compiler:fortran:align:integer2",
|
||||||
OMPI_HAVE_FORTRAN_INTEGER2 ? OMPI_ALIGNMENT_FORTRAN_INTEGER2 : -1);
|
OMPI_HAVE_FORTRAN_INTEGER2 ? OMPI_ALIGNMENT_FORTRAN_INTEGER2 : -1);
|
||||||
ompi_info_out_int("Fort integer4 align", "compiler:fortran:align:integer4",
|
opal_info_out_int("Fort integer4 align", "compiler:fortran:align:integer4",
|
||||||
OMPI_HAVE_FORTRAN_INTEGER4 ? OMPI_ALIGNMENT_FORTRAN_INTEGER4 : -1);
|
OMPI_HAVE_FORTRAN_INTEGER4 ? OMPI_ALIGNMENT_FORTRAN_INTEGER4 : -1);
|
||||||
ompi_info_out_int("Fort integer8 align", "compiler:fortran:align:integer8",
|
opal_info_out_int("Fort integer8 align", "compiler:fortran:align:integer8",
|
||||||
OMPI_HAVE_FORTRAN_INTEGER8 ? OMPI_ALIGNMENT_FORTRAN_INTEGER8 : -1);
|
OMPI_HAVE_FORTRAN_INTEGER8 ? OMPI_ALIGNMENT_FORTRAN_INTEGER8 : -1);
|
||||||
ompi_info_out_int("Fort integer16 align", "compiler:fortran:align:integer16",
|
opal_info_out_int("Fort integer16 align", "compiler:fortran:align:integer16",
|
||||||
OMPI_HAVE_FORTRAN_INTEGER16 ? OMPI_ALIGNMENT_FORTRAN_INTEGER16 : -1);
|
OMPI_HAVE_FORTRAN_INTEGER16 ? OMPI_ALIGNMENT_FORTRAN_INTEGER16 : -1);
|
||||||
|
|
||||||
ompi_info_out_int("Fort real align", "compiler:fortran:align:real",
|
opal_info_out_int("Fort real align", "compiler:fortran:align:real",
|
||||||
OMPI_ALIGNMENT_FORTRAN_REAL);
|
OMPI_ALIGNMENT_FORTRAN_REAL);
|
||||||
ompi_info_out_int("Fort real4 align", "compiler:fortran:align:real4",
|
opal_info_out_int("Fort real4 align", "compiler:fortran:align:real4",
|
||||||
OMPI_HAVE_FORTRAN_REAL4 ? OMPI_ALIGNMENT_FORTRAN_REAL4 : -1);
|
OMPI_HAVE_FORTRAN_REAL4 ? OMPI_ALIGNMENT_FORTRAN_REAL4 : -1);
|
||||||
ompi_info_out_int("Fort real8 align", "compiler:fortran:align:real8",
|
opal_info_out_int("Fort real8 align", "compiler:fortran:align:real8",
|
||||||
OMPI_HAVE_FORTRAN_REAL8 ? OMPI_ALIGNMENT_FORTRAN_REAL8 : -1);
|
OMPI_HAVE_FORTRAN_REAL8 ? OMPI_ALIGNMENT_FORTRAN_REAL8 : -1);
|
||||||
ompi_info_out_int("Fort real16 align", "compiler:fortran:align:real16",
|
opal_info_out_int("Fort real16 align", "compiler:fortran:align:real16",
|
||||||
OMPI_HAVE_FORTRAN_REAL16 ? OMPI_ALIGNMENT_FORTRAN_REAL16 : -1);
|
OMPI_HAVE_FORTRAN_REAL16 ? OMPI_ALIGNMENT_FORTRAN_REAL16 : -1);
|
||||||
|
|
||||||
ompi_info_out_int("Fort dbl prec align",
|
opal_info_out_int("Fort dbl prec align",
|
||||||
"compiler:fortran:align:double_precision",
|
"compiler:fortran:align:double_precision",
|
||||||
OMPI_ALIGNMENT_FORTRAN_DOUBLE_PRECISION);
|
OMPI_ALIGNMENT_FORTRAN_DOUBLE_PRECISION);
|
||||||
|
|
||||||
ompi_info_out_int("Fort cplx align", "compiler:fortran:align:complex",
|
opal_info_out_int("Fort cplx align", "compiler:fortran:align:complex",
|
||||||
OMPI_ALIGNMENT_FORTRAN_COMPLEX);
|
OMPI_ALIGNMENT_FORTRAN_COMPLEX);
|
||||||
ompi_info_out_int("Fort dbl cplx align",
|
opal_info_out_int("Fort dbl cplx align",
|
||||||
"compiler:fortran:align:double_complex",
|
"compiler:fortran:align:double_complex",
|
||||||
OMPI_HAVE_FORTRAN_DOUBLE_COMPLEX ? OMPI_ALIGNMENT_FORTRAN_DOUBLE_COMPLEX : -1);
|
OMPI_HAVE_FORTRAN_DOUBLE_COMPLEX ? OMPI_ALIGNMENT_FORTRAN_DOUBLE_COMPLEX : -1);
|
||||||
ompi_info_out_int("Fort cplx8 align", "compiler:fortran:align:complex8",
|
opal_info_out_int("Fort cplx8 align", "compiler:fortran:align:complex8",
|
||||||
OMPI_HAVE_FORTRAN_COMPLEX8 ? OMPI_ALIGNMENT_FORTRAN_COMPLEX8 : -1);
|
OMPI_HAVE_FORTRAN_COMPLEX8 ? OMPI_ALIGNMENT_FORTRAN_COMPLEX8 : -1);
|
||||||
ompi_info_out_int("Fort cplx16 align", "compiler:fortran:align:complex16",
|
opal_info_out_int("Fort cplx16 align", "compiler:fortran:align:complex16",
|
||||||
OMPI_HAVE_FORTRAN_COMPLEX16 ? OMPI_ALIGNMENT_FORTRAN_COMPLEX16 : -1);
|
OMPI_HAVE_FORTRAN_COMPLEX16 ? OMPI_ALIGNMENT_FORTRAN_COMPLEX16 : -1);
|
||||||
ompi_info_out_int("Fort cplx32 align", "compiler:fortran:align:complex32",
|
opal_info_out_int("Fort cplx32 align", "compiler:fortran:align:complex32",
|
||||||
OMPI_HAVE_FORTRAN_COMPLEX32 ? OMPI_ALIGNMENT_FORTRAN_COMPLEX32 : -1);
|
OMPI_HAVE_FORTRAN_COMPLEX32 ? OMPI_ALIGNMENT_FORTRAN_COMPLEX32 : -1);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ompi_info_out("Fort real size", "compiler:fortran:sizeof:real", "skipped");
|
opal_info_out("Fort real size", "compiler:fortran:sizeof:real", "skipped");
|
||||||
ompi_info_out("Fort dbl prec size",
|
opal_info_out("Fort dbl prec size",
|
||||||
"compiler:fortran:sizeof:double_precision", "skipped");
|
"compiler:fortran:sizeof:double_precision", "skipped");
|
||||||
ompi_info_out("Fort cplx size", "compiler:fortran:sizeof:complex", "skipped");
|
opal_info_out("Fort cplx size", "compiler:fortran:sizeof:complex", "skipped");
|
||||||
ompi_info_out("Fort dbl cplx size",
|
opal_info_out("Fort dbl cplx size",
|
||||||
"compiler:fortran:sizeof:double_complex", "skipped");
|
"compiler:fortran:sizeof:double_complex", "skipped");
|
||||||
|
|
||||||
ompi_info_out("Fort integer align", "compiler:fortran:align:integer", "skipped");
|
opal_info_out("Fort integer align", "compiler:fortran:align:integer", "skipped");
|
||||||
ompi_info_out("Fort real align", "compiler:fortran:align:real", "skipped");
|
opal_info_out("Fort real align", "compiler:fortran:align:real", "skipped");
|
||||||
ompi_info_out("Fort dbl prec align",
|
opal_info_out("Fort dbl prec align",
|
||||||
"compiler:fortran:align:double_precision","skipped");
|
"compiler:fortran:align:double_precision","skipped");
|
||||||
ompi_info_out("Fort cplx align", "compiler:fortran:align:complex", "skipped");
|
opal_info_out("Fort cplx align", "compiler:fortran:align:complex", "skipped");
|
||||||
ompi_info_out("Fort dbl cplx align",
|
opal_info_out("Fort dbl cplx align",
|
||||||
"compiler:fortran:align:double_complex", "skipped");
|
"compiler:fortran:align:double_complex", "skipped");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ompi_info_out("C profiling", "option:profiling:c", cprofiling);
|
opal_info_out("C profiling", "option:profiling:c", cprofiling);
|
||||||
ompi_info_out("C++ profiling", "option:profiling:cxx", cxxprofiling);
|
opal_info_out("C++ profiling", "option:profiling:cxx", cxxprofiling);
|
||||||
ompi_info_out("Fort mpif.h profiling", "option:profiling:mpif.h",
|
opal_info_out("Fort mpif.h profiling", "option:profiling:mpif.h",
|
||||||
fortran_mpifh_profiling);
|
fortran_mpifh_profiling);
|
||||||
ompi_info_out("Fort use mpi profiling", "option:profiling:use_mpi",
|
opal_info_out("Fort use mpi profiling", "option:profiling:use_mpi",
|
||||||
fortran_usempi_profiling);
|
fortran_usempi_profiling);
|
||||||
ompi_info_out("Fort use mpi_f08 prof",
|
opal_info_out("Fort use mpi_f08 prof",
|
||||||
"option:profiling:use_mpi_f08",
|
"option:profiling:use_mpi_f08",
|
||||||
fortran_usempif08_profiling);
|
fortran_usempif08_profiling);
|
||||||
|
|
||||||
ompi_info_out("C++ exceptions", "option:cxx_exceptions", cxxexceptions);
|
opal_info_out("C++ exceptions", "option:cxx_exceptions", cxxexceptions);
|
||||||
ompi_info_out("Thread support", "option:threads", threads);
|
opal_info_out("Thread support", "option:threads", threads);
|
||||||
free(threads);
|
free(threads);
|
||||||
ompi_info_out("Sparse Groups", "option:sparse:groups", sparse_groups);
|
opal_info_out("Sparse Groups", "option:sparse:groups", sparse_groups);
|
||||||
|
|
||||||
if (want_all) {
|
if (want_all) {
|
||||||
|
|
||||||
@ -957,66 +526,66 @@ void ompi_info_do_config(bool want_all)
|
|||||||
* and c) specific for ompi_info.
|
* and c) specific for ompi_info.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ompi_info_out("Build CFLAGS", "option:build:cflags", OMPI_BUILD_CFLAGS);
|
opal_info_out("Build CFLAGS", "option:build:cflags", OMPI_BUILD_CFLAGS);
|
||||||
ompi_info_out("Build CXXFLAGS", "option:build:cxxflags", OMPI_BUILD_CXXFLAGS);
|
opal_info_out("Build CXXFLAGS", "option:build:cxxflags", OMPI_BUILD_CXXFLAGS);
|
||||||
ompi_info_out("Build FCFLAGS", "option:build:fcflags", OMPI_BUILD_FCFLAGS);
|
opal_info_out("Build FCFLAGS", "option:build:fcflags", OMPI_BUILD_FCFLAGS);
|
||||||
ompi_info_out("Build LDFLAGS", "option:build:ldflags", OMPI_BUILD_LDFLAGS);
|
opal_info_out("Build LDFLAGS", "option:build:ldflags", OMPI_BUILD_LDFLAGS);
|
||||||
ompi_info_out("Build LIBS", "option:build:libs", OMPI_BUILD_LIBS);
|
opal_info_out("Build LIBS", "option:build:libs", OMPI_BUILD_LIBS);
|
||||||
|
|
||||||
ompi_info_out("Wrapper extra CFLAGS", "option:wrapper:extra_cflags",
|
opal_info_out("Wrapper extra CFLAGS", "option:wrapper:extra_cflags",
|
||||||
WRAPPER_EXTRA_CFLAGS);
|
WRAPPER_EXTRA_CFLAGS);
|
||||||
ompi_info_out("Wrapper extra CXXFLAGS", "option:wrapper:extra_cxxflags",
|
opal_info_out("Wrapper extra CXXFLAGS", "option:wrapper:extra_cxxflags",
|
||||||
WRAPPER_EXTRA_CXXFLAGS);
|
WRAPPER_EXTRA_CXXFLAGS);
|
||||||
ompi_info_out("Wrapper extra FCFLAGS", "option:wrapper:extra_fcflags",
|
opal_info_out("Wrapper extra FCFLAGS", "option:wrapper:extra_fcflags",
|
||||||
WRAPPER_EXTRA_FCFLAGS);
|
WRAPPER_EXTRA_FCFLAGS);
|
||||||
ompi_info_out("Wrapper extra LDFLAGS", "option:wrapper:extra_ldflags",
|
opal_info_out("Wrapper extra LDFLAGS", "option:wrapper:extra_ldflags",
|
||||||
WRAPPER_EXTRA_LDFLAGS);
|
WRAPPER_EXTRA_LDFLAGS);
|
||||||
ompi_info_out("Wrapper extra LIBS", "option:wrapper:extra_libs",
|
opal_info_out("Wrapper extra LIBS", "option:wrapper:extra_libs",
|
||||||
WRAPPER_EXTRA_LIBS);
|
WRAPPER_EXTRA_LIBS);
|
||||||
}
|
}
|
||||||
|
|
||||||
ompi_info_out("Internal debug support", "option:debug", debug);
|
opal_info_out("Internal debug support", "option:debug", debug);
|
||||||
ompi_info_out("MPI interface warnings", "option:mpi-interface-warning", mpi_interface_warning);
|
opal_info_out("MPI interface warnings", "option:mpi-interface-warning", mpi_interface_warning);
|
||||||
ompi_info_out("MPI parameter check", "option:mpi-param-check", paramcheck);
|
opal_info_out("MPI parameter check", "option:mpi-param-check", paramcheck);
|
||||||
ompi_info_out("Memory profiling support", "option:mem-profile", memprofile);
|
opal_info_out("Memory profiling support", "option:mem-profile", memprofile);
|
||||||
ompi_info_out("Memory debugging support", "option:mem-debug", memdebug);
|
opal_info_out("Memory debugging support", "option:mem-debug", memdebug);
|
||||||
ompi_info_out("libltdl support", "option:dlopen", want_libltdl);
|
opal_info_out("libltdl support", "option:dlopen", want_libltdl);
|
||||||
ompi_info_out("Heterogeneous support", "options:heterogeneous", heterogeneous);
|
opal_info_out("Heterogeneous support", "options:heterogeneous", heterogeneous);
|
||||||
ompi_info_out("mpirun default --prefix", "mpirun:prefix_by_default",
|
opal_info_out("mpirun default --prefix", "mpirun:prefix_by_default",
|
||||||
mpirun_prefix_by_default);
|
mpirun_prefix_by_default);
|
||||||
ompi_info_out("MPI I/O support", "options:mpi-io", have_mpi_io);
|
opal_info_out("MPI I/O support", "options:mpi-io", have_mpi_io);
|
||||||
ompi_info_out("MPI_WTIME support", "options:mpi-wtime", wtime_support);
|
opal_info_out("MPI_WTIME support", "options:mpi-wtime", wtime_support);
|
||||||
ompi_info_out("Symbol vis. support", "options:visibility", symbol_visibility);
|
opal_info_out("Symbol vis. support", "options:visibility", symbol_visibility);
|
||||||
ompi_info_out("Host topology support", "options:host-topology",
|
opal_info_out("Host topology support", "options:host-topology",
|
||||||
topology_support);
|
topology_support);
|
||||||
|
|
||||||
ompi_info_out("MPI extensions", "options:mpi_ext", OMPI_MPIEXT_COMPONENTS);
|
opal_info_out("MPI extensions", "options:mpi_ext", OMPI_MPIEXT_COMPONENTS);
|
||||||
|
|
||||||
ompi_info_out("FT Checkpoint support", "options:ft_support", ft_support);
|
opal_info_out("FT Checkpoint support", "options:ft_support", ft_support);
|
||||||
free(ft_support);
|
free(ft_support);
|
||||||
|
|
||||||
ompi_info_out("C/R Enabled Debugging", "options:crdebug_support", crdebug_support);
|
opal_info_out("C/R Enabled Debugging", "options:crdebug_support", crdebug_support);
|
||||||
free(crdebug_support);
|
free(crdebug_support);
|
||||||
|
|
||||||
ompi_info_out("VampirTrace support", "options:vt", vt_support);
|
opal_info_out("VampirTrace support", "options:vt", vt_support);
|
||||||
|
|
||||||
ompi_info_out_int("MPI_MAX_PROCESSOR_NAME", "options:mpi-max-processor-name",
|
opal_info_out_int("MPI_MAX_PROCESSOR_NAME", "options:mpi-max-processor-name",
|
||||||
MPI_MAX_PROCESSOR_NAME);
|
MPI_MAX_PROCESSOR_NAME);
|
||||||
ompi_info_out_int("MPI_MAX_ERROR_STRING", "options:mpi-max-error-string",
|
opal_info_out_int("MPI_MAX_ERROR_STRING", "options:mpi-max-error-string",
|
||||||
MPI_MAX_ERROR_STRING);
|
MPI_MAX_ERROR_STRING);
|
||||||
ompi_info_out_int("MPI_MAX_OBJECT_NAME", "options:mpi-max-object-name",
|
opal_info_out_int("MPI_MAX_OBJECT_NAME", "options:mpi-max-object-name",
|
||||||
MPI_MAX_OBJECT_NAME);
|
MPI_MAX_OBJECT_NAME);
|
||||||
ompi_info_out_int("MPI_MAX_INFO_KEY", "options:mpi-max-info-key",
|
opal_info_out_int("MPI_MAX_INFO_KEY", "options:mpi-max-info-key",
|
||||||
MPI_MAX_INFO_KEY);
|
MPI_MAX_INFO_KEY);
|
||||||
ompi_info_out_int("MPI_MAX_INFO_VAL", "options:mpi-max-info-val",
|
opal_info_out_int("MPI_MAX_INFO_VAL", "options:mpi-max-info-val",
|
||||||
MPI_MAX_INFO_VAL);
|
MPI_MAX_INFO_VAL);
|
||||||
ompi_info_out_int("MPI_MAX_PORT_NAME", "options:mpi-max-port-name",
|
opal_info_out_int("MPI_MAX_PORT_NAME", "options:mpi-max-port-name",
|
||||||
MPI_MAX_PORT_NAME);
|
MPI_MAX_PORT_NAME);
|
||||||
#if OMPI_PROVIDE_MPI_FILE_INTERFACE
|
#if OMPI_PROVIDE_MPI_FILE_INTERFACE
|
||||||
ompi_info_out_int("MPI_MAX_DATAREP_STRING", "options:mpi-max-datarep-string",
|
opal_info_out_int("MPI_MAX_DATAREP_STRING", "options:mpi-max-datarep-string",
|
||||||
MPI_MAX_DATAREP_STRING);
|
MPI_MAX_DATAREP_STRING);
|
||||||
#else
|
#else
|
||||||
ompi_info_out("MPI_MAX_DATAREP_STRING", "options:mpi-max-datarep-string",
|
opal_info_out("MPI_MAX_DATAREP_STRING", "options:mpi-max-datarep-string",
|
||||||
"IO interface not provided");
|
"IO interface not provided");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||||
* Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2012 Los Alamos National Security, LLC.
|
||||||
|
* All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -30,6 +32,9 @@
|
|||||||
#include "ompi/version.h"
|
#include "ompi/version.h"
|
||||||
#include "opal/mca/base/base.h"
|
#include "opal/mca/base/base.h"
|
||||||
#include "opal/util/printf.h"
|
#include "opal/util/printf.h"
|
||||||
|
#include "opal/runtime/opal_info_support.h"
|
||||||
|
|
||||||
|
#include "orte/runtime/orte_info_support.h"
|
||||||
|
|
||||||
#include "ompi/tools/ompi_info/ompi_info.h"
|
#include "ompi/tools/ompi_info/ompi_info.h"
|
||||||
|
|
||||||
@ -37,33 +42,11 @@
|
|||||||
* Public variables
|
* Public variables
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const char *ompi_info_ver_full = "full";
|
|
||||||
const char *ompi_info_ver_major = "major";
|
|
||||||
const char *ompi_info_ver_minor = "minor";
|
|
||||||
const char *ompi_info_ver_release = "release";
|
|
||||||
const char *ompi_info_ver_greek = "greek";
|
|
||||||
const char *ompi_info_ver_repo = "repo";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Private variables
|
|
||||||
*/
|
|
||||||
|
|
||||||
static const char *ompi_info_ver_all = "all";
|
|
||||||
static const char *ompi_info_ver_mca = "mca";
|
|
||||||
static const char *ompi_info_ver_type = "type";
|
|
||||||
static const char *ompi_info_ver_component = "component";
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Private functions
|
* Private functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void show_mca_version(const mca_base_component_t *component,
|
|
||||||
const char *scope, const char *ver_type);
|
|
||||||
static char *make_version_str(const char *scope,
|
|
||||||
int major, int minor, int release,
|
|
||||||
const char *greek,
|
|
||||||
bool want_repo, const char *repo);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* do_version
|
* do_version
|
||||||
@ -74,7 +57,9 @@ static char *make_version_str(const char *scope,
|
|||||||
* - want_all: True if all components' info is required.
|
* - want_all: True if all components' info is required.
|
||||||
* - cmd_line: The constructed command line argument
|
* - cmd_line: The constructed command line argument
|
||||||
*/
|
*/
|
||||||
void ompi_info_do_version(bool want_all, opal_cmd_line_t *cmd_line)
|
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)
|
||||||
{
|
{
|
||||||
unsigned int count;
|
unsigned int count;
|
||||||
size_t i;
|
size_t i;
|
||||||
@ -82,15 +67,15 @@ void ompi_info_do_version(bool want_all, opal_cmd_line_t *cmd_line)
|
|||||||
char *pos;
|
char *pos;
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
ompi_info_open_components();
|
|
||||||
|
|
||||||
if (want_all) {
|
if (want_all) {
|
||||||
ompi_info_show_ompi_version(ompi_info_ver_full);
|
ompi_info_show_ompi_version(opal_info_ver_full);
|
||||||
for (j = 0; j < mca_types.size; ++j) {
|
for (j = 0; j < mca_types->size; ++j) {
|
||||||
if (NULL == (pos = (char*)opal_pointer_array_get_item(&mca_types, j))) {
|
if (NULL == (pos = (char*)opal_pointer_array_get_item(mca_types, j))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ompi_info_show_component_version(pos, ompi_info_component_all, ompi_info_ver_full, ompi_info_type_all);
|
opal_info_show_component_version(mca_types, component_map,
|
||||||
|
pos, opal_info_component_all,
|
||||||
|
opal_info_ver_full, opal_info_type_all);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
count = opal_cmd_line_get_ninsts(cmd_line, "version");
|
count = opal_cmd_line_get_ninsts(cmd_line, "version");
|
||||||
@ -102,24 +87,27 @@ void ompi_info_do_version(bool want_all, opal_cmd_line_t *cmd_line)
|
|||||||
|
|
||||||
if (0 == strcmp(ompi_info_type_ompi, arg1)) {
|
if (0 == strcmp(ompi_info_type_ompi, arg1)) {
|
||||||
ompi_info_show_ompi_version(scope);
|
ompi_info_show_ompi_version(scope);
|
||||||
}
|
} else if (0 == strcmp(orte_info_type_orte, arg1)) {
|
||||||
|
orte_info_show_orte_version(scope);
|
||||||
|
} else if (0 == strcmp(opal_info_type_opal, arg1)) {
|
||||||
|
opal_info_show_opal_version(scope);
|
||||||
|
} else if (NULL != (pos = strchr(arg1, ':'))) {
|
||||||
/* Specific type and component */
|
/* Specific type and component */
|
||||||
|
|
||||||
else if (NULL != (pos = strchr(arg1, ':'))) {
|
|
||||||
*pos = '\0';
|
*pos = '\0';
|
||||||
type = arg1;
|
type = arg1;
|
||||||
pos++;
|
pos++;
|
||||||
component = pos;
|
component = pos;
|
||||||
|
|
||||||
ompi_info_show_component_version(type, component, scope, ompi_info_ver_all);
|
opal_info_show_component_version(mca_types, component_map,
|
||||||
|
type, component, scope, opal_info_ver_all);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* All components of a specific type */
|
/* All components of a specific type */
|
||||||
|
|
||||||
else {
|
else {
|
||||||
ompi_info_show_component_version(arg1, ompi_info_component_all, scope, ompi_info_ver_all);
|
opal_info_show_component_version(mca_types, component_map,
|
||||||
|
arg1, opal_info_component_all, scope, opal_info_ver_all);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -133,301 +121,36 @@ void ompi_info_show_ompi_version(const char *scope)
|
|||||||
{
|
{
|
||||||
char *tmp, *tmp2;
|
char *tmp, *tmp2;
|
||||||
|
|
||||||
ompi_info_out("Package", "package", OPAL_PACKAGE_STRING);
|
opal_info_out("Package", "package", OPAL_PACKAGE_STRING);
|
||||||
asprintf(&tmp, "%s:version:full", ompi_info_type_ompi);
|
asprintf(&tmp, "%s:version:full", ompi_info_type_ompi);
|
||||||
tmp2 = make_version_str(scope,
|
tmp2 = opal_info_make_version_str(scope,
|
||||||
OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION,
|
OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION,
|
||||||
OMPI_RELEASE_VERSION,
|
OMPI_RELEASE_VERSION,
|
||||||
OMPI_GREEK_VERSION,
|
OMPI_GREEK_VERSION,
|
||||||
OMPI_WANT_REPO_REV, OMPI_REPO_REV);
|
OMPI_WANT_REPO_REV, OMPI_REPO_REV);
|
||||||
ompi_info_out("Open MPI", tmp, tmp2);
|
opal_info_out("Open MPI", tmp, tmp2);
|
||||||
free(tmp);
|
free(tmp);
|
||||||
free(tmp2);
|
free(tmp2);
|
||||||
asprintf(&tmp, "%s:version:repo", ompi_info_type_ompi);
|
asprintf(&tmp, "%s:version:repo", ompi_info_type_ompi);
|
||||||
ompi_info_out("Open MPI repo revision", tmp, OMPI_REPO_REV);
|
opal_info_out("Open MPI repo revision", tmp, OMPI_REPO_REV);
|
||||||
free(tmp);
|
free(tmp);
|
||||||
asprintf(&tmp, "%s:version:release_date", ompi_info_type_ompi);
|
asprintf(&tmp, "%s:version:release_date", ompi_info_type_ompi);
|
||||||
ompi_info_out("Open MPI release date", tmp, OMPI_RELEASE_DATE);
|
opal_info_out("Open MPI release date", tmp, OMPI_RELEASE_DATE);
|
||||||
free(tmp);
|
free(tmp);
|
||||||
|
|
||||||
asprintf(&tmp, "%s:version:full", ompi_info_type_orte);
|
/* show the orte version */
|
||||||
tmp2 = make_version_str(scope,
|
orte_info_show_orte_version(scope);
|
||||||
ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
|
|
||||||
ORTE_RELEASE_VERSION,
|
/* show the opal version */
|
||||||
ORTE_GREEK_VERSION,
|
opal_info_show_opal_version(scope);
|
||||||
ORTE_WANT_REPO_REV, ORTE_REPO_REV);
|
|
||||||
ompi_info_out("Open RTE", tmp, tmp2);
|
|
||||||
free(tmp);
|
|
||||||
free(tmp2);
|
|
||||||
asprintf(&tmp, "%s:version:repo", ompi_info_type_orte);
|
|
||||||
ompi_info_out("Open RTE repo revision", tmp, ORTE_REPO_REV);
|
|
||||||
free(tmp);
|
|
||||||
asprintf(&tmp, "%s:version:release_date", ompi_info_type_orte);
|
|
||||||
ompi_info_out("Open RTE release date", tmp, ORTE_RELEASE_DATE);
|
|
||||||
free(tmp);
|
|
||||||
|
|
||||||
asprintf(&tmp, "%s:version:full", ompi_info_type_opal);
|
tmp2 = opal_info_make_version_str(scope,
|
||||||
tmp2 = make_version_str(scope,
|
MPI_VERSION, MPI_SUBVERSION,
|
||||||
OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION,
|
0, "", 0, "");
|
||||||
OPAL_RELEASE_VERSION,
|
opal_info_out("MPI API", "mpi-api:version:full", tmp2);
|
||||||
OPAL_GREEK_VERSION,
|
|
||||||
OPAL_WANT_REPO_REV, OPAL_REPO_REV);
|
|
||||||
ompi_info_out("OPAL", tmp, tmp2);
|
|
||||||
free(tmp);
|
|
||||||
free(tmp2);
|
|
||||||
asprintf(&tmp, "%s:version:repo", ompi_info_type_opal);
|
|
||||||
ompi_info_out("OPAL repo revision", tmp, OPAL_REPO_REV);
|
|
||||||
free(tmp);
|
|
||||||
asprintf(&tmp, "%s:version:release_date", ompi_info_type_opal);
|
|
||||||
ompi_info_out("OPAL release date", tmp, OPAL_RELEASE_DATE);
|
|
||||||
free(tmp);
|
|
||||||
|
|
||||||
tmp2 = make_version_str(scope,
|
|
||||||
MPI_VERSION, MPI_SUBVERSION,
|
|
||||||
0, "", 0, "");
|
|
||||||
ompi_info_out("MPI API", "mpi-api:version:full", tmp2);
|
|
||||||
free(tmp2);
|
free(tmp2);
|
||||||
|
|
||||||
ompi_info_out("Ident string", "ident", OPAL_IDENT_STRING);
|
opal_info_out("Ident string", "ident", OPAL_IDENT_STRING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Show all the components of a specific type/component combo (component may be
|
|
||||||
* a wildcard)
|
|
||||||
*/
|
|
||||||
void ompi_info_show_component_version(const char *type_name,
|
|
||||||
const char *component_name,
|
|
||||||
const char *scope, const char *ver_type)
|
|
||||||
{
|
|
||||||
bool want_all_components = false;
|
|
||||||
bool found;
|
|
||||||
opal_list_item_t *item;
|
|
||||||
mca_base_component_list_item_t *cli;
|
|
||||||
const mca_base_component_t *component;
|
|
||||||
opal_list_t *components;
|
|
||||||
int j;
|
|
||||||
char *pos;
|
|
||||||
ompi_info_component_map_t *map;
|
|
||||||
|
|
||||||
/* see if all components wanted */
|
|
||||||
if (0 == strcmp(ompi_info_type_all, component_name)) {
|
|
||||||
want_all_components = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check to see if the type is valid */
|
|
||||||
|
|
||||||
for (found = false, j = 0; j < mca_types.size; ++j) {
|
|
||||||
if (NULL == (pos = (char*)opal_pointer_array_get_item(&mca_types, j))) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (0 == strcmp(pos, type_name)) {
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!found) {
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Now that we have a valid type, find the right component list */
|
|
||||||
components = NULL;
|
|
||||||
for (j=0; j < component_map.size; j++) {
|
|
||||||
if (NULL == (map = (ompi_info_component_map_t*)opal_pointer_array_get_item(&component_map, j))) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (0 == strcmp(type_name, map->type)) {
|
|
||||||
/* found it! */
|
|
||||||
components = map->components;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (NULL != components) {
|
|
||||||
if (opal_list_get_size(components) > 0){
|
|
||||||
for (item = opal_list_get_first(components);
|
|
||||||
opal_list_get_end(components) != item;
|
|
||||||
item = opal_list_get_next(item)) {
|
|
||||||
cli = (mca_base_component_list_item_t *) item;
|
|
||||||
component = cli->cli_component;
|
|
||||||
if (want_all_components ||
|
|
||||||
0 == strcmp(component->mca_component_name, component_name)) {
|
|
||||||
show_mca_version(component, scope, ver_type);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Given a component, display its relevant version(s)
|
|
||||||
*/
|
|
||||||
static void show_mca_version(const mca_base_component_t* component,
|
|
||||||
const char *scope, const char *ver_type)
|
|
||||||
{
|
|
||||||
bool printed;
|
|
||||||
bool want_mca = false;
|
|
||||||
bool want_type = false;
|
|
||||||
bool want_component = false;
|
|
||||||
char *message, *content;
|
|
||||||
char *mca_version;
|
|
||||||
char *api_version;
|
|
||||||
char *component_version;
|
|
||||||
char *tmp;
|
|
||||||
|
|
||||||
if (0 == strcmp(ver_type, ompi_info_ver_all) ||
|
|
||||||
0 == strcmp(ver_type, ompi_info_ver_mca)) {
|
|
||||||
want_mca = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (0 == strcmp(ver_type, ompi_info_ver_all) ||
|
|
||||||
0 == strcmp(ver_type, ompi_info_ver_type)) {
|
|
||||||
want_type = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (0 == strcmp(ver_type, ompi_info_ver_all) ||
|
|
||||||
0 == strcmp(ver_type, ompi_info_ver_component)) {
|
|
||||||
want_component = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
mca_version = make_version_str(scope, component->mca_major_version,
|
|
||||||
component->mca_minor_version,
|
|
||||||
component->mca_release_version, "",
|
|
||||||
false, "");
|
|
||||||
api_version = make_version_str(scope, component->mca_type_major_version,
|
|
||||||
component->mca_type_minor_version,
|
|
||||||
component->mca_type_release_version, "",
|
|
||||||
false, "");
|
|
||||||
component_version = make_version_str(scope, component->mca_component_major_version,
|
|
||||||
component->mca_component_minor_version,
|
|
||||||
component->mca_component_release_version,
|
|
||||||
"", false, "");
|
|
||||||
if (ompi_info_pretty) {
|
|
||||||
asprintf(&message, "MCA %s", component->mca_type_name);
|
|
||||||
printed = false;
|
|
||||||
asprintf(&content, "%s (", component->mca_component_name);
|
|
||||||
|
|
||||||
if (want_mca) {
|
|
||||||
asprintf(&tmp, "%sMCA v%s", content, mca_version);
|
|
||||||
free(content);
|
|
||||||
content = tmp;
|
|
||||||
printed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (want_type) {
|
|
||||||
if (printed) {
|
|
||||||
asprintf(&tmp, "%s, ", content);
|
|
||||||
free(content);
|
|
||||||
content = tmp;
|
|
||||||
}
|
|
||||||
asprintf(&tmp, "%sAPI v%s", content, api_version);
|
|
||||||
free(content);
|
|
||||||
content = tmp;
|
|
||||||
printed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (want_component) {
|
|
||||||
if (printed) {
|
|
||||||
asprintf(&tmp, "%s, ", content);
|
|
||||||
free(content);
|
|
||||||
content = tmp;
|
|
||||||
}
|
|
||||||
asprintf(&tmp, "%sComponent v%s", content, component_version);
|
|
||||||
free(content);
|
|
||||||
content = tmp;
|
|
||||||
printed = true;
|
|
||||||
}
|
|
||||||
if (NULL != content) {
|
|
||||||
asprintf(&tmp, "%s)", content);
|
|
||||||
free(content);
|
|
||||||
} else {
|
|
||||||
tmp = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ompi_info_out(message, NULL, tmp);
|
|
||||||
free(message);
|
|
||||||
if (NULL != tmp) {
|
|
||||||
free(tmp);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
asprintf(&message, "mca:%s:%s:version", component->mca_type_name, component->mca_component_name);
|
|
||||||
if (want_mca) {
|
|
||||||
asprintf(&tmp, "mca:%s", mca_version);
|
|
||||||
ompi_info_out(NULL, message, tmp);
|
|
||||||
free(tmp);
|
|
||||||
}
|
|
||||||
if (want_type) {
|
|
||||||
asprintf(&tmp, "api:%s", api_version);
|
|
||||||
ompi_info_out(NULL, message, tmp);
|
|
||||||
free(tmp);
|
|
||||||
}
|
|
||||||
if (want_component) {
|
|
||||||
asprintf(&tmp, "component:%s", component_version);
|
|
||||||
ompi_info_out(NULL, message, tmp);
|
|
||||||
free(tmp);
|
|
||||||
}
|
|
||||||
free(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (NULL != mca_version) {
|
|
||||||
free(mca_version);
|
|
||||||
}
|
|
||||||
if (NULL != api_version) {
|
|
||||||
free(api_version);
|
|
||||||
}
|
|
||||||
if (NULL != component_version) {
|
|
||||||
free(component_version);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static char *make_version_str(const char *scope,
|
|
||||||
int major, int minor, int release,
|
|
||||||
const char *greek,
|
|
||||||
bool want_repo_rev, const char *repo)
|
|
||||||
{
|
|
||||||
char *str = NULL, *tmp;
|
|
||||||
char temp[BUFSIZ];
|
|
||||||
|
|
||||||
temp[BUFSIZ - 1] = '\0';
|
|
||||||
if (0 == strcmp(scope, ompi_info_ver_full) ||
|
|
||||||
0 == strcmp(scope, ompi_info_ver_all)) {
|
|
||||||
snprintf(temp, BUFSIZ - 1, "%d.%d", major, minor);
|
|
||||||
str = strdup(temp);
|
|
||||||
if (release > 0) {
|
|
||||||
snprintf(temp, BUFSIZ - 1, ".%d", release);
|
|
||||||
asprintf(&tmp, "%s%s", str, temp);
|
|
||||||
free(str);
|
|
||||||
str = tmp;
|
|
||||||
}
|
|
||||||
if (NULL != greek) {
|
|
||||||
asprintf(&tmp, "%s%s", str, greek);
|
|
||||||
free(str);
|
|
||||||
str = tmp;
|
|
||||||
}
|
|
||||||
if (want_repo_rev && NULL != repo) {
|
|
||||||
asprintf(&tmp, "%s%s", str, repo);
|
|
||||||
free(str);
|
|
||||||
str = tmp;
|
|
||||||
}
|
|
||||||
} else if (0 == strcmp(scope, ompi_info_ver_major)) {
|
|
||||||
snprintf(temp, BUFSIZ - 1, "%d", major);
|
|
||||||
} else if (0 == strcmp(scope, ompi_info_ver_minor)) {
|
|
||||||
snprintf(temp, BUFSIZ - 1, "%d", minor);
|
|
||||||
} else if (0 == strcmp(scope, ompi_info_ver_release)) {
|
|
||||||
snprintf(temp, BUFSIZ - 1, "%d", release);
|
|
||||||
} else if (0 == strcmp(scope, ompi_info_ver_greek)) {
|
|
||||||
str = strdup(greek);
|
|
||||||
} else if (0 == strcmp(scope, ompi_info_ver_repo)) {
|
|
||||||
str = strdup(repo);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (NULL == str) {
|
|
||||||
str = strdup(temp);
|
|
||||||
}
|
|
||||||
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
# 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) 2012 Los Alamos National Security, LLC.
|
||||||
|
# All rights reserved.
|
||||||
# $COPYRIGHT$
|
# $COPYRIGHT$
|
||||||
#
|
#
|
||||||
# Additional copyrights may follow
|
# Additional copyrights may follow
|
||||||
@ -19,17 +21,23 @@
|
|||||||
|
|
||||||
# This makefile.am does not stand on its own - it is included from opal/Makefile.am
|
# This makefile.am does not stand on its own - it is included from opal/Makefile.am
|
||||||
|
|
||||||
|
AM_CFLAGS = \
|
||||||
|
-DOPAL_CONFIGURE_HOST="\"@OPAL_CONFIGURE_HOST@\""
|
||||||
|
|
||||||
# Source code files
|
# Source code files
|
||||||
dist_pkgdata_DATA += runtime/help-opal-runtime.txt
|
dist_pkgdata_DATA += runtime/help-opal-runtime.txt \
|
||||||
|
runtime/help-opal_info.txt
|
||||||
|
|
||||||
headers += \
|
headers += \
|
||||||
runtime/opal_progress.h \
|
runtime/opal_progress.h \
|
||||||
runtime/opal.h \
|
runtime/opal.h \
|
||||||
runtime/opal_cr.h
|
runtime/opal_cr.h \
|
||||||
|
runtime/opal_info_support.h
|
||||||
|
|
||||||
libopen_pal_la_SOURCES += \
|
libopen_pal_la_SOURCES += \
|
||||||
runtime/opal_progress.c \
|
runtime/opal_progress.c \
|
||||||
runtime/opal_finalize.c \
|
runtime/opal_finalize.c \
|
||||||
runtime/opal_init.c \
|
runtime/opal_init.c \
|
||||||
runtime/opal_params.c \
|
runtime/opal_params.c \
|
||||||
runtime/opal_cr.c
|
runtime/opal_cr.c \
|
||||||
|
runtime/opal_info_support.c
|
||||||
|
1267
opal/runtime/opal_info_support.c
Обычный файл
1267
opal/runtime/opal_info_support.c
Обычный файл
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
108
opal/runtime/opal_info_support.h
Обычный файл
108
opal/runtime/opal_info_support.h
Обычный файл
@ -0,0 +1,108 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2012 Los Alamos National Security, LLC.
|
||||||
|
* All rights reserved.
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @file **/
|
||||||
|
|
||||||
|
#ifndef OPAL_INFO_REGISTER_H
|
||||||
|
#define OPAL_INFO_REGISTER_H
|
||||||
|
|
||||||
|
#include "opal_config.h"
|
||||||
|
|
||||||
|
#include "opal/class/opal_list.h"
|
||||||
|
#include "opal/class/opal_pointer_array.h"
|
||||||
|
#include "opal/util/cmd_line.h"
|
||||||
|
#include "opal/mca/base/base.h"
|
||||||
|
|
||||||
|
BEGIN_C_DECLS
|
||||||
|
|
||||||
|
extern const char *opal_info_path_prefix;
|
||||||
|
|
||||||
|
extern const char *opal_info_type_all;
|
||||||
|
extern const char *opal_info_type_opal;
|
||||||
|
extern const char *opal_info_component_all;
|
||||||
|
extern const char *opal_info_param_all;
|
||||||
|
|
||||||
|
extern const char *opal_info_ver_full;
|
||||||
|
extern const char *opal_info_ver_major;
|
||||||
|
extern const char *opal_info_ver_minor;
|
||||||
|
extern const char *opal_info_ver_release;
|
||||||
|
extern const char *opal_info_ver_greek;
|
||||||
|
extern const char *opal_info_ver_repo;
|
||||||
|
|
||||||
|
extern const char *opal_info_ver_all;
|
||||||
|
extern const char *opal_info_ver_mca;
|
||||||
|
extern const char *opal_info_ver_type;
|
||||||
|
extern const char *opal_info_ver_component;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Component-related functions
|
||||||
|
*/
|
||||||
|
typedef struct {
|
||||||
|
opal_list_item_t super;
|
||||||
|
char *type;
|
||||||
|
opal_list_t *components;
|
||||||
|
} opal_info_component_map_t;
|
||||||
|
OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_info_component_map_t);
|
||||||
|
|
||||||
|
END_C_DECLS
|
||||||
|
|
||||||
|
OPAL_DECLSPEC int opal_info_init(int argc, char **argv,
|
||||||
|
opal_cmd_line_t *opal_info_cmd_line);
|
||||||
|
|
||||||
|
OPAL_DECLSPEC void opal_info_finalize(void);
|
||||||
|
|
||||||
|
OPAL_DECLSPEC void opal_info_register_types(opal_pointer_array_t *mca_types);
|
||||||
|
|
||||||
|
OPAL_DECLSPEC int opal_info_register_components(opal_pointer_array_t *mca_types,
|
||||||
|
opal_pointer_array_t *component_map);
|
||||||
|
|
||||||
|
OPAL_DECLSPEC void opal_info_close_components(void);
|
||||||
|
|
||||||
|
OPAL_DECLSPEC void opal_info_do_params(bool want_all_in, bool want_internal,
|
||||||
|
opal_pointer_array_t *mca_type,
|
||||||
|
opal_cmd_line_t *opal_info_cmd_line);
|
||||||
|
|
||||||
|
OPAL_DECLSPEC void opal_info_show_path(const char *type, const char *value);
|
||||||
|
|
||||||
|
OPAL_DECLSPEC void opal_info_do_path(bool want_all, opal_cmd_line_t *cmd_line);
|
||||||
|
|
||||||
|
OPAL_DECLSPEC void opal_info_show_mca_params(opal_list_t *info,
|
||||||
|
const char *type,
|
||||||
|
const char *component,
|
||||||
|
bool want_internal);
|
||||||
|
|
||||||
|
OPAL_DECLSPEC void opal_info_show_mca_version(const mca_base_component_t *component,
|
||||||
|
const char *scope, const char *ver_type);
|
||||||
|
|
||||||
|
OPAL_DECLSPEC void opal_info_show_component_version(opal_pointer_array_t *mca_types,
|
||||||
|
opal_pointer_array_t *component_map,
|
||||||
|
const char *type_name,
|
||||||
|
const char *component_name,
|
||||||
|
const char *scope, const char *ver_type);
|
||||||
|
|
||||||
|
OPAL_DECLSPEC char *opal_info_make_version_str(const char *scope,
|
||||||
|
int major, int minor, int release,
|
||||||
|
const char *greek,
|
||||||
|
bool want_repo, const char *repo);
|
||||||
|
|
||||||
|
OPAL_DECLSPEC void opal_info_show_opal_version(const char *scope);
|
||||||
|
|
||||||
|
OPAL_DECLSPEC void opal_info_do_arch(void);
|
||||||
|
|
||||||
|
OPAL_DECLSPEC void opal_info_do_hostname(void);
|
||||||
|
|
||||||
|
OPAL_DECLSPEC void opal_info_out(const char *pretty_message, const char *plain_message, const char *value);
|
||||||
|
|
||||||
|
OPAL_DECLSPEC void opal_info_out_int(const char *pretty_message,
|
||||||
|
const char *plain_message,
|
||||||
|
int value);
|
||||||
|
|
||||||
|
#endif
|
@ -30,7 +30,11 @@ headers += \
|
|||||||
runtime/orte_globals.h \
|
runtime/orte_globals.h \
|
||||||
runtime/orte_quit.h \
|
runtime/orte_quit.h \
|
||||||
runtime/runtime_internals.h \
|
runtime/runtime_internals.h \
|
||||||
runtime/data_type_support/orte_dt_support.h
|
runtime/data_type_support/orte_dt_support.h \
|
||||||
|
runtime/orte_wait.h \
|
||||||
|
runtime/orte_cr.h \
|
||||||
|
runtime/orte_data_server.h \
|
||||||
|
runtime/orte_info_support.h
|
||||||
|
|
||||||
libopen_rte_la_SOURCES += \
|
libopen_rte_la_SOURCES += \
|
||||||
runtime/orte_finalize.c \
|
runtime/orte_finalize.c \
|
||||||
@ -43,17 +47,8 @@ libopen_rte_la_SOURCES += \
|
|||||||
runtime/data_type_support/orte_dt_print_fns.c \
|
runtime/data_type_support/orte_dt_print_fns.c \
|
||||||
runtime/data_type_support/orte_dt_packing_fns.c \
|
runtime/data_type_support/orte_dt_packing_fns.c \
|
||||||
runtime/data_type_support/orte_dt_unpacking_fns.c \
|
runtime/data_type_support/orte_dt_unpacking_fns.c \
|
||||||
runtime/orte_mca_params.c
|
runtime/orte_mca_params.c \
|
||||||
|
|
||||||
if !ORTE_DISABLE_FULL_SUPPORT
|
|
||||||
|
|
||||||
headers += \
|
|
||||||
runtime/orte_wait.h \
|
|
||||||
runtime/orte_cr.h \
|
|
||||||
runtime/orte_data_server.h
|
|
||||||
|
|
||||||
libopen_rte_la_SOURCES += \
|
|
||||||
runtime/orte_wait.c \
|
runtime/orte_wait.c \
|
||||||
runtime/orte_cr.c \
|
runtime/orte_cr.c \
|
||||||
runtime/orte_data_server.c
|
runtime/orte_data_server.c \
|
||||||
endif
|
runtime/orte_info_support.c
|
||||||
|
322
orte/runtime/orte_info_support.c
Обычный файл
322
orte/runtime/orte_info_support.c
Обычный файл
@ -0,0 +1,322 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
|
||||||
|
* University Research and Technology
|
||||||
|
* Corporation. All rights reserved.
|
||||||
|
* Copyright (c) 2004-2011 The University of Tennessee and The University
|
||||||
|
* of Tennessee Research Foundation. All rights
|
||||||
|
* reserved.
|
||||||
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||||
|
* University of Stuttgart. All rights reserved.
|
||||||
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2010-2012 Los Alamos National Security, LLC.
|
||||||
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2011-2012 University of Houston. All rights reserved.
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "orte_config.h"
|
||||||
|
#include "orte/constants.h"
|
||||||
|
#include "orte/types.h"
|
||||||
|
|
||||||
|
#include "opal/class/opal_pointer_array.h"
|
||||||
|
#include "opal/runtime/opal_info_support.h"
|
||||||
|
|
||||||
|
#include "orte/mca/db/base/base.h"
|
||||||
|
#include "orte/mca/errmgr/base/base.h"
|
||||||
|
#include "orte/mca/ess/base/base.h"
|
||||||
|
#include "orte/mca/grpcomm/base/base.h"
|
||||||
|
#include "orte/mca/iof/base/base.h"
|
||||||
|
#include "orte/mca/odls/base/base.h"
|
||||||
|
#include "orte/mca/oob/base/base.h"
|
||||||
|
#include "orte/mca/plm/base/base.h"
|
||||||
|
#include "orte/mca/ras/base/ras_private.h"
|
||||||
|
#include "orte/mca/rmaps/base/base.h"
|
||||||
|
#include "orte/mca/rml/base/base.h"
|
||||||
|
#include "orte/mca/routed/base/base.h"
|
||||||
|
#if OPAL_ENABLE_FT_CR == 1
|
||||||
|
#include "orte/mca/snapc/base/base.h"
|
||||||
|
#include "orte/mca/sstore/base/base.h"
|
||||||
|
#endif
|
||||||
|
#if ORTE_ENABLE_SENSORS
|
||||||
|
#include "orte/mca/sensor/base/base.h"
|
||||||
|
#endif
|
||||||
|
#include "orte/mca/filem/base/base.h"
|
||||||
|
#include "orte/mca/state/base/base.h"
|
||||||
|
#include "orte/util/proc_info.h"
|
||||||
|
#include "orte/runtime/runtime.h"
|
||||||
|
|
||||||
|
#include "orte/runtime/orte_info_support.h"
|
||||||
|
|
||||||
|
const char *orte_info_type_orte = "orte";
|
||||||
|
|
||||||
|
void orte_info_register_types(opal_pointer_array_t *mca_types)
|
||||||
|
{
|
||||||
|
/* frameworks */
|
||||||
|
opal_pointer_array_add(mca_types, "db");
|
||||||
|
opal_pointer_array_add(mca_types, "errmgr");
|
||||||
|
opal_pointer_array_add(mca_types, "ess");
|
||||||
|
opal_pointer_array_add(mca_types, "filem");
|
||||||
|
opal_pointer_array_add(mca_types, "grpcomm");
|
||||||
|
opal_pointer_array_add(mca_types, "iof");
|
||||||
|
opal_pointer_array_add(mca_types, "odls");
|
||||||
|
opal_pointer_array_add(mca_types, "oob");
|
||||||
|
opal_pointer_array_add(mca_types, "orte");
|
||||||
|
opal_pointer_array_add(mca_types, "plm");
|
||||||
|
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");
|
||||||
|
#if ORTE_ENABLE_SENSORS
|
||||||
|
opal_pointer_array_add(mca_types, "sensor");
|
||||||
|
#endif
|
||||||
|
#if OPAL_ENABLE_FT_CR == 1
|
||||||
|
opal_pointer_array_add(mca_types, "snapc");
|
||||||
|
opal_pointer_array_add(mca_types, "sstore");
|
||||||
|
#endif
|
||||||
|
opal_pointer_array_add(mca_types, "state");
|
||||||
|
}
|
||||||
|
|
||||||
|
int orte_info_register_components(opal_pointer_array_t *mca_types,
|
||||||
|
opal_pointer_array_t *component_map)
|
||||||
|
{
|
||||||
|
opal_info_component_map_t *map;
|
||||||
|
char *env, *str;
|
||||||
|
int i;
|
||||||
|
char *target, *save, *type;
|
||||||
|
char **env_save=NULL;
|
||||||
|
|
||||||
|
/* 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))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
asprintf(&env, "OMPI_MCA_%s", type);
|
||||||
|
if (NULL != (save = getenv(env))) {
|
||||||
|
/* save this param so it can later be restored */
|
||||||
|
asprintf(&str, "%s=%s", env, save);
|
||||||
|
opal_argv_append_nosize(&env_save, str);
|
||||||
|
free(str);
|
||||||
|
/* can't manipulate it directly, so make a copy first */
|
||||||
|
asprintf(&target, "%s=", env);
|
||||||
|
putenv(target);
|
||||||
|
free(target);
|
||||||
|
}
|
||||||
|
free(env);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set orte_process_info.proc_type to HNP to force all frameworks to
|
||||||
|
* open components
|
||||||
|
*/
|
||||||
|
orte_process_info.proc_type = ORTE_PROC_HNP;
|
||||||
|
|
||||||
|
/* Register the ORTE layer's MCA parameters */
|
||||||
|
|
||||||
|
if (ORTE_SUCCESS != orte_register_params()) {
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ORTE_SUCCESS != orte_db_base_open()) {
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
map = OBJ_NEW(opal_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_errmgr_base_open()) {
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
map = OBJ_NEW(opal_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_ess_base_open()) {
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
map = OBJ_NEW(opal_info_component_map_t);
|
||||||
|
map->type = strdup("ess");
|
||||||
|
map->components = &orte_ess_base_components_available;
|
||||||
|
opal_pointer_array_add(component_map, map);
|
||||||
|
|
||||||
|
if (ORTE_SUCCESS != orte_filem_base_open()) {
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
map = OBJ_NEW(opal_info_component_map_t);
|
||||||
|
map->type = strdup("filem");
|
||||||
|
map->components = &orte_filem_base_components_available;
|
||||||
|
opal_pointer_array_add(component_map, map);
|
||||||
|
|
||||||
|
if (ORTE_SUCCESS != orte_grpcomm_base_open()) {
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
map = OBJ_NEW(opal_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_iof_base_open()) {
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
map = OBJ_NEW(opal_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_odls_base_open()) {
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
map = OBJ_NEW(opal_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 != mca_oob_base_open()) {
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
map = OBJ_NEW(opal_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_plm_base_open()) {
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
map = OBJ_NEW(opal_info_component_map_t);
|
||||||
|
map->type = strdup("plm");
|
||||||
|
map->components = &orte_plm_base.available_components;
|
||||||
|
opal_pointer_array_add(component_map, map);
|
||||||
|
|
||||||
|
if (ORTE_SUCCESS != orte_ras_base_open()) {
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
map = OBJ_NEW(opal_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()) {
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
map = OBJ_NEW(opal_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_routed_base_open()) {
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
map = OBJ_NEW(opal_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_rml_base_open()) {
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
map = OBJ_NEW(opal_info_component_map_t);
|
||||||
|
map->type = strdup("rml");
|
||||||
|
map->components = &orte_rml_base_components;
|
||||||
|
opal_pointer_array_add(component_map, map);
|
||||||
|
|
||||||
|
#if ORTE_ENABLE_SENSORS
|
||||||
|
if (ORTE_SUCCESS != orte_sensor_base_open()) {
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
map = OBJ_NEW(opal_info_component_map_t);
|
||||||
|
map->type = strdup("sensor");
|
||||||
|
map->components = &mca_sensor_base_components_available;
|
||||||
|
opal_pointer_array_add(component_map, map);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if OPAL_ENABLE_FT_CR == 1
|
||||||
|
if (ORTE_SUCCESS != orte_snapc_base_open()) {
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
map = OBJ_NEW(opal_info_component_map_t);
|
||||||
|
map->type = strdup("snapc");
|
||||||
|
map->components = &orte_snapc_base_components_available;
|
||||||
|
opal_pointer_array_add(component_map, map);
|
||||||
|
|
||||||
|
if (ORTE_SUCCESS != orte_sstore_base_open()) {
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
map = OBJ_NEW(opal_info_component_map_t);
|
||||||
|
map->type = strdup("sstore");
|
||||||
|
map->components = &orte_sstore_base_components_available;
|
||||||
|
opal_pointer_array_add(component_map, map);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (ORTE_SUCCESS != orte_state_base_open()) {
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
map = OBJ_NEW(opal_info_component_map_t);
|
||||||
|
map->type = strdup("state");
|
||||||
|
map->components = &orte_state_base_components_available;
|
||||||
|
opal_pointer_array_add(component_map, map);
|
||||||
|
|
||||||
|
/* Restore the environment to what it was before we started so that
|
||||||
|
* if users setenv OMPI_MCA_<framework name> to some value, they'll
|
||||||
|
* see that value when it is shown via --param output.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (NULL != env_save) {
|
||||||
|
for (i = 0; i < opal_argv_count(env_save); ++i) {
|
||||||
|
putenv(env_save[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ORTE_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
void orte_info_close_components(void)
|
||||||
|
{
|
||||||
|
(void) orte_db_base_close();
|
||||||
|
(void) orte_errmgr_base_close();
|
||||||
|
(void) orte_ess_base_close();
|
||||||
|
(void) orte_filem_base_close();
|
||||||
|
(void) orte_grpcomm_base_close();
|
||||||
|
(void) orte_iof_base_close();
|
||||||
|
(void) orte_odls_base_close();
|
||||||
|
(void) mca_oob_base_close();
|
||||||
|
(void) orte_plm_base_close();
|
||||||
|
(void) orte_ras_base_close();
|
||||||
|
(void) orte_rmaps_base_close();
|
||||||
|
(void) orte_rml_base_close();
|
||||||
|
(void) orte_routed_base_close();
|
||||||
|
#if OPAL_ENABLE_FT_CR == 1
|
||||||
|
(void) orte_snapc_base_close();
|
||||||
|
(void) orte_sstore_base_close();
|
||||||
|
#endif
|
||||||
|
(void) orte_state_base_close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void orte_info_show_orte_version(const char *scope)
|
||||||
|
{
|
||||||
|
char *tmp, *tmp2;
|
||||||
|
|
||||||
|
asprintf(&tmp, "%s:version:full", orte_info_type_orte);
|
||||||
|
tmp2 = opal_info_make_version_str(scope,
|
||||||
|
ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
|
||||||
|
ORTE_RELEASE_VERSION,
|
||||||
|
ORTE_GREEK_VERSION,
|
||||||
|
ORTE_WANT_REPO_REV, ORTE_REPO_REV);
|
||||||
|
opal_info_out("Open RTE", tmp, tmp2);
|
||||||
|
free(tmp);
|
||||||
|
free(tmp2);
|
||||||
|
asprintf(&tmp, "%s:version:repo", orte_info_type_orte);
|
||||||
|
opal_info_out("Open RTE repo revision", tmp, ORTE_REPO_REV);
|
||||||
|
free(tmp);
|
||||||
|
asprintf(&tmp, "%s:version:release_date", orte_info_type_orte);
|
||||||
|
opal_info_out("Open RTE release date", tmp, ORTE_RELEASE_DATE);
|
||||||
|
free(tmp);
|
||||||
|
}
|
||||||
|
|
41
orte/runtime/orte_info_support.h
Обычный файл
41
orte/runtime/orte_info_support.h
Обычный файл
@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
|
||||||
|
* University Research and Technology
|
||||||
|
* Corporation. All rights reserved.
|
||||||
|
* Copyright (c) 2004-2011 The University of Tennessee and The University
|
||||||
|
* of Tennessee Research Foundation. All rights
|
||||||
|
* reserved.
|
||||||
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||||
|
* University of Stuttgart. All rights reserved.
|
||||||
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2010-2012 Los Alamos National Security, LLC.
|
||||||
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2011-2012 University of Houston. All rights reserved.
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ORTE_INFO_REGISTER_H
|
||||||
|
#define ORTE_INFO_REGISTER_H
|
||||||
|
|
||||||
|
#include "orte_config.h"
|
||||||
|
|
||||||
|
#include "opal/class/opal_pointer_array.h"
|
||||||
|
|
||||||
|
extern const char *orte_info_type_orte;
|
||||||
|
|
||||||
|
ORTE_DECLSPEC void orte_info_register_types(opal_pointer_array_t *mca_types);
|
||||||
|
|
||||||
|
ORTE_DECLSPEC int orte_info_register_components(opal_pointer_array_t *mca_types,
|
||||||
|
opal_pointer_array_t *component_map);
|
||||||
|
|
||||||
|
ORTE_DECLSPEC void orte_info_close_components(void);
|
||||||
|
|
||||||
|
ORTE_DECLSPEC void orte_info_show_orte_version(const char *scope);
|
||||||
|
|
||||||
|
#endif
|
Загрузка…
x
Ссылка в новой задаче
Block a user