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