This source file includes following definitions.
- _mxm_register
- _mxm_open
1
2
3
4
5
6
7
8
9
10
11
12
13
14 #include "oshmem_config.h"
15
16 #include "oshmem/constants.h"
17 #include "oshmem/mca/atomic/atomic.h"
18 #include "oshmem/mca/atomic/base/base.h"
19 #include "oshmem/mca/spml/base/base.h"
20
21 #include "atomic_mxm.h"
22
23
24
25
26
27 const char *mca_atomic_mxm_component_version_string =
28 "Open SHMEM mxm atomic MCA component version " OSHMEM_VERSION;
29
30
31
32
33 mca_spml_ikrit_t *mca_atomic_mxm_spml_self = NULL;
34
35
36
37
38 static int _mxm_register(void);
39 static int _mxm_open(void);
40
41
42
43
44
45
46 mca_atomic_base_component_t mca_atomic_mxm_component = {
47
48
49
50
51 .atomic_version = {
52 MCA_ATOMIC_BASE_VERSION_2_0_0,
53
54
55 .mca_component_name = "mxm",
56 MCA_BASE_MAKE_VERSION(component, OSHMEM_MAJOR_VERSION, OSHMEM_MINOR_VERSION,
57 OSHMEM_RELEASE_VERSION),
58
59 .mca_open_component = _mxm_open,
60 .mca_register_component_params = _mxm_register,
61 },
62 .atomic_data = {
63
64 MCA_BASE_METADATA_PARAM_CHECKPOINT
65 },
66
67
68
69 .atomic_startup = mca_atomic_mxm_startup,
70 .atomic_finalize = mca_atomic_mxm_finalize,
71 .atomic_query = mca_atomic_mxm_query,
72 };
73
74 static int _mxm_register(void)
75 {
76 mca_atomic_mxm_component.priority = 100;
77 mca_base_component_var_register (&mca_atomic_mxm_component.atomic_version,
78 "priority", "Priority of the atomic:mxm "
79 "component (default: 100)", MCA_BASE_VAR_TYPE_INT,
80 NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
81 OPAL_INFO_LVL_3,
82 MCA_BASE_VAR_SCOPE_ALL_EQ,
83 &mca_atomic_mxm_component.priority);
84
85 return OSHMEM_SUCCESS;
86 }
87
88 static int _mxm_open(void)
89 {
90
91
92
93
94 if (strcmp(mca_spml_base_selected_component.spmlm_version.mca_component_name, "ikrit")) {
95 ATOMIC_VERBOSE(5,
96 "Can not use atomic/mxm because spml ikrit component disabled");
97 return OSHMEM_ERR_NOT_AVAILABLE;
98 }
99 mca_atomic_mxm_spml_self = (mca_spml_ikrit_t *) mca_spml.self;
100
101 return OSHMEM_SUCCESS;
102 }
103
104 OBJ_CLASS_INSTANCE(mca_atomic_mxm_module_t,
105 mca_atomic_base_module_t,
106 NULL,
107 NULL);