This source file includes following definitions.
- direct_register
- direct_open
- direct_close
- direct_query
1
2
3
4
5
6
7
8
9
10
11
12
13
14 #include "orte_config.h"
15 #include "orte/constants.h"
16
17 #include "orte/mca/mca.h"
18 #include "opal/runtime/opal_params.h"
19
20 #include "orte/util/proc_info.h"
21
22 #include "grpcomm_direct.h"
23
24 static int my_priority=5;
25 static int direct_open(void);
26 static int direct_close(void);
27 static int direct_query(mca_base_module_t **module, int *priority);
28 static int direct_register(void);
29
30
31
32
33 orte_grpcomm_base_component_t mca_grpcomm_direct_component = {
34 .base_version = {
35 ORTE_GRPCOMM_BASE_VERSION_3_0_0,
36
37 .mca_component_name = "direct",
38 MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
39 ORTE_RELEASE_VERSION),
40 .mca_open_component = direct_open,
41 .mca_close_component = direct_close,
42 .mca_query_component = direct_query,
43 .mca_register_component_params = direct_register,
44 },
45 .base_data = {
46
47 MCA_BASE_METADATA_PARAM_CHECKPOINT
48 },
49 };
50
51 static int direct_register(void)
52 {
53 mca_base_component_t *c = &mca_grpcomm_direct_component.base_version;
54
55
56
57
58 my_priority = 85;
59 (void) mca_base_component_var_register(c, "priority",
60 "Priority of the grpcomm direct component",
61 MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
62 OPAL_INFO_LVL_9,
63 MCA_BASE_VAR_SCOPE_READONLY,
64 &my_priority);
65 return ORTE_SUCCESS;
66 }
67
68
69 static int direct_open(void)
70 {
71 return ORTE_SUCCESS;
72 }
73
74 static int direct_close(void)
75 {
76 return ORTE_SUCCESS;
77 }
78
79 static int direct_query(mca_base_module_t **module, int *priority)
80 {
81
82 *priority = my_priority;
83 *module = (mca_base_module_t *)&orte_grpcomm_direct_module;
84 return ORTE_SUCCESS;
85 }