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 #ifndef MCA_IO_H
28 #define MCA_IO_H
29
30 #include "mpi.h"
31 #include "ompi/mca/mca.h"
32 #include "ompi/request/request.h"
33 #include "ompi/info/info.h"
34
35
36
37
38 struct ompi_file_t;
39 struct mca_io_base_file_t;
40 struct mca_io_base_delete_t;
41
42
43
44
45
46 struct mca_io_base_module_2_0_0_t;
47 union mca_io_base_modules_t;
48
49
50
51
52
53
54
55
56
57
58
59
60 enum mca_io_base_version_t {
61 MCA_IO_BASE_V_NONE,
62 MCA_IO_BASE_V_2_0_0,
63
64 MCA_IO_BASE_V_MAX
65 };
66
67
68
69 typedef enum mca_io_base_version_t mca_io_base_version_t;
70
71
72
73
74
75
76 #define MCA_IO_BASE_VERSION_2_0_0 \
77 OMPI_MCA_BASE_VERSION_2_1_0("io", 2, 0, 0)
78
79
80
81
82
83 struct mca_io_base_module_2_0_0_t;
84 typedef int (*mca_io_base_component_init_query_fn_t)
85 (bool enable_progress_threads, bool enable_mpi_threads);
86 typedef const struct mca_io_base_module_2_0_0_t *
87 (*mca_io_base_component_file_query_2_0_0_fn_t)
88 (struct ompi_file_t *file, struct mca_io_base_file_t **private_data,
89 int *priority);
90 typedef int (*mca_io_base_component_file_unquery_fn_t)
91 (struct ompi_file_t *file, struct mca_io_base_file_t *private_data);
92
93 typedef int (*mca_io_base_component_file_delete_query_fn_t)
94 (const char *filename, struct opal_info_t *info,
95 struct mca_io_base_delete_t **private_data,
96 bool *usable, int *priority);
97 typedef int (*mca_io_base_component_file_delete_select_fn_t)
98 (const char *filename, struct opal_info_t *info,
99 struct mca_io_base_delete_t *private_data);
100 typedef int (*mca_io_base_component_file_delete_unselect_fn_t)
101 (const char *filename, struct opal_info_t *info,
102 struct mca_io_base_delete_t *private_data);
103
104 typedef int (*mca_io_base_component_register_datarep_fn_t)(
105 const char *,
106 MPI_Datarep_conversion_function*,
107 MPI_Datarep_conversion_function*,
108 MPI_Datarep_extent_function*,
109 void*);
110
111
112
113 struct mca_io_base_component_2_0_0_t {
114 mca_base_component_t io_version;
115 mca_base_component_data_t io_data;
116
117 mca_io_base_component_init_query_fn_t io_init_query;
118 mca_io_base_component_file_query_2_0_0_fn_t io_file_query;
119 mca_io_base_component_file_unquery_fn_t io_file_unquery;
120
121 mca_io_base_component_file_delete_query_fn_t io_delete_query;
122 mca_io_base_component_file_delete_unselect_fn_t io_delete_unquery;
123 mca_io_base_component_file_delete_select_fn_t io_delete_select;
124
125 mca_io_base_component_register_datarep_fn_t io_register_datarep;
126 };
127 typedef struct mca_io_base_component_2_0_0_t mca_io_base_component_2_0_0_t;
128
129
130
131
132
133 union mca_io_base_components_t {
134 mca_io_base_component_2_0_0_t v2_0_0;
135 };
136 typedef union mca_io_base_components_t mca_io_base_components_t;
137
138
139
140
141
142
143 typedef int (*mca_io_base_module_file_open_fn_t)
144 (struct ompi_communicator_t *comm, const char *filename, int amode,
145 struct opal_info_t *info, struct ompi_file_t *fh);
146 typedef int (*mca_io_base_module_file_close_fn_t)(struct ompi_file_t *fh);
147
148 typedef int (*mca_io_base_module_file_set_size_fn_t)
149 (struct ompi_file_t *fh, MPI_Offset size);
150 typedef int (*mca_io_base_module_file_preallocate_fn_t)
151 (struct ompi_file_t *fh, MPI_Offset size);
152 typedef int (*mca_io_base_module_file_get_size_fn_t)
153 (struct ompi_file_t *fh, MPI_Offset *size);
154 typedef int (*mca_io_base_module_file_get_amode_fn_t)
155 (struct ompi_file_t *fh, int *amode);
156
157 typedef int (*mca_io_base_module_file_set_view_fn_t)
158 (struct ompi_file_t *fh, MPI_Offset disp, struct ompi_datatype_t *etype,
159 struct ompi_datatype_t *filetype, const char *datarep,
160 struct opal_info_t *info);
161 typedef int (*mca_io_base_module_file_get_view_fn_t)
162 (struct ompi_file_t *fh, MPI_Offset *disp,
163 struct ompi_datatype_t **etype, struct ompi_datatype_t **filetype,
164 char *datarep);
165
166 typedef int (*mca_io_base_module_file_read_at_fn_t)
167 (struct ompi_file_t *fh, MPI_Offset offset, void *buf,
168 int count, struct ompi_datatype_t *datatype,
169 struct ompi_status_public_t *status);
170 typedef int (*mca_io_base_module_file_read_at_all_fn_t)
171 (struct ompi_file_t *fh, MPI_Offset offset, void *buf,
172 int count, struct ompi_datatype_t *datatype,
173 struct ompi_status_public_t *status);
174 typedef int (*mca_io_base_module_file_write_at_fn_t)
175 (struct ompi_file_t *fh, MPI_Offset offset, const void *buf,
176 int count, struct ompi_datatype_t *datatype,
177 struct ompi_status_public_t *status);
178 typedef int (*mca_io_base_module_file_write_at_all_fn_t)
179 (struct ompi_file_t *fh, MPI_Offset offset, const void *buf,
180 int count, struct ompi_datatype_t *datatype,
181 struct ompi_status_public_t *status);
182
183 typedef int (*mca_io_base_module_file_iread_at_fn_t)
184 (struct ompi_file_t *fh, MPI_Offset offset, void *buf,
185 int count, struct ompi_datatype_t *datatype,
186 struct ompi_request_t **request);
187 typedef int (*mca_io_base_module_file_iwrite_at_fn_t)
188 (struct ompi_file_t *fh, MPI_Offset offset, const void *buf,
189 int count, struct ompi_datatype_t *datatype,
190 struct ompi_request_t **request);
191
192 typedef int (*mca_io_base_module_file_iread_at_all_fn_t)
193 (struct ompi_file_t *fh, MPI_Offset offset, void *buf,
194 int count, struct ompi_datatype_t *datatype,
195 struct ompi_request_t **request);
196 typedef int (*mca_io_base_module_file_iwrite_at_all_fn_t)
197 (struct ompi_file_t *fh, MPI_Offset offset, const void *buf,
198 int count, struct ompi_datatype_t *datatype,
199 struct ompi_request_t **request);
200
201 typedef int (*mca_io_base_module_file_read_fn_t)
202 (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t *
203 datatype, struct ompi_status_public_t *status);
204 typedef int (*mca_io_base_module_file_read_all_fn_t)
205 (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t *
206 datatype, struct ompi_status_public_t *status);
207 typedef int (*mca_io_base_module_file_write_fn_t)
208 (struct ompi_file_t *fh, const void *buf, int count, struct ompi_datatype_t *
209 datatype, struct ompi_status_public_t *status);
210 typedef int (*mca_io_base_module_file_write_all_fn_t)
211 (struct ompi_file_t *fh, const void *buf, int count, struct ompi_datatype_t *
212 datatype, struct ompi_status_public_t *status);
213
214 typedef int (*mca_io_base_module_file_iread_fn_t)
215 (struct ompi_file_t *fh, void *buf, int count,
216 struct ompi_datatype_t *datatype, struct ompi_request_t **request);
217 typedef int (*mca_io_base_module_file_iwrite_fn_t)
218 (struct ompi_file_t *fh, const void *buf, int count,
219 struct ompi_datatype_t *datatype, struct ompi_request_t **request);
220
221 typedef int (*mca_io_base_module_file_iread_all_fn_t)
222 (struct ompi_file_t *fh, void *buf, int count,
223 struct ompi_datatype_t *datatype, struct ompi_request_t **request);
224 typedef int (*mca_io_base_module_file_iwrite_all_fn_t)
225 (struct ompi_file_t *fh, const void *buf, int count,
226 struct ompi_datatype_t *datatype, struct ompi_request_t **request);
227
228 typedef int (*mca_io_base_module_file_seek_fn_t)
229 (struct ompi_file_t *fh, MPI_Offset offset, int whence);
230 typedef int (*mca_io_base_module_file_get_position_fn_t)
231 (struct ompi_file_t *fh, MPI_Offset *offset);
232 typedef int (*mca_io_base_module_file_get_byte_offset_fn_t)
233 (struct ompi_file_t *fh, MPI_Offset offset, MPI_Offset *disp);
234
235 typedef int (*mca_io_base_module_file_read_shared_fn_t)
236 (struct ompi_file_t *fh, void *buf, int count,
237 struct ompi_datatype_t *datatype, struct ompi_status_public_t *status);
238 typedef int (*mca_io_base_module_file_write_shared_fn_t)
239 (struct ompi_file_t *fh, const void *buf, int count,
240 struct ompi_datatype_t *datatype, struct ompi_status_public_t *status);
241 typedef int (*mca_io_base_module_file_iread_shared_fn_t)
242 (struct ompi_file_t *fh, void *buf, int count,
243 struct ompi_datatype_t *datatype, struct ompi_request_t **request);
244 typedef int (*mca_io_base_module_file_iwrite_shared_fn_t)
245 (struct ompi_file_t *fh, const void *buf, int count,
246 struct ompi_datatype_t *datatype, struct ompi_request_t **request);
247 typedef int (*mca_io_base_module_file_read_ordered_fn_t)
248 (struct ompi_file_t *fh, void *buf, int count,
249 struct ompi_datatype_t *datatype, struct ompi_status_public_t *status);
250 typedef int (*mca_io_base_module_file_write_ordered_fn_t)
251 (struct ompi_file_t *fh, const void *buf, int count,
252 struct ompi_datatype_t *datatype, struct ompi_status_public_t *status);
253 typedef int (*mca_io_base_module_file_seek_shared_fn_t)
254 (struct ompi_file_t *fh, MPI_Offset offset, int whence);
255 typedef int (*mca_io_base_module_file_get_position_shared_fn_t)
256 (struct ompi_file_t *fh, MPI_Offset *offset);
257
258 typedef int (*mca_io_base_module_file_read_at_all_begin_fn_t)
259 (struct ompi_file_t *fh, MPI_Offset offset, void *buf,
260 int count, struct ompi_datatype_t *datatype);
261 typedef int (*mca_io_base_module_file_read_at_all_end_fn_t)
262 (struct ompi_file_t *fh, void *buf, struct ompi_status_public_t *status);
263 typedef int (*mca_io_base_module_file_write_at_all_begin_fn_t)
264 (struct ompi_file_t *fh, MPI_Offset offset, const void *buf,
265 int count, struct ompi_datatype_t *datatype);
266 typedef int (*mca_io_base_module_file_write_at_all_end_fn_t)
267 (struct ompi_file_t *fh, const void *buf, struct ompi_status_public_t *status);
268 typedef int (*mca_io_base_module_file_read_all_begin_fn_t)
269 (struct ompi_file_t *fh, void *buf, int count,
270 struct ompi_datatype_t *datatype);
271 typedef int (*mca_io_base_module_file_read_all_end_fn_t)
272 (struct ompi_file_t *fh, void *buf, struct ompi_status_public_t *status);
273 typedef int (*mca_io_base_module_file_write_all_begin_fn_t)
274 (struct ompi_file_t *fh, const void *buf, int count,
275 struct ompi_datatype_t *datatype);
276 typedef int (*mca_io_base_module_file_write_all_end_fn_t)
277 (struct ompi_file_t *fh, const void *buf, struct ompi_status_public_t *status);
278 typedef int (*mca_io_base_module_file_read_ordered_begin_fn_t)
279 (struct ompi_file_t *fh, void *buf, int count,
280 struct ompi_datatype_t *datatype);
281 typedef int (*mca_io_base_module_file_read_ordered_end_fn_t)
282 (struct ompi_file_t *fh, void *buf, struct ompi_status_public_t *status);
283 typedef int (*mca_io_base_module_file_write_ordered_begin_fn_t)
284 (struct ompi_file_t *fh, const void *buf, int count,
285 struct ompi_datatype_t *datatype);
286 typedef int (*mca_io_base_module_file_write_ordered_end_fn_t)
287 (struct ompi_file_t *fh, const void *buf, struct ompi_status_public_t *status);
288
289 typedef int (*mca_io_base_module_file_get_type_extent_fn_t)
290 (struct ompi_file_t *fh, struct ompi_datatype_t *datatype,
291 MPI_Aint *extent);
292
293 typedef int (*mca_io_base_module_file_set_atomicity_fn_t)
294 (struct ompi_file_t *fh, int flag);
295 typedef int (*mca_io_base_module_file_get_atomicity_fn_t)
296 (struct ompi_file_t *fh, int *flag);
297 typedef int (*mca_io_base_module_file_sync_fn_t)(struct ompi_file_t *fh);
298
299 struct mca_io_base_module_2_0_0_t {
300
301
302
303 mca_io_base_module_file_open_fn_t io_module_file_open;
304 mca_io_base_module_file_close_fn_t io_module_file_close;
305
306 mca_io_base_module_file_set_size_fn_t io_module_file_set_size;
307 mca_io_base_module_file_preallocate_fn_t io_module_file_preallocate;
308 mca_io_base_module_file_get_size_fn_t io_module_file_get_size;
309 mca_io_base_module_file_get_amode_fn_t io_module_file_get_amode;
310
311 mca_io_base_module_file_set_view_fn_t io_module_file_set_view;
312 mca_io_base_module_file_get_view_fn_t io_module_file_get_view;
313
314 mca_io_base_module_file_read_at_fn_t io_module_file_read_at;
315 mca_io_base_module_file_read_at_all_fn_t io_module_file_read_at_all;
316 mca_io_base_module_file_write_at_fn_t io_module_file_write_at;
317 mca_io_base_module_file_write_at_all_fn_t io_module_file_write_at_all;
318
319 mca_io_base_module_file_iread_at_fn_t io_module_file_iread_at;
320 mca_io_base_module_file_iwrite_at_fn_t io_module_file_iwrite_at;
321 mca_io_base_module_file_iread_at_all_fn_t io_module_file_iread_at_all;
322 mca_io_base_module_file_iwrite_at_all_fn_t io_module_file_iwrite_at_all;
323
324 mca_io_base_module_file_read_fn_t io_module_file_read;
325 mca_io_base_module_file_read_all_fn_t io_module_file_read_all;
326 mca_io_base_module_file_write_fn_t io_module_file_write;
327 mca_io_base_module_file_write_all_fn_t io_module_file_write_all;
328
329 mca_io_base_module_file_iread_fn_t io_module_file_iread;
330 mca_io_base_module_file_iwrite_fn_t io_module_file_iwrite;
331 mca_io_base_module_file_iread_all_fn_t io_module_file_iread_all;
332 mca_io_base_module_file_iwrite_all_fn_t io_module_file_iwrite_all;
333
334 mca_io_base_module_file_seek_fn_t io_module_file_seek;
335 mca_io_base_module_file_get_position_fn_t io_module_file_get_position;
336 mca_io_base_module_file_get_byte_offset_fn_t io_module_file_get_byte_offset;
337
338 mca_io_base_module_file_read_shared_fn_t io_module_file_read_shared;
339 mca_io_base_module_file_write_shared_fn_t io_module_file_write_shared;
340 mca_io_base_module_file_iread_shared_fn_t io_module_file_iread_shared;
341 mca_io_base_module_file_iwrite_shared_fn_t io_module_file_iwrite_shared;
342 mca_io_base_module_file_read_ordered_fn_t io_module_file_read_ordered;
343 mca_io_base_module_file_write_ordered_fn_t io_module_file_write_ordered;
344 mca_io_base_module_file_seek_shared_fn_t io_module_file_seek_shared;
345 mca_io_base_module_file_get_position_shared_fn_t io_module_file_get_position_shared;
346
347 mca_io_base_module_file_read_at_all_begin_fn_t io_module_file_read_at_all_begin;
348 mca_io_base_module_file_read_at_all_end_fn_t io_module_file_read_at_all_end;
349 mca_io_base_module_file_write_at_all_begin_fn_t io_module_file_write_at_all_begin;
350 mca_io_base_module_file_write_at_all_end_fn_t io_module_file_write_at_all_end;
351 mca_io_base_module_file_read_all_begin_fn_t io_module_file_read_all_begin;
352 mca_io_base_module_file_read_all_end_fn_t io_module_file_read_all_end;
353 mca_io_base_module_file_write_all_begin_fn_t io_module_file_write_all_begin;
354 mca_io_base_module_file_write_all_end_fn_t io_module_file_write_all_end;
355 mca_io_base_module_file_read_ordered_begin_fn_t io_module_file_read_ordered_begin;
356 mca_io_base_module_file_read_ordered_end_fn_t io_module_file_read_ordered_end;
357 mca_io_base_module_file_write_ordered_begin_fn_t io_module_file_write_ordered_begin;
358 mca_io_base_module_file_write_ordered_end_fn_t io_module_file_write_ordered_end;
359
360 mca_io_base_module_file_get_type_extent_fn_t io_module_file_get_type_extent;
361
362 mca_io_base_module_file_set_atomicity_fn_t io_module_file_set_atomicity;
363 mca_io_base_module_file_get_atomicity_fn_t io_module_file_get_atomicity;
364 mca_io_base_module_file_sync_fn_t io_module_file_sync;
365 };
366 typedef struct mca_io_base_module_2_0_0_t mca_io_base_module_2_0_0_t;
367
368
369
370
371
372 union mca_io_base_modules_t {
373 mca_io_base_module_2_0_0_t v2_0_0;
374 };
375 typedef union mca_io_base_modules_t mca_io_base_modules_t;
376
377 #endif