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