2005-03-14 20:57:21 +00:00
|
|
|
/*
|
2005-11-05 19:57:48 +00:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2005-03-14 20:57:21 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 12:43:37 +00:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2005-03-14 20:57:21 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "orte/orte_constants.h"
|
2005-03-14 20:57:21 +00:00
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#include "opal/mca/base/base.h"
|
|
|
|
#include "opal/mca/base/mca_base_param.h"
|
2005-07-03 23:31:27 +00:00
|
|
|
#include "opal/util/output.h"
|
2006-07-10 14:10:21 +00:00
|
|
|
|
|
|
|
#include "orte/dss/dss.h"
|
|
|
|
#include "orte/mca/errmgr/errmgr.h"
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "orte/mca/ras/base/base.h"
|
2005-03-14 20:57:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The following file was created by configure. It contains extern
|
|
|
|
* statements and the definition of an array of pointers to each
|
|
|
|
* component's public mca_base_component_t struct.
|
|
|
|
*/
|
|
|
|
|
2005-07-04 18:24:58 +00:00
|
|
|
#include "orte/mca/ras/base/static-components.h"
|
2005-03-14 20:57:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Global variables
|
|
|
|
*/
|
2005-08-11 19:51:50 +00:00
|
|
|
orte_ras_base_module_t orte_ras;
|
2005-03-14 20:57:21 +00:00
|
|
|
orte_ras_base_t orte_ras_base;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function for finding and opening either all MCA components, or the one
|
|
|
|
* that was specifically requested via a MCA parameter.
|
|
|
|
*/
|
|
|
|
int orte_ras_base_open(void)
|
|
|
|
{
|
2006-07-10 14:10:21 +00:00
|
|
|
int value, rc;
|
|
|
|
orte_data_type_t tmp;
|
2005-03-14 20:57:21 +00:00
|
|
|
|
|
|
|
/* Debugging / verbose output */
|
|
|
|
|
2005-07-03 23:31:27 +00:00
|
|
|
orte_ras_base.ras_output = opal_output_open(NULL);
|
2005-10-07 22:24:52 +00:00
|
|
|
mca_base_param_reg_int_name("ras_base", "verbose",
|
|
|
|
"Enable debugging for the RAS framework (nonzero = enabled)",
|
|
|
|
false, false, 0, &value);
|
2005-03-14 20:57:21 +00:00
|
|
|
if (value != 0) {
|
2005-07-03 23:31:27 +00:00
|
|
|
orte_ras_base.ras_output = opal_output_open(NULL);
|
2005-03-14 20:57:21 +00:00
|
|
|
} else {
|
|
|
|
orte_ras_base.ras_output = -1;
|
|
|
|
}
|
|
|
|
|
2005-10-07 22:24:52 +00:00
|
|
|
/* Defaults */
|
|
|
|
|
|
|
|
orte_ras_base.ras_opened_valid = false;
|
|
|
|
orte_ras_base.ras_available_valid = false;
|
2005-09-27 02:54:15 +00:00
|
|
|
|
2006-07-10 14:10:21 +00:00
|
|
|
/** register the base system types with the DSS */
|
|
|
|
tmp = ORTE_RAS_NODE;
|
|
|
|
if (ORTE_SUCCESS != (rc = orte_dss.register_type(orte_ras_base_pack_node,
|
|
|
|
orte_ras_base_unpack_node,
|
|
|
|
(orte_dss_copy_fn_t)orte_ras_base_copy_node,
|
|
|
|
(orte_dss_compare_fn_t)orte_ras_base_compare_node,
|
|
|
|
(orte_dss_size_fn_t)orte_ras_base_size_node,
|
|
|
|
(orte_dss_print_fn_t)orte_ras_base_print_node,
|
|
|
|
(orte_dss_release_fn_t)orte_ras_base_std_obj_release,
|
|
|
|
ORTE_DSS_STRUCTURED,
|
|
|
|
"ORTE_RAS_NODE", &tmp))) {
|
|
|
|
ORTE_ERROR_LOG(rc);
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2005-03-14 20:57:21 +00:00
|
|
|
/* Open up all available components */
|
|
|
|
|
|
|
|
if (ORTE_SUCCESS !=
|
2005-08-15 18:25:35 +00:00
|
|
|
mca_base_components_open("ras", orte_ras_base.ras_output,
|
|
|
|
mca_ras_base_static_components,
|
2005-04-13 03:19:48 +00:00
|
|
|
&orte_ras_base.ras_opened, true)) {
|
2005-03-14 20:57:21 +00:00
|
|
|
return ORTE_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* All done */
|
2005-10-07 22:24:52 +00:00
|
|
|
|
|
|
|
orte_ras_base.ras_opened_valid = true;
|
2005-03-14 20:57:21 +00:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|