2005-01-21 20:49:14 +03:00
|
|
|
/*
|
2010-03-24 00:28:02 +03:00
|
|
|
* Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
|
2005-11-05 22:57:48 +03:00
|
|
|
* 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-01-21 20:49:14 +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.
|
2011-06-15 17:10:13 +04:00
|
|
|
* Copyright (c) 2010-2011 Oak Ridge National Labs. All rights reserved.
|
2005-01-21 20:49:14 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
#include "orte_config.h"
|
2008-02-28 04:57:57 +03:00
|
|
|
#include "orte/constants.h"
|
2005-01-21 20:49:14 +03:00
|
|
|
|
2010-03-24 00:28:02 +03:00
|
|
|
#ifdef HAVE_STRING_H
|
|
|
|
#include <string.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
#include <unistd.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#include "opal/mca/base/base.h"
|
|
|
|
#include "opal/mca/base/mca_base_param.h"
|
2010-03-24 00:28:02 +03:00
|
|
|
|
|
|
|
#include "opal/util/opal_environ.h"
|
|
|
|
#include "opal/util/output.h"
|
2005-09-19 19:29:14 +04:00
|
|
|
#include "opal/util/trace.h"
|
2009-02-14 05:26:12 +03:00
|
|
|
#include "opal/util/output.h"
|
2005-01-21 20:49:14 +03:00
|
|
|
|
2010-04-28 08:06:57 +04:00
|
|
|
#include "orte/util/show_help.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "orte/mca/errmgr/base/base.h"
|
2006-09-15 01:29:51 +04:00
|
|
|
#include "orte/mca/errmgr/base/errmgr_private.h"
|
2005-01-21 20:49:14 +03:00
|
|
|
|
2005-07-04 22:24:58 +04:00
|
|
|
#include "orte/mca/errmgr/base/static-components.h"
|
2005-01-21 20:49:14 +03:00
|
|
|
|
|
|
|
/*
|
2010-03-24 00:28:02 +03:00
|
|
|
* Globals
|
2005-01-21 20:49:14 +03:00
|
|
|
*/
|
2010-03-24 00:28:02 +03:00
|
|
|
opal_list_t orte_errmgr_base_components_available;
|
2005-01-21 20:49:14 +03:00
|
|
|
|
2010-04-27 02:15:57 +04:00
|
|
|
orte_errmgr_base_t orte_errmgr_base;
|
|
|
|
|
2010-08-19 17:09:20 +04:00
|
|
|
orte_errmgr_base_component_t orte_errmgr_base_selected_component;
|
|
|
|
|
2010-03-24 00:28:02 +03:00
|
|
|
/* Public module provides a wrapper around previous functions */
|
2010-08-19 17:09:20 +04:00
|
|
|
orte_errmgr_base_module_t orte_errmgr = {
|
|
|
|
NULL, /* init */
|
|
|
|
NULL, /* finalize */
|
2010-04-06 02:59:21 +04:00
|
|
|
orte_errmgr_base_log,
|
2010-08-19 17:09:20 +04:00
|
|
|
orte_errmgr_base_abort,
|
2011-06-15 17:10:13 +04:00
|
|
|
orte_errmgr_base_abort_peers,
|
2011-02-08 23:42:32 +03:00
|
|
|
orte_errmgr_base_update_state,
|
2010-08-19 17:09:20 +04:00
|
|
|
NULL, /* predicted_fault */
|
|
|
|
NULL, /* suggest_map_targets */
|
2011-02-18 05:48:12 +03:00
|
|
|
NULL, /* ft_event */
|
|
|
|
orte_errmgr_base_register_migration_warning
|
2010-03-24 00:28:02 +03:00
|
|
|
};
|
2005-01-21 20:49:14 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function for finding and opening either all MCA components, or the one
|
|
|
|
* that was specifically requested via a MCA parameter.
|
|
|
|
*/
|
2005-03-14 23:57:21 +03:00
|
|
|
int orte_errmgr_base_open(void)
|
2005-01-21 20:49:14 +03:00
|
|
|
{
|
2005-09-19 19:29:14 +04:00
|
|
|
OPAL_TRACE(5);
|
2005-03-24 23:23:15 +03:00
|
|
|
|
2010-03-24 00:28:02 +03:00
|
|
|
/* Only pass this way once */
|
2010-04-27 02:15:57 +04:00
|
|
|
if( orte_errmgr_base.initialized ) {
|
2010-03-24 00:28:02 +03:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2010-04-27 02:15:57 +04:00
|
|
|
orte_errmgr_base.output = opal_output_open(NULL);
|
2010-03-24 00:28:02 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Open up all available components
|
|
|
|
*/
|
|
|
|
if (ORTE_SUCCESS !=
|
|
|
|
mca_base_components_open("errmgr",
|
2010-04-27 02:15:57 +04:00
|
|
|
orte_errmgr_base.output,
|
2010-03-24 00:28:02 +03:00
|
|
|
mca_errmgr_base_static_components,
|
|
|
|
&orte_errmgr_base_components_available,
|
|
|
|
true)) {
|
|
|
|
return ORTE_ERROR;
|
2005-03-14 23:57:21 +03:00
|
|
|
}
|
|
|
|
|
2010-04-27 02:15:57 +04:00
|
|
|
orte_errmgr_base.initialized = true;
|
2005-08-15 22:25:35 +04:00
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
2005-01-21 20:49:14 +03:00
|
|
|
}
|