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