1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 #ifndef OMPI_MCA_OSC_OSC_H
34 #define OMPI_MCA_OSC_OSC_H
35
36 #include "opal_config.h"
37
38 #include <stddef.h>
39
40 #include "ompi/mca/mca.h"
41
42 BEGIN_C_DECLS
43
44
45
46
47
48 struct ompi_win_t;
49 struct opal_info_t;
50 struct ompi_communicator_t;
51 struct ompi_group_t;
52 struct ompi_datatype_t;
53 struct ompi_op_t;
54 struct ompi_request_t;
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77 typedef int (*ompi_osc_base_component_init_fn_t)(bool enable_progress_threads,
78 bool enable_mpi_threads);
79
80
81
82
83
84
85
86
87
88
89
90
91
92 typedef int (*ompi_osc_base_component_finalize_fn_t)(void);
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115 typedef int (*ompi_osc_base_component_query_fn_t)(struct ompi_win_t *win,
116 void **base,
117 size_t size,
118 int disp_unit,
119 struct ompi_communicator_t *comm,
120 struct opal_info_t *info,
121 int flavor);
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147 typedef int (*ompi_osc_base_component_select_fn_t)(struct ompi_win_t *win,
148 void **base,
149 size_t size,
150 int disp_unit,
151 struct ompi_communicator_t *comm,
152 struct opal_info_t *info,
153 int flavor,
154 int *model);
155
156
157
158
159
160
161
162
163 struct ompi_osc_base_component_2_0_0_t {
164
165 mca_base_component_t osc_version;
166
167 mca_base_component_data_t osc_data;
168
169 ompi_osc_base_component_init_fn_t osc_init;
170
171 ompi_osc_base_component_query_fn_t osc_query;
172
173 ompi_osc_base_component_select_fn_t osc_select;
174
175 ompi_osc_base_component_finalize_fn_t osc_finalize;
176 };
177 typedef struct ompi_osc_base_component_2_0_0_t ompi_osc_base_component_2_0_0_t;
178 typedef ompi_osc_base_component_2_0_0_t ompi_osc_base_component_t;
179
180
181
182
183 typedef int (*ompi_osc_base_module_win_shared_query_fn_t)(struct ompi_win_t *win, int rank,
184 size_t *size, int *disp_unit, void *baseptr);
185
186 typedef int (*ompi_osc_base_module_win_attach_fn_t)(struct ompi_win_t *win, void *base, size_t size);
187 typedef int (*ompi_osc_base_module_win_detach_fn_t)(struct ompi_win_t *win, const void *base);
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204 typedef int (*ompi_osc_base_module_free_fn_t)(struct ompi_win_t *win);
205
206
207 typedef int (*ompi_osc_base_module_put_fn_t)(const void *origin_addr,
208 int origin_count,
209 struct ompi_datatype_t *origin_dt,
210 int target,
211 ptrdiff_t target_disp,
212 int target_count,
213 struct ompi_datatype_t *target_dt,
214 struct ompi_win_t *win);
215
216
217 typedef int (*ompi_osc_base_module_get_fn_t)(void *origin_addr,
218 int origin_count,
219 struct ompi_datatype_t *origin_dt,
220 int target,
221 ptrdiff_t target_disp,
222 int target_count,
223 struct ompi_datatype_t *target_dt,
224 struct ompi_win_t *win);
225
226
227 typedef int (*ompi_osc_base_module_accumulate_fn_t)(const void *origin_addr,
228 int origin_count,
229 struct ompi_datatype_t *origin_dt,
230 int target,
231 ptrdiff_t target_disp,
232 int target_count,
233 struct ompi_datatype_t *target_dt,
234 struct ompi_op_t *op,
235 struct ompi_win_t *win);
236
237 typedef int (*ompi_osc_base_module_compare_and_swap_fn_t)(const void *origin_addr,
238 const void *compare_addr,
239 void *result_addr,
240 struct ompi_datatype_t *dt,
241 int target,
242 ptrdiff_t target_disp,
243 struct ompi_win_t *win);
244
245 typedef int (*ompi_osc_base_module_fetch_and_op_fn_t)(const void *origin_addr,
246 void *result_addr,
247 struct ompi_datatype_t *dt,
248 int target,
249 ptrdiff_t target_disp,
250 struct ompi_op_t *op,
251 struct ompi_win_t *win);
252
253 typedef int (*ompi_osc_base_module_get_accumulate_fn_t)(const void *origin_addr,
254 int origin_count,
255 struct ompi_datatype_t *origin_datatype,
256 void *result_addr,
257 int result_count,
258 struct ompi_datatype_t *result_datatype,
259 int target_rank,
260 ptrdiff_t target_disp,
261 int target_count,
262 struct ompi_datatype_t *target_datatype,
263 struct ompi_op_t *op,
264 struct ompi_win_t *win);
265
266 typedef int (*ompi_osc_base_module_rput_fn_t)(const void *origin_addr,
267 int origin_count,
268 struct ompi_datatype_t *origin_dt,
269 int target,
270 ptrdiff_t target_disp,
271 int target_count,
272 struct ompi_datatype_t *target_dt,
273 struct ompi_win_t *win,
274 struct ompi_request_t **request);
275
276 typedef int (*ompi_osc_base_module_rget_fn_t)(void *origin_addr,
277 int origin_count,
278 struct ompi_datatype_t *origin_dt,
279 int target,
280 ptrdiff_t target_disp,
281 int target_count,
282 struct ompi_datatype_t *target_dt,
283 struct ompi_win_t *win,
284 struct ompi_request_t **request);
285
286
287 typedef int (*ompi_osc_base_module_raccumulate_fn_t)(const void *origin_addr,
288 int origin_count,
289 struct ompi_datatype_t *origin_dt,
290 int target,
291 ptrdiff_t target_disp,
292 int target_count,
293 struct ompi_datatype_t *target_dt,
294 struct ompi_op_t *op,
295 struct ompi_win_t *win,
296 struct ompi_request_t **request);
297
298 typedef int (*ompi_osc_base_module_rget_accumulate_fn_t)(const void *origin_addr,
299 int origin_count,
300 struct ompi_datatype_t *origin_datatype,
301 void *result_addr,
302 int result_count,
303 struct ompi_datatype_t *result_datatype,
304 int target_rank,
305 ptrdiff_t target_disp,
306 int target_count,
307 struct ompi_datatype_t *target_datatype,
308 struct ompi_op_t *op,
309 struct ompi_win_t *win,
310 struct ompi_request_t **request);
311
312 typedef int (*ompi_osc_base_module_fence_fn_t)(int assert, struct ompi_win_t *win);
313
314
315 typedef int (*ompi_osc_base_module_start_fn_t)(struct ompi_group_t *group,
316 int assert,
317 struct ompi_win_t *win);
318
319
320 typedef int (*ompi_osc_base_module_complete_fn_t)(struct ompi_win_t *win);
321
322
323 typedef int (*ompi_osc_base_module_post_fn_t)(struct ompi_group_t *group,
324 int assert,
325 struct ompi_win_t *win);
326
327
328 typedef int (*ompi_osc_base_module_wait_fn_t)(struct ompi_win_t *win);
329
330
331 typedef int (*ompi_osc_base_module_test_fn_t)(struct ompi_win_t *win,
332 int *flag);
333
334
335 typedef int (*ompi_osc_base_module_lock_fn_t)(int lock_type,
336 int target,
337 int assert,
338 struct ompi_win_t *win);
339
340 typedef int (*ompi_osc_base_module_unlock_fn_t)(int target,
341 struct ompi_win_t *win);
342
343 typedef int (*ompi_osc_base_module_lock_all_fn_t)(int assert,
344 struct ompi_win_t *win);
345
346 typedef int (*ompi_osc_base_module_unlock_all_fn_t)(struct ompi_win_t *win);
347
348 typedef int (*ompi_osc_base_module_sync_fn_t)(struct ompi_win_t *win);
349 typedef int (*ompi_osc_base_module_flush_fn_t)(int target,
350 struct ompi_win_t *win);
351 typedef int (*ompi_osc_base_module_flush_all_fn_t)(struct ompi_win_t *win);
352 typedef int (*ompi_osc_base_module_flush_local_fn_t)(int target,
353 struct ompi_win_t *win);
354 typedef int (*ompi_osc_base_module_flush_local_all_fn_t)(struct ompi_win_t *win);
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370 struct ompi_osc_base_module_3_0_0_t {
371 ompi_osc_base_module_win_shared_query_fn_t osc_win_shared_query;
372
373 ompi_osc_base_module_win_attach_fn_t osc_win_attach;
374 ompi_osc_base_module_win_detach_fn_t osc_win_detach;
375 ompi_osc_base_module_free_fn_t osc_free;
376
377 ompi_osc_base_module_put_fn_t osc_put;
378 ompi_osc_base_module_get_fn_t osc_get;
379 ompi_osc_base_module_accumulate_fn_t osc_accumulate;
380 ompi_osc_base_module_compare_and_swap_fn_t osc_compare_and_swap;
381 ompi_osc_base_module_fetch_and_op_fn_t osc_fetch_and_op;
382 ompi_osc_base_module_get_accumulate_fn_t osc_get_accumulate;
383
384 ompi_osc_base_module_rput_fn_t osc_rput;
385 ompi_osc_base_module_rget_fn_t osc_rget;
386 ompi_osc_base_module_raccumulate_fn_t osc_raccumulate;
387 ompi_osc_base_module_rget_accumulate_fn_t osc_rget_accumulate;
388
389 ompi_osc_base_module_fence_fn_t osc_fence;
390
391 ompi_osc_base_module_start_fn_t osc_start;
392 ompi_osc_base_module_complete_fn_t osc_complete;
393 ompi_osc_base_module_post_fn_t osc_post;
394 ompi_osc_base_module_wait_fn_t osc_wait;
395 ompi_osc_base_module_test_fn_t osc_test;
396
397 ompi_osc_base_module_lock_fn_t osc_lock;
398 ompi_osc_base_module_unlock_fn_t osc_unlock;
399 ompi_osc_base_module_lock_all_fn_t osc_lock_all;
400 ompi_osc_base_module_unlock_all_fn_t osc_unlock_all;
401
402 ompi_osc_base_module_sync_fn_t osc_sync;
403 ompi_osc_base_module_flush_fn_t osc_flush;
404 ompi_osc_base_module_flush_all_fn_t osc_flush_all;
405 ompi_osc_base_module_flush_local_fn_t osc_flush_local;
406 ompi_osc_base_module_flush_local_all_fn_t osc_flush_local_all;
407 };
408 typedef struct ompi_osc_base_module_3_0_0_t ompi_osc_base_module_3_0_0_t;
409 typedef ompi_osc_base_module_3_0_0_t ompi_osc_base_module_t;
410
411
412
413
414
415
416 #define OMPI_OSC_BASE_VERSION_3_0_0 \
417 OMPI_MCA_BASE_VERSION_2_1_0("osc", 3, 0, 0)
418
419
420
421
422
423 END_C_DECLS
424
425
426 #endif