This source file includes following definitions.
- tool_component_register
- orte_ess_tool_component_open
- orte_ess_tool_component_query
- orte_ess_tool_component_close
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 #include "orte_config.h"
30 #include "orte/constants.h"
31
32 #include "orte/util/proc_info.h"
33
34 #include "orte/mca/ess/ess.h"
35 #include "orte/mca/ess/tool/ess_tool.h"
36
37 extern orte_ess_base_module_t orte_ess_tool_module;
38
39 static int tool_component_register(void);
40
41
42
43
44
45 orte_ess_tool_component_t mca_ess_tool_component = {
46 {
47 .base_version = {
48 ORTE_ESS_BASE_VERSION_3_0_0,
49
50
51 .mca_component_name = "tool",
52 MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
53 ORTE_RELEASE_VERSION),
54
55
56 .mca_open_component = orte_ess_tool_component_open,
57 .mca_close_component = orte_ess_tool_component_close,
58 .mca_query_component = orte_ess_tool_component_query,
59 .mca_register_component_params = tool_component_register,
60 },
61 .base_data = {
62
63 MCA_BASE_METADATA_PARAM_CHECKPOINT
64 },
65 },
66 .async = false,
67 .system_server_first = false,
68 .system_server_only = false,
69 .wait_to_connect = 0,
70 .num_retries = 0,
71 .pid = 0
72 };
73
74 static int tool_component_register(void)
75 {
76 mca_base_component_t *c = &mca_ess_tool_component.super.base_version;
77
78 (void) mca_base_component_var_register (c, "async_progress", "Setup an async progress thread",
79 MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
80 OPAL_INFO_LVL_2,
81 MCA_BASE_VAR_SCOPE_READONLY,
82 &mca_ess_tool_component.async);
83
84 (void) mca_base_component_var_register (c, "do_not_connect",
85 "Do not connect to a PMIx server",
86 MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
87 OPAL_INFO_LVL_2,
88 MCA_BASE_VAR_SCOPE_READONLY,
89 &mca_ess_tool_component.do_not_connect);
90
91 (void) mca_base_component_var_register (c, "system_server_first",
92 "Look for a system PMIx server first",
93 MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
94 OPAL_INFO_LVL_2,
95 MCA_BASE_VAR_SCOPE_READONLY,
96 &mca_ess_tool_component.system_server_first);
97
98 (void) mca_base_component_var_register (c, "system_server_only",
99 "Only connect to a system server (and not an mpirun)",
100 MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
101 OPAL_INFO_LVL_2,
102 MCA_BASE_VAR_SCOPE_READONLY,
103 &mca_ess_tool_component.system_server_only);
104
105 (void) mca_base_component_var_register (c, "wait_to_connect",
106 "Time in seconds to wait before retrying connection to server",
107 MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
108 OPAL_INFO_LVL_2,
109 MCA_BASE_VAR_SCOPE_READONLY,
110 &mca_ess_tool_component.wait_to_connect);
111
112 (void) mca_base_component_var_register (c, "num_retries",
113 "Number of times to retry connecting to server",
114 MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
115 OPAL_INFO_LVL_2,
116 MCA_BASE_VAR_SCOPE_READONLY,
117 &mca_ess_tool_component.num_retries);
118
119 (void) mca_base_component_var_register (c, "server_pid",
120 "PID of the server to which we are to connect",
121 MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
122 OPAL_INFO_LVL_2,
123 MCA_BASE_VAR_SCOPE_READONLY,
124 &mca_ess_tool_component.pid);
125 return ORTE_SUCCESS;
126 }
127
128 int
129 orte_ess_tool_component_open(void)
130 {
131 return ORTE_SUCCESS;
132 }
133
134
135 int orte_ess_tool_component_query(mca_base_module_t **module, int *priority)
136 {
137
138
139
140
141
142 if (ORTE_PROC_IS_TOOL) {
143 *priority = 10;
144 *module = (mca_base_module_t *)&orte_ess_tool_module;
145 return ORTE_SUCCESS;
146 }
147
148
149 *priority = -1;
150 *module = NULL;
151 return ORTE_ERROR;
152 }
153
154
155 int
156 orte_ess_tool_component_close(void)
157 {
158 return ORTE_SUCCESS;
159 }