This source file includes following definitions.
- errmgr_default_tool_register
- errmgr_default_tool_open
- errmgr_default_tool_close
- errmgr_default_tool_component_query
1
2
3
4
5
6
7
8
9
10
11 #include "orte_config.h"
12 #include "opal/util/output.h"
13
14 #include "orte/mca/errmgr/errmgr.h"
15 #include "orte/mca/errmgr/base/base.h"
16 #include "errmgr_default_tool.h"
17
18
19
20
21 const char *orte_errmgr_default_tool_component_version_string =
22 "ORTE ERRMGR default_tool MCA component version " ORTE_VERSION;
23
24
25
26
27 static int errmgr_default_tool_register(void);
28 static int errmgr_default_tool_open(void);
29 static int errmgr_default_tool_close(void);
30 static int errmgr_default_tool_component_query(mca_base_module_t **module, int *priority);
31
32
33
34
35
36 orte_errmgr_base_component_t mca_errmgr_default_tool_component =
37 {
38
39
40
41 .base_version = {
42 ORTE_ERRMGR_BASE_VERSION_3_0_0,
43
44 .mca_component_name = "default_tool",
45 MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
46 ORTE_RELEASE_VERSION),
47
48
49 .mca_open_component = errmgr_default_tool_open,
50 .mca_close_component = errmgr_default_tool_close,
51 .mca_query_component = errmgr_default_tool_component_query,
52 .mca_register_component_params = errmgr_default_tool_register,
53 },
54 .base_data = {
55
56 MCA_BASE_METADATA_PARAM_CHECKPOINT
57 },
58 };
59
60 static int my_priority;
61
62 static int errmgr_default_tool_register(void)
63 {
64 mca_base_component_t *c = &mca_errmgr_default_tool_component.base_version;
65
66 my_priority = 1000;
67 (void) mca_base_component_var_register(c, "priority",
68 "Priority of the default_tool errmgr component",
69 MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
70 OPAL_INFO_LVL_9,
71 MCA_BASE_VAR_SCOPE_READONLY, &my_priority);
72 return ORTE_SUCCESS;
73 }
74
75 static int errmgr_default_tool_open(void)
76 {
77 return ORTE_SUCCESS;
78 }
79
80 static int errmgr_default_tool_close(void)
81 {
82 return ORTE_SUCCESS;
83 }
84
85 static int errmgr_default_tool_component_query(mca_base_module_t **module, int *priority)
86 {
87 if (ORTE_PROC_IS_TOOL) {
88
89 *priority = my_priority;
90 *module = (mca_base_module_t *)&orte_errmgr_default_tool_module;
91 return ORTE_SUCCESS;
92 }
93
94 *priority = -1;
95 *module = NULL;
96 return ORTE_ERROR;
97 }