This source file includes following definitions.
- pmix_s1_component_register
- pmix_s1_component_query
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 #include "opal_config.h"
21
22 #include "opal/constants.h"
23 #include "opal/mca/pmix/pmix.h"
24 #include "pmix_s1.h"
25
26
27
28
29 const char *opal_pmix_s1_component_version_string =
30 "OPAL s1 pmix MCA component version " OPAL_VERSION;
31
32
33
34
35 static int pmix_s1_component_query(mca_base_module_t **module, int *priority);
36 static int pmix_s1_component_register(void);
37
38
39
40
41
42
43
44 opal_pmix_base_component_t mca_pmix_s1_component = {
45
46
47
48
49 .base_version = {
50
51
52
53 OPAL_PMIX_BASE_VERSION_2_0_0,
54
55
56
57 .mca_component_name = "s1",
58 MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION,
59 OPAL_RELEASE_VERSION),
60
61
62 .mca_query_component = pmix_s1_component_query,
63 .mca_register_component_params = pmix_s1_component_register,
64 },
65
66 .base_data = {
67
68 MCA_BASE_METADATA_PARAM_CHECKPOINT
69 },
70 .priority = 10,
71 };
72
73 static int pmix_s1_component_register(void)
74 {
75 int ret;
76 mca_base_component_t *component = &mca_pmix_s1_component.base_version;
77
78 mca_pmix_s1_component.priority = 10;
79 ret = mca_base_component_var_register(component, "priority",
80 "Priority of the pmix s1 component (default: 10)",
81 MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
82 OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY,
83 &mca_pmix_s1_component.priority);
84 if (0 > ret) {
85 return ret;
86 }
87
88 return OPAL_SUCCESS;
89 }
90
91 static int pmix_s1_component_query(mca_base_module_t **module, int *priority)
92 {
93
94 if (NULL == getenv("SLURM_STEP_NUM_TASKS")) {
95 *priority = 0;
96 *module = NULL;
97 return OPAL_ERROR;
98 }
99
100
101
102 *priority = mca_pmix_s1_component.priority;
103 *module = (mca_base_module_t *)&opal_pmix_s1_module;
104 return OPAL_SUCCESS;
105 }