OpenMPI  0.1.1
base.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3  * University Research and Technology
4  * Corporation. All rights reserved.
5  * Copyright (c) 2004-2005 The University of Tennessee and The University
6  * of Tennessee Research Foundation. All rights
7  * reserved.
8  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9  * University of Stuttgart. All rights reserved.
10  * Copyright (c) 2004-2005 The Regents of the University of California.
11  * All rights reserved.
12  * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
13  * $COPYRIGHT$
14  *
15  * Additional copyrights may follow
16  *
17  * $HEADER$
18  */
19 /** @file:
20  */
21 
22 #ifndef MCA_NOTIFIER_BASE_H
23 #define MCA_NOTIFIER_BASE_H
24 
25 /*
26  * includes
27  */
28 #include "orte_config.h"
29 
30 #include "opal/mca/mca.h"
31 #include "opal/class/opal_object.h"
32 #include "opal/class/opal_list.h"
33 
34 #include "orte/mca/ess/ess.h"
36 
37 BEGIN_C_DECLS
38 
39 /*
40  * Type for holding selected module / component pairs
41  */
42 typedef struct {
43  opal_list_item_t super;
44  /* Component */
45  orte_notifier_base_component_t *onbsp_component;
46  /* Module */
47  orte_notifier_base_module_t *onbsp_module;
48  /* Priority */
49  int onbsp_priority;
51 
53 
54 /*
55  * function definitions
56  */
57 ORTE_DECLSPEC int orte_notifier_base_open(void);
58 ORTE_DECLSPEC int orte_notifier_base_close(void);
59 ORTE_DECLSPEC int orte_notifier_base_select(void);
60 
61 #if !ORTE_DISABLE_FULL_SUPPORT
62 ORTE_DECLSPEC void orte_notifier_log(orte_notifier_base_severity_t severity,
63  int errcode,
64  const char *msg, ...);
65 ORTE_DECLSPEC void orte_notifier_show_help(orte_notifier_base_severity_t severity,
66  int errcode,
67  const char *file,
68  const char *topic, ...);
69 ORTE_DECLSPEC void orte_notifier_log_peer(orte_notifier_base_severity_t severity,
70  int errcode,
71  orte_process_name_t *peer_proc,
72  const char *msg, ...);
73 ORTE_DECLSPEC const char* orte_notifier_base_sev2str(orte_notifier_base_severity_t severity);
74 ORTE_DECLSPEC char *orte_notifier_base_peer_log(int errcode,
75  orte_process_name_t *peer_proc,
76  const char *msg, va_list ap);
77 
78 #if ORTE_WANT_NOTIFIER_LOG_EVENT
79 
80 ORTE_DECLSPEC int orte_notifier_base_events_init(void);
81 ORTE_DECLSPEC void orte_notifier_base_events_finalize(void);
82 
83 #else /* ORTE_WANT_NOTIFIER_LOG_EVENT */
84 
85 #define orte_notifier_base_events_init() do {} while (0)
86 #define orte_notifier_base_events_finalize() do {} while (0)
87 
88 #endif /* ORTE_WANT_NOTIFIER_LOG_EVENT */
89 
90 /*
91  * global variables in the base
92  * Needs to be declspec'ed for ompi_info and others
93  */
94 /*
95  * Indication of whether a component was successfully selected or not
96  * (1 component per interface)
97  */
98 ORTE_DECLSPEC extern bool orte_notifier_base_log_selected;
99 ORTE_DECLSPEC extern bool orte_notifier_base_help_selected;
100 ORTE_DECLSPEC extern bool orte_notifier_base_log_peer_selected;
101 ORTE_DECLSPEC extern bool orte_notifier_base_log_event_selected;
102 /*
103  * Lists of selected modules (1 per interface)
104  */
105 ORTE_DECLSPEC extern opal_list_t orte_notifier_log_selected_modules;
106 ORTE_DECLSPEC extern opal_list_t orte_notifier_help_selected_modules;
107 ORTE_DECLSPEC extern opal_list_t orte_notifier_log_peer_selected_modules;
108 ORTE_DECLSPEC extern opal_list_t orte_notifier_log_event_selected_modules;
109 /*
110  * That one is a merge of the per interface lists
111  * It is used during finalize phase to finalize only once each selected module
112  */
113 ORTE_DECLSPEC extern opal_list_t orte_notifier_base_selected_modules;
114 ORTE_DECLSPEC extern int orte_notifier_base_output;
115 ORTE_DECLSPEC extern orte_notifier_base_severity_t orte_notifier_threshold_severity;
116 ORTE_DECLSPEC extern opal_list_t orte_notifier_base_components_available;
117 
118 #endif /* !ORTE_DISABLE_FULL_SUPPORT */
119 
120 END_C_DECLS
121 #endif
The OpenRTE Environment-Specific Services.
Definition: types.h:146
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
Definition: notifier.h:98
Top-level interface for all MCA components.
Definition: opal_list.h:98
ORTE_DECLSPEC OBJ_CLASS_DECLARATION(mca_oob_base_info_t)
declare the association structure as a class
Definition: opal_list.h:147
Definition: notifier.h:138
ORTE_DECLSPEC int orte_notifier_base_open(void)
Function for finding and opening either all MCA components, or the one that was specifically requeste...
Definition: notifier_base_open.c:69
ORTE_DECLSPEC int orte_notifier_base_select(void)
Function for selecting a set of components from all those that are available.
Definition: notifier_base_select.c:117
A simple C-language object-oriented system with single inheritance and ownership-based memory managem...
The OpenRTE Notifier Framework.