2004-02-01 00:43:26 +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.
|
2004-11-28 23:09:25 +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.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-02-01 00:43:26 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "orte_config.h"
|
|
|
|
#include "orte/orte_constants.h"
|
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#include "opal/mca/base/base.h"
|
2006-12-02 02:03:09 +03:00
|
|
|
#include "opal/util/output.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/mca/base/mca_base_param.h"
|
|
|
|
#include "orte/mca/oob/oob.h"
|
2004-02-01 00:43:26 +03:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The following file was created by configure. It contains extern
|
|
|
|
* statements and the definition of an array of pointers to each
|
2004-08-02 04:24:22 +04:00
|
|
|
* component's public mca_base_component_t struct.
|
2004-02-01 00:43:26 +03:00
|
|
|
*/
|
|
|
|
|
2005-07-04 22:24:58 +04:00
|
|
|
#include "orte/mca/oob/base/static-components.h"
|
2004-02-01 00:43:26 +03:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Global variables
|
|
|
|
*/
|
2004-08-03 01:24:00 +04:00
|
|
|
mca_oob_t mca_oob;
|
2004-02-01 00:43:26 +03:00
|
|
|
int mca_oob_base_output = -1;
|
2004-08-18 19:51:40 +04:00
|
|
|
char* mca_oob_base_include = NULL;
|
|
|
|
char* mca_oob_base_exclude = NULL;
|
2005-07-03 20:22:16 +04:00
|
|
|
opal_list_t mca_oob_base_components;
|
|
|
|
opal_list_t mca_oob_base_modules;
|
2005-10-06 23:39:20 +04:00
|
|
|
opal_list_t mca_oob_base_exception_handlers;
|
2006-12-02 01:30:39 +03:00
|
|
|
bool orte_oob_base_timing;
|
|
|
|
bool orte_oob_xcast_timing;
|
|
|
|
int orte_oob_xcast_mode;
|
2004-02-01 00:43:26 +03:00
|
|
|
|
|
|
|
/**
|
2004-08-02 04:24:22 +04:00
|
|
|
* Function for finding and opening either all MCA components, or the one
|
2004-02-01 00:43:26 +03:00
|
|
|
* that was specifically requested via a MCA parameter.
|
|
|
|
*/
|
|
|
|
int mca_oob_base_open(void)
|
|
|
|
{
|
2006-11-03 19:04:40 +03:00
|
|
|
int param, value;
|
2006-12-02 01:30:39 +03:00
|
|
|
char *mode;
|
2006-11-03 19:04:40 +03:00
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
/* Open up all available components */
|
2004-02-01 00:43:26 +03:00
|
|
|
|
2005-07-03 20:22:16 +04:00
|
|
|
OBJ_CONSTRUCT(&mca_oob_base_components, opal_list_t);
|
|
|
|
OBJ_CONSTRUCT(&mca_oob_base_modules, opal_list_t);
|
2005-10-06 23:39:20 +04:00
|
|
|
OBJ_CONSTRUCT(&mca_oob_base_exception_handlers, opal_list_t);
|
2004-08-03 01:24:00 +04:00
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
if (ORTE_SUCCESS !=
|
2005-08-15 22:25:35 +04:00
|
|
|
mca_base_components_open("oob", mca_oob_base_output,
|
|
|
|
mca_oob_base_static_components,
|
2005-04-13 07:19:48 +04:00
|
|
|
&mca_oob_base_components, true)) {
|
2005-08-15 22:25:35 +04:00
|
|
|
return ORTE_ERROR;
|
2004-02-01 00:43:26 +03:00
|
|
|
}
|
|
|
|
|
2004-08-18 19:51:40 +04:00
|
|
|
/* register parameters */
|
2005-08-15 22:25:35 +04:00
|
|
|
mca_base_param_reg_string_name("oob_base", "include",
|
|
|
|
"Components to include for oob framework selection",
|
|
|
|
false, false, NULL, &mca_oob_base_include);
|
|
|
|
mca_base_param_reg_string_name("oob_base", "exclude",
|
|
|
|
"Components to exclude for oob framework selection",
|
|
|
|
false, false, NULL, &mca_oob_base_exclude);
|
2004-08-02 04:24:22 +04:00
|
|
|
|
2006-11-03 19:04:40 +03:00
|
|
|
param = mca_base_param_reg_int_name("orte", "timing",
|
|
|
|
"Request that critical timing loops be measured",
|
|
|
|
false, false, 0, &value);
|
|
|
|
if (value != 0) {
|
|
|
|
orte_oob_base_timing = true;
|
|
|
|
} else {
|
|
|
|
orte_oob_base_timing = false;
|
|
|
|
}
|
|
|
|
|
2006-12-02 01:30:39 +03:00
|
|
|
param = mca_base_param_reg_int_name("oob_xcast", "timing",
|
|
|
|
"Request that xcast timing loops be measured",
|
|
|
|
false, false, 0, &value);
|
|
|
|
if (value != 0) {
|
|
|
|
orte_oob_xcast_timing = true;
|
|
|
|
} else {
|
|
|
|
orte_oob_xcast_timing = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
param = mca_base_param_reg_string_name("oob_xcast", "mode",
|
|
|
|
"Select xcast mode (\"linear\" [default] | \"binomial\")",
|
|
|
|
false, false, "linear", &mode);
|
|
|
|
if (0 == strcmp(mode, "linear")) {
|
|
|
|
orte_oob_xcast_mode = 1;
|
|
|
|
} else if (0 != strcmp(mode, "binomial")) {
|
|
|
|
opal_output(0, "oob_xcast_mode: unknown option %s", mode);
|
|
|
|
return ORTE_ERROR;
|
|
|
|
} else {
|
|
|
|
orte_oob_xcast_mode = 0;
|
|
|
|
}
|
|
|
|
|
2004-08-18 19:51:40 +04:00
|
|
|
/* All done */
|
2005-08-15 22:25:35 +04:00
|
|
|
return ORTE_SUCCESS;
|
2004-02-01 00:43:26 +03:00
|
|
|
}
|
2004-07-01 18:49:54 +04:00
|
|
|
|