This source file includes following definitions.
- orte_rmaps_round_robin_register
- orte_rmaps_round_robin_open
- orte_rmaps_round_robin_query
- orte_rmaps_round_robin_close
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #include "orte_config.h"
23 #include "orte/constants.h"
24
25 #include "opal/mca/base/base.h"
26
27 #include "orte/mca/rmaps/base/rmaps_private.h"
28 #include "rmaps_rr.h"
29
30
31
32
33
34 static int orte_rmaps_round_robin_register(void);
35 static int orte_rmaps_round_robin_open(void);
36 static int orte_rmaps_round_robin_close(void);
37 static int orte_rmaps_round_robin_query(mca_base_module_t **module, int *priority);
38
39 static int my_priority;
40
41 orte_rmaps_base_component_t mca_rmaps_round_robin_component = {
42 .base_version = {
43 ORTE_RMAPS_BASE_VERSION_2_0_0,
44
45 .mca_component_name = "round_robin",
46 MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
47 ORTE_RELEASE_VERSION),
48 .mca_open_component = orte_rmaps_round_robin_open,
49 .mca_close_component = orte_rmaps_round_robin_close,
50 .mca_query_component = orte_rmaps_round_robin_query,
51 .mca_register_component_params = orte_rmaps_round_robin_register,
52 },
53 .base_data = {
54
55 MCA_BASE_METADATA_PARAM_CHECKPOINT
56 },
57 };
58
59
60
61
62
63 static int orte_rmaps_round_robin_register(void)
64 {
65 my_priority = 10;
66 (void) mca_base_component_var_register(&mca_rmaps_round_robin_component.base_version,
67 "priority", "Priority of the rr rmaps component",
68 MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
69 OPAL_INFO_LVL_9,
70 MCA_BASE_VAR_SCOPE_READONLY, &my_priority);
71
72 return ORTE_SUCCESS;
73 }
74
75 static int orte_rmaps_round_robin_open(void)
76 {
77 return ORTE_SUCCESS;
78 }
79
80
81 static int orte_rmaps_round_robin_query(mca_base_module_t **module, int *priority)
82 {
83
84
85
86
87 *priority = my_priority;
88 *module = (mca_base_module_t *)&orte_rmaps_round_robin_module;
89 return ORTE_SUCCESS;
90 }
91
92
93
94
95
96 static int orte_rmaps_round_robin_close(void)
97 {
98 return ORTE_SUCCESS;
99 }
100
101