This source file includes following definitions.
- state_tool_open
- state_tool_close
- state_tool_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/state/state.h"
18 #include "orte/mca/state/base/base.h"
19 #include "state_tool.h"
20
21
22
23
24 const char *orte_state_tool_component_version_string =
25 "ORTE STATE tool MCA component version " ORTE_VERSION;
26
27
28
29
30 static int state_tool_open(void);
31 static int state_tool_close(void);
32 static int state_tool_component_query(mca_base_module_t **module, int *priority);
33
34
35
36
37
38 orte_state_base_component_t mca_state_tool_component =
39 {
40
41
42
43 .base_version = {
44 ORTE_STATE_BASE_VERSION_1_0_0,
45
46 .mca_component_name = "tool",
47 MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
48 ORTE_RELEASE_VERSION),
49
50
51 .mca_open_component = state_tool_open,
52 .mca_close_component = state_tool_close,
53 .mca_query_component = state_tool_component_query
54 },
55 .base_data = {
56
57 MCA_BASE_METADATA_PARAM_CHECKPOINT
58 },
59 };
60
61 static int my_priority=1000;
62
63 static int state_tool_open(void)
64 {
65 return ORTE_SUCCESS;
66 }
67
68 static int state_tool_close(void)
69 {
70 return ORTE_SUCCESS;
71 }
72
73 static int state_tool_component_query(mca_base_module_t **module, int *priority)
74 {
75 if (ORTE_PROC_IS_TOOL) {
76
77 *priority = my_priority;
78 *module = (mca_base_module_t *)&orte_state_tool_module;
79 return ORTE_SUCCESS;
80 }
81
82 *priority = -1;
83 *module = NULL;
84 return ORTE_ERROR;
85 }