2005-03-14 23:57:21 +03:00
|
|
|
/*
|
2005-11-05 22:57:48 +03: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 23:57:21 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2005-03-14 23:57:21 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
|
|
|
#include "include/orte_constants.h"
|
|
|
|
|
|
|
|
#include "mca/mca.h"
|
|
|
|
#include "mca/base/base.h"
|
|
|
|
#include "mca/base/mca_base_param.h"
|
2005-07-04 03:31:27 +04:00
|
|
|
#include "opal/util/output.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
#include "mca/ras/base/base.h"
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* 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 22:24:58 +04:00
|
|
|
#include "orte/mca/ras/base/static-components.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Global variables
|
|
|
|
*/
|
2005-08-11 23:51:50 +04:00
|
|
|
orte_ras_base_module_t orte_ras;
|
2005-03-14 23:57:21 +03: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)
|
|
|
|
{
|
2005-10-08 02:24:52 +04:00
|
|
|
int value;
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
/* Debugging / verbose output */
|
|
|
|
|
2005-07-04 03:31:27 +04:00
|
|
|
orte_ras_base.ras_output = opal_output_open(NULL);
|
2005-10-08 02:24:52 +04: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 23:57:21 +03:00
|
|
|
if (value != 0) {
|
2005-07-04 03:31:27 +04:00
|
|
|
orte_ras_base.ras_output = opal_output_open(NULL);
|
2005-03-14 23:57:21 +03:00
|
|
|
} else {
|
|
|
|
orte_ras_base.ras_output = -1;
|
|
|
|
}
|
|
|
|
|
2005-10-08 02:24:52 +04:00
|
|
|
/* Defaults */
|
|
|
|
|
|
|
|
orte_ras_base.ras_opened_valid = false;
|
|
|
|
orte_ras_base.ras_available_valid = false;
|
2005-09-27 06:54:15 +04:00
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
/* Open up all available components */
|
|
|
|
|
|
|
|
if (ORTE_SUCCESS !=
|
2005-08-15 22:25:35 +04:00
|
|
|
mca_base_components_open("ras", orte_ras_base.ras_output,
|
|
|
|
mca_ras_base_static_components,
|
2005-04-13 07:19:48 +04:00
|
|
|
&orte_ras_base.ras_opened, true)) {
|
2005-03-14 23:57:21 +03:00
|
|
|
return ORTE_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* All done */
|
2005-10-08 02:24:52 +04:00
|
|
|
|
|
|
|
orte_ras_base.ras_opened_valid = true;
|
2005-03-14 23:57:21 +03:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|