OpenMPI  0.1.1
io_ompio.h
1 /* -*- Mode: C; c-basic-offset:4 ; -*- */
2 /*
3  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
4  * University Research and Technology
5  * Corporation. All rights reserved.
6  * Copyright (c) 2004-2007 The University of Tennessee and The University
7  * of Tennessee Research Foundation. All rights
8  * reserved.
9  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
10  * University of Stuttgart. All rights reserved.
11  * Copyright (c) 2004-2005 The Regents of the University of California.
12  * All rights reserved.
13  * Copyright (c) 2008-2011 University of Houston. All rights reserved.
14  * $COPYRIGHT$
15  *
16  * Additional copyrights may follow
17  *
18  * $HEADER$
19  */
20 
21 #ifndef MCA_IO_OMPIO_H
22 #define MCA_IO_OMPIO_H
23 
24 #include <fcntl.h>
25 
26 #include "mpi.h"
27 #include "opal/class/opal_list.h"
29 #include "opal/threads/mutex.h"
30 #include "ompi/file/file.h"
31 #include "ompi/mca/io/io.h"
32 #include "ompi/mca/fs/fs.h"
33 #include "ompi/mca/fcoll/fcoll.h"
34 #include "ompi/mca/fbtl/fbtl.h"
35 #include "ompi/mca/sharedfp/sharedfp.h"
36 #include "ompi/mca/fcache/fcache.h"
37 #include "ompi/communicator/communicator.h"
38 #include "ompi/info/info.h"
39 #include "opal/datatype/opal_convertor.h"
40 #include "ompi/datatype/ompi_datatype.h"
41 #include "ompi/request/request.h"
42 
43 extern int mca_io_ompio_cycle_buffer_size;
44 extern int mca_io_ompio_bytes_per_agg;
45 
46 /*
47  * Flags
48  */
49 #define OMPIO_CONTIGUOUS_MEMORY 0x00000001
50 #define OMPIO_UNIFORM_FVIEW 0x00000002
51 #define OMPIO_FILE_IS_OPEN 0x00000004
52 #define OMPIO_FILE_VIEW_IS_SET 0x00000008
53 #define OMPIO_CONTIGUOUS_FVIEW 0x00000010
54 #define OMPIO_AGGREGATOR_IS_SET 0x00000020
55 
56 #define OMPIO_MIN(a, b) (((a) < (b)) ? (a) : (b))
57 #define OMPIO_MAX(a, b) (((a) < (b)) ? (b) : (a))
58 
59 /*
60  * General values
61  */
62 #define OMPIO_PREALLOC_MAX_BUF_SIZE 33554432
63 #define OMPIO_PERM_NULL -1
64 #define OMPIO_IOVEC_INITIAL_SIZE 100
65 #define OMPIO_ROOT 0
66 #define OMPIO_MAX_NAME 100
67 #define OMPIO_TAG_GATHER -100
68 #define OMPIO_TAG_GATHERV -101
69 #define OMPIO_TAG_BCAST -102
70 #define OMPIO_TAG_SCATTERV -103
71 
72 /* ACCESS MODES --- not needed.. just use MPI_MODE_... */
73 #define OMPIO_MODE_CREATE 1
74 #define OMPIO_MODE_RDONLY 2
75 #define OMPIO_MODE_WRONLY 4
76 #define OMPIO_MODE_RDWR 8
77 #define OMPIO_MODE_DELETE_ON_CLOSE 16
78 #define OMPIO_MODE_UNIQUE_OPEN 32
79 #define OMPIO_MODE_EXCL 64
80 #define OMPIO_MODE_APPEND 128
81 #define OMPIO_MODE_SEQUENTIAL 256
82 
83 BEGIN_C_DECLS
84 
85 enum ompio_fs_type
86 {
87  NONE = 0,
88  UFS = 1,
89  PVFS2 = 2,
90  LUSTRE = 3
91 };
92 
93 OMPI_DECLSPEC extern mca_io_base_component_2_0_0_t mca_io_ompio_component;
94 /*
95  * global variables, instantiated in module.c
96  */
97 extern opal_mutex_t mca_io_ompio_mutex;
98 extern mca_io_base_module_2_0_0_t mca_io_ompio_module;
99 OMPI_DECLSPEC extern mca_io_base_component_2_0_0_t mca_io_ompio_component;
100 
101 typedef struct mca_io_ompio_io_array_t {
102  void *memory_address;
103  /* we need that of type OMPI_MPI_OFFSET_TYPE */
104  void *offset;
105  size_t length;
106  /*mca_io_ompio_server_t io_server;*/
108 
109 
111  OMPI_MPI_OFFSET_TYPE *offsets;
112  int *lens;
113  MPI_Aint *mem_ptrs;
114  int count;
116 
117 
118 /**
119  * Back-end structure for MPI_File
120  */
122  /* General parameters */
123  int fd;
124  OMPI_MPI_OFFSET_TYPE f_offset; /* byte offset of current position */
125  OMPI_MPI_OFFSET_TYPE f_disp; /* file_view displacement */
126  int f_rank;
127  int f_size;
128  int f_amode;
129  int f_perm;
130  ompi_communicator_t *f_comm;
131  char *f_filename;
132  char *f_datarep;
133  opal_convertor_t *f_convertor;
134  ompi_info_t *f_info;
135  int32_t f_flags;
136  void *f_fs_ptr;
137  int f_atomicity;
138  size_t f_stripe_size;
139  size_t f_cc_size;
140  int f_bytes_per_agg;
141  enum ompio_fs_type f_fstype;
142 
143  /* process grouping parameters */
144  int *f_procs_in_group;
145  int f_procs_per_group;
146  int f_aggregator_index;
147 
148  /* File View parameters */
149  struct iovec *f_decoded_iov;
150  uint32_t f_iov_count;
151  ompi_datatype_t *f_iov_type;
152  size_t f_position_in_file_view; /* in bytes */
153  size_t f_total_bytes; /* total bytes read/written within 1 Fview*/
154  int f_index_in_file_view;
155  OPAL_PTRDIFF_TYPE f_view_extent;
156  size_t f_view_size;
157  ompi_datatype_t *f_etype;
158  ompi_datatype_t *f_filetype;
159  size_t f_etype_size;
160 
161  /* contains IO requests that needs to be read/written */
162  mca_io_ompio_io_array_t *f_io_array;
163  int f_num_of_io_entries;
164 
165  /* Hooks for modules to hang things */
166  mca_base_component_t *f_fs_component;
167  mca_base_component_t *f_fcoll_component;
168  mca_base_component_t *f_fcache_component;
169  mca_base_component_t *f_fbtl_component;
170  mca_base_component_t *f_sharedfp_component;
171 
172  /* structure of function pointers */
173  mca_fs_base_module_t *f_fs;
174  mca_fcoll_base_module_t *f_fcoll;
175  mca_fcache_base_module_t *f_fcache;
176  mca_fbtl_base_module_t *f_fbtl;
177  mca_sharedfp_base_module_t *f_sharedfp;
178 
179  /* No Error handling done yet
180  struct ompi_errhandler_t *error_handler;
181  ompi_errhandler_type_t errhandler_type;
182  */
183 };
185 
187  mca_io_ompio_file_t ompio_fh;
188 };
190 
191 OMPI_DECLSPEC int ompi_io_ompio_set_file_defaults (mca_io_ompio_file_t *fh);
192 
193 /*
194  * Function that takes in a datatype and buffer, and decodes that datatype
195  * into an iovec using the convertor_raw function
196  */
197 OMPI_DECLSPEC int ompi_io_ompio_decode_datatype (mca_io_ompio_file_t *fh,
198  struct ompi_datatype_t *datatype,
199  int count,
200  void *buf,
201  size_t *max_data,
202  struct iovec **iov,
203  uint32_t *iov_count);
204 
205 /*
206  * Function that sorts an io_array according to the offset by filling
207  * up an array of the indices into the array (HEAP SORT)
208  */
209 OMPI_DECLSPEC int ompi_io_ompio_sort (mca_io_ompio_io_array_t *io_array,
210  int num_entries,
211  int *sorted);
212 
213 OMPI_DECLSPEC int ompi_io_ompio_sort_iovec (struct iovec *iov,
214  int num_entries,
215  int *sorted);
216 
217 OMPI_DECLSPEC int ompi_io_ompio_set_explicit_offset (mca_io_ompio_file_t *fh,
218  OMPI_MPI_OFFSET_TYPE offset);
219 
220 OMPI_DECLSPEC int ompi_io_ompio_generate_current_file_view (mca_io_ompio_file_t *fh,
221  size_t max_data,
222  struct iovec **f_iov,
223  int *iov_count);
224 
225 OMPI_DECLSPEC int ompi_io_ompio_generate_groups (mca_io_ompio_file_t *fh,
226  int num_aggregators,
227  int *root,
228  int *procs_per_group,
229  int **ranks);
230 OMPI_DECLSPEC int ompi_io_ompio_set_aggregator_props (mca_io_ompio_file_t *fh,
231  int num_aggregators,
232  size_t bytes_per_proc);
233 
234 
235 OMPI_DECLSPEC int ompi_io_ompio_calc_aggregator (mca_io_ompio_file_t *fh,
236  OMPI_MPI_OFFSET_TYPE off,
237  OMPI_MPI_OFFSET_TYPE min_off,
238  OMPI_MPI_OFFSET_TYPE *len,
239  OMPI_MPI_OFFSET_TYPE fd_size,
240  OMPI_MPI_OFFSET_TYPE *fd_start,
241  OMPI_MPI_OFFSET_TYPE *fd_end,
242  int striping_unit,
243  int num_aggregators,
244  int *aggregator_list);
245 
246 
247 OMPI_DECLSPEC int ompi_io_ompio_calc_my_requests (mca_io_ompio_file_t *fh,
248  struct iovec *offset_len,
249  int contig_access_count,
250  OMPI_MPI_OFFSET_TYPE min_st_offset,
251  OMPI_MPI_OFFSET_TYPE *fd_start,
252  OMPI_MPI_OFFSET_TYPE *fd_end,
253  OMPI_MPI_OFFSET_TYPE fd_size,
254  int *count_my_req_procs_ptr,
255  int **count_my_req_per_proc_ptr,
256  mca_io_ompio_access_array_t **my_reqs,
257  int **buf_indices,
258  int striping_unit,
259  int num_aggregators,
260  int *aggregator_list);
261 
262 
263 
264 
265 OMPI_DECLSPEC int ompi_io_ompio_calc_others_requests ( mca_io_ompio_file_t *fh,
266  int count_my_req_procs,
267  int *count_my_req_per_proc,
269  int *count_othres_req_procs_ptr,
270  mca_io_ompio_access_array_t **others_req_ptr);
271 
272 
273 OMPI_DECLSPEC int ompi_io_ompio_break_file_view (mca_io_ompio_file_t *fh,
274  struct iovec *iov,
275  int count,
276  int num_aggregators,
277  size_t stripe_size,
278  struct iovec **broken_iov,
279  int *broken_count);
280 
281 OMPI_DECLSPEC int ompi_io_ompio_distribute_file_view (mca_io_ompio_file_t *fh,
282  struct iovec *broken_iov,
283  int broken_count,
284  int num_aggregators,
285  size_t stripe_size,
286  int **fview_count,
287  struct iovec **iov,
288  int *count);
289 
290 OMPI_DECLSPEC int ompi_io_ompio_gather_data (mca_io_ompio_file_t *fh,
291  void *send_buf,
292  size_t total_bytes_sent,
293  int *bytes_sent,
294  struct iovec *broken_iovec,
295  int broken_index,
296  size_t partial,
297  void *global_buf,
298  int *bytes_per_process,
299  int *displs,
300  int num_aggregators,
301  size_t stripe_size);
302 
303 OMPI_DECLSPEC int ompi_io_ompio_scatter_data (mca_io_ompio_file_t *fh,
304  void *receive_buf,
305  size_t total_bytes_recv,
306  int *bytes_received,
307  struct iovec *broken_iovec,
308  int broken_index,
309  size_t partial,
310  void *global_buf,
311  int *bytes_per_process,
312  int *displs,
313  int num_aggregators,
314  size_t stripe_size);
315 
316 OMPI_DECLSPEC int ompi_io_ompio_send_data (mca_io_ompio_file_t *fh,
317  void *send_buf,
318  size_t total_bytes_sent,
319  struct iovec *decoded_iov,
320  int decoded_count,
321  int *bytes_sent,
322  struct iovec *broken_iovec,
323  int *current,
324  size_t *part,
325  void *global_buf,
326  int *bytes_per_process,
327  int *displs,
328  int num_aggregators,
329  size_t stripe_size);
330 
331 OMPI_DECLSPEC int ompi_io_ompio_receive_data (mca_io_ompio_file_t *fh,
332  void *recv_buf,
333  size_t total_bytes_recv,
334  struct iovec *decoded_iov,
335  int decoded_count,
336  int *bytes_recv,
337  struct iovec *broken_iovec,
338  int *current,
339  size_t *part,
340  void *global_buf,
341  int *bytes_per_process,
342  int *displs,
343  int num_aggregators,
344  size_t stripe_size);
345 
346 /*
347  * Modified versions of Collective operations
348  * Based on root offsets
349  */
350 OMPI_DECLSPEC int ompi_io_ompio_gatherv (void *sbuf,
351  int scount,
352  ompi_datatype_t *sdtype,
353  void *rbuf,
354  int *rcounts,
355  int *disps,
356  ompi_datatype_t *rdtype,
357  int root_offset,
358  int procs_per_group,
359  ompi_communicator_t *comm);
360 OMPI_DECLSPEC int ompi_io_ompio_scatterv (void *sbuf,
361  int *scounts,
362  int *disps,
363  ompi_datatype_t *sdtype,
364  void *rbuf,
365  int rcount,
366  ompi_datatype_t *rdtype,
367  int root_offset,
368  int procs_per_group,
369  ompi_communicator_t *comm);
370 OMPI_DECLSPEC int ompi_io_ompio_allgather (void *sbuf,
371  int scount,
372  ompi_datatype_t *sdtype,
373  void *rbuf,
374  int rcount,
375  ompi_datatype_t *rdtype,
376  int root_offset,
377  int procs_per_group,
378  ompi_communicator_t *comm);
379 OMPI_DECLSPEC int ompi_io_ompio_allgatherv (void *sbuf,
380  int scount,
381  ompi_datatype_t *sdtype,
382  void *rbuf,
383  int *rcounts,
384  int *disps,
385  ompi_datatype_t *rdtype,
386  int root_offset,
387  int procs_per_group,
388  ompi_communicator_t *comm);
389 OMPI_DECLSPEC int ompi_io_ompio_gather (void *sbuf,
390  int scount,
391  ompi_datatype_t *sdtype,
392  void *rbuf,
393  int rcount,
394  ompi_datatype_t *rdtype,
395  int root_offset,
396  int procs_per_group,
397  ompi_communicator_t *comm);
398 OMPI_DECLSPEC int ompi_io_ompio_bcast (void *buff,
399  int count,
400  ompi_datatype_t *datatype,
401  int root_offset,
402  int procs_per_group,
403  ompi_communicator_t *comm);
404 
405 /*
406  * Modified versions of Collective operations
407  * Based on an array of procs in group
408  */
409 OMPI_DECLSPEC int ompi_io_ompio_gatherv_array (void *sbuf,
410  int scount,
411  ompi_datatype_t *sdtype,
412  void *rbuf,
413  int *rcounts,
414  int *disps,
415  ompi_datatype_t *rdtype,
416  int root_index,
417  int *procs_in_group,
418  int procs_per_group,
419  ompi_communicator_t *comm);
420 OMPI_DECLSPEC int ompi_io_ompio_scatterv_array (void *sbuf,
421  int *scounts,
422  int *disps,
423  ompi_datatype_t *sdtype,
424  void *rbuf,
425  int rcount,
426  ompi_datatype_t *rdtype,
427  int root_index,
428  int *procs_in_group,
429  int procs_per_group,
430  ompi_communicator_t *comm);
431 OMPI_DECLSPEC int ompi_io_ompio_allgather_array (void *sbuf,
432  int scount,
433  ompi_datatype_t *sdtype,
434  void *rbuf,
435  int rcount,
436  ompi_datatype_t *rdtype,
437  int root_index,
438  int *procs_in_group,
439  int procs_per_group,
440  ompi_communicator_t *comm);
441 OMPI_DECLSPEC int ompi_io_ompio_allgatherv_array (void *sbuf,
442  int scount,
443  ompi_datatype_t *sdtype,
444  void *rbuf,
445  int *rcounts,
446  int *disps,
447  ompi_datatype_t *rdtype,
448  int root_index,
449  int *procs_in_group,
450  int procs_per_group,
451  ompi_communicator_t *comm);
452 OMPI_DECLSPEC int ompi_io_ompio_gather_array (void *sbuf,
453  int scount,
454  ompi_datatype_t *sdtype,
455  void *rbuf,
456  int rcount,
457  ompi_datatype_t *rdtype,
458  int root_index,
459  int *procs_in_group,
460  int procs_per_group,
461  ompi_communicator_t *comm);
462 OMPI_DECLSPEC int ompi_io_ompio_bcast_array (void *buff,
463  int count,
464  ompi_datatype_t *datatype,
465  int root_index,
466  int *procs_in_group,
467  int procs_per_group,
468  ompi_communicator_t *comm);
469 
470 OMPI_DECLSPEC int ompi_io_ompio_domain_partition (mca_io_ompio_file_t *fh,
471  OMPI_MPI_OFFSET_TYPE *start_offsets,
472  OMPI_MPI_OFFSET_TYPE *end_offsets,
473  OMPI_MPI_OFFSET_TYPE *min_st_offset_ptr,
474  OMPI_MPI_OFFSET_TYPE **fd_st_ptr,
475  OMPI_MPI_OFFSET_TYPE **fd_end_ptr,
476  int min_fd_size,
477  OMPI_MPI_OFFSET_TYPE *fd_size_ptr,
478  int striping_unit,
479  int nprocs);
480 
481 
482 
483 /* Function declaration for get and utility method to use with libNBC
484  implementation in io_ompio_nbc.c */
485 OMPI_DECLSPEC int mca_io_ompio_get_fcoll_dynamic_num_io_procs (int *num_procs);
486 OMPI_DECLSPEC int mca_io_ompio_get_fcoll_dynamic_cycle_buffer_size (int *cycle_buffer_size);
487 OMPI_DECLSPEC int mca_io_ompio_get_fcoll_dynamic_constant_cbs (int *constant_cbs);
488 OMPI_DECLSPEC int mca_io_ompio_get_f_aggregator_index (ompi_file_t *fh);
489 OMPI_DECLSPEC int mca_io_ompio_get_f_procs_in_group (ompi_file_t *fh,
490  int **value);
491 OMPI_DECLSPEC int mca_io_ompio_get_f_procs_per_group (ompi_file_t *fh);
492 OMPI_DECLSPEC int mca_io_ompio_get_f_comm (ompi_file_t *fh,
493  ompi_communicator_t **value);
494 OMPI_DECLSPEC int mca_io_ompio_get_iov_type (ompi_file_t *fh,
495  ompi_datatype_t **value);
496 OMPI_DECLSPEC signed int mca_io_ompio_get_f_flags (ompi_file_t *fh);
497 OMPI_DECLSPEC int mca_io_ompio_get_fd (ompi_file_t *fh);
498 OMPI_DECLSPEC int mca_io_ompio_get_f_num_of_io_entries (ompi_file_t *fh);
499 OMPI_DECLSPEC int mca_io_ompio_get_f_io_array (ompi_file_t *fh,
500  mca_io_ompio_io_array_t **f_io_array);
501 OMPI_DECLSPEC int mca_io_ompio_free_f_io_array (ompi_file_t *fh);
502 
503 OMPI_DECLSPEC int mca_io_ompio_get_datatype_size (ompi_datatype_t *datatype);
504 OMPI_DECLSPEC int mca_io_ompio_decode_datatype_external(ompi_file_t *fh,
505  struct ompi_datatype_t *datatype,
506  int count,
507  void *buf,
508  size_t *max_data,
509  struct iovec **iov,
510  uint32_t *iov_count);
511 OMPI_DECLSPEC int mca_io_ompio_generate_current_file_view (ompi_file_t *fp,
512  size_t max_data,
513  struct iovec **f_iov,
514  int *iov_count);
515 OMPI_DECLSPEC int mca_io_ompio_set_aggregator_props (ompi_file_t *fh,
516  int num_aggregators,
517  size_t bytes_per_proc);
518 OMPI_DECLSPEC int mca_io_ompio_generate_io_array (ompi_file_t *file,
519  struct iovec *global_view,
520  int *tglobal_count,
521  int *fview_count,
522  int *bytes_per_process,
523  char *global_buf,
524  int *tblocks,
525  int *sorted,
526  int *nvalue,
527  int *bytes_left,
528  int *sorted_index);
529 OMPI_DECLSPEC int mca_io_ompio_datatype_is_contiguous (ompi_datatype_t *datatype,
530  ompi_file_t *fp);
531 OMPI_DECLSPEC int mca_io_ompio_non_contiguous_create_send_buf (int *bytes_sent,
532  struct iovec *decoded_iov,
533  char *send_buf);
534 OMPI_DECLSPEC int mca_io_ompio_non_contiguous_create_receive_buf(int *bytes_received,
535  struct iovec *decoded_iov,
536  char *receive_buf);
537 
538 /* libNBC utility methods declarations ends here */
539 /*
540  * ******************************************************************
541  * ********* functions which are implemented in this module *********
542  * ******************************************************************
543  */
544 
545 int mca_io_ompio_file_set_view (struct ompi_file_t *fh,
546  OMPI_MPI_OFFSET_TYPE disp,
547  struct ompi_datatype_t *etype,
548  struct ompi_datatype_t *filetype,
549  char *datarep,
550  struct ompi_info_t *info);
551 
552 int mca_io_ompio_set_view_internal (struct mca_io_ompio_file_t *fh,
553  OMPI_MPI_OFFSET_TYPE disp,
554  struct ompi_datatype_t *etype,
555  struct ompi_datatype_t *filetype,
556  char *datarep,
557  struct ompi_info_t *info);
558 
559 int mca_io_ompio_file_get_view (struct ompi_file_t *fh,
560  OMPI_MPI_OFFSET_TYPE *disp,
561  struct ompi_datatype_t **etype,
562  struct ompi_datatype_t **filetype,
563  char *datarep);
564 int mca_io_ompio_file_open (struct ompi_communicator_t *comm,
565  char *filename,
566  int amode,
567  struct ompi_info_t *info,
568  struct ompi_file_t *fh);
569 int mca_io_ompio_file_close (struct ompi_file_t *fh);
570 int mca_io_ompio_file_delete (char *filename,
571  struct ompi_info_t *info);
572 int mca_io_ompio_file_set_size (struct ompi_file_t *fh,
573  OMPI_MPI_OFFSET_TYPE size);
574 int mca_io_ompio_file_preallocate (struct ompi_file_t *fh,
575  OMPI_MPI_OFFSET_TYPE size);
576 int mca_io_ompio_file_get_size (struct ompi_file_t *fh,
577  OMPI_MPI_OFFSET_TYPE * size);
578 int mca_io_ompio_file_get_amode (struct ompi_file_t *fh,
579  int *amode);
580 int mca_io_ompio_file_set_info (struct ompi_file_t *fh,
581  struct ompi_info_t *info);
582 int mca_io_ompio_file_get_info (struct ompi_file_t *fh,
583  struct ompi_info_t ** info_used);
584 int mca_io_ompio_file_sync (struct ompi_file_t *fh);
585 int mca_io_ompio_file_seek (struct ompi_file_t *fh,
586  OMPI_MPI_OFFSET_TYPE offet,
587  int whence);
588 /* Section 9.3 */
589 int mca_io_ompio_file_set_view (struct ompi_file_t *fh,
590  OMPI_MPI_OFFSET_TYPE disp,
591  struct ompi_datatype_t *etype,
592  struct ompi_datatype_t *filetype,
593  char *datarep,
594  struct ompi_info_t *info);
595 int mca_io_ompio_file_get_view (struct ompi_file_t *fh,
596  OMPI_MPI_OFFSET_TYPE *disp,
597  struct ompi_datatype_t **etype,
598  struct ompi_datatype_t **filetype,
599  char *datarep);
600 
601 /* Section 9.4.2 */
602 int mca_io_ompio_file_read_at (struct ompi_file_t *fh,
603  OMPI_MPI_OFFSET_TYPE offset,
604  void *buf,
605  int count,
606  struct ompi_datatype_t *datatype,
607  ompi_status_public_t *status);
608 int mca_io_ompio_file_read_at_all (struct ompi_file_t *fh,
609  OMPI_MPI_OFFSET_TYPE offset,
610  void *buf,
611  int count,
612  struct ompi_datatype_t *datatype,
613  ompi_status_public_t *status);
614 int mca_io_ompio_file_write_at (struct ompi_file_t *fh,
615  OMPI_MPI_OFFSET_TYPE offset,
616  void *buf,
617  int count,
618  struct ompi_datatype_t *datatype,
619  ompi_status_public_t *status);
620 int mca_io_ompio_file_write_at_all (struct ompi_file_t *fh,
621  OMPI_MPI_OFFSET_TYPE offset,
622  void *buf,
623  int count,
624  struct ompi_datatype_t *datatype,
625  ompi_status_public_t *status);
626 int mca_io_ompio_file_iread_at (struct ompi_file_t *fh,
627  OMPI_MPI_OFFSET_TYPE offset,
628  void *buf,
629  int count,
630  struct ompi_datatype_t *datatype,
632 int mca_io_ompio_file_iwrite_at (struct ompi_file_t *fh,
633  OMPI_MPI_OFFSET_TYPE offset,
634  void *buf,
635  int count,
636  struct ompi_datatype_t *datatype,
638 
639 /* Section 9.4.3 */
640 int mca_io_ompio_file_read (struct ompi_file_t *fh,
641  void *buf,
642  int count,
643  struct ompi_datatype_t *datatype,
644  ompi_status_public_t *status);
645 int mca_io_ompio_file_read_all (struct ompi_file_t *fh,
646  void *buf,
647  int count,
648  struct ompi_datatype_t *datatype,
649  ompi_status_public_t *status);
650 int mca_io_ompio_file_write (struct ompi_file_t *fh,
651  void *buf,
652  int count,
653  struct ompi_datatype_t *datatype,
654  ompi_status_public_t *status);
655 int mca_io_ompio_file_write_all (struct ompi_file_t *fh,
656  void *buf,
657  int count,
658  struct ompi_datatype_t *datatype,
659  ompi_status_public_t *status);
660 int mca_io_ompio_file_iread (struct ompi_file_t *fh,
661  void *buf,
662  int count,
663  struct ompi_datatype_t *datatype,
665 int mca_io_ompio_file_iwrite (struct ompi_file_t *fh,
666  void *buf,
667  int count,
668  struct ompi_datatype_t *datatype,
670 int mca_io_ompio_file_seek (struct ompi_file_t *fh,
671  OMPI_MPI_OFFSET_TYPE offset,
672  int whence);
673 int mca_io_ompio_file_get_position (struct ompi_file_t *fh,
674  OMPI_MPI_OFFSET_TYPE *offset);
675 int mca_io_ompio_file_get_byte_offset (struct ompi_file_t *fh,
676  OMPI_MPI_OFFSET_TYPE offset,
677  OMPI_MPI_OFFSET_TYPE *disp);
678 
679 /* Section 9.4.4 */
680 int mca_io_ompio_file_read_shared (struct ompi_file_t *fh,
681  void *buf,
682  int count,
683  struct ompi_datatype_t *datatype,
684  ompi_status_public_t *status);
685 int mca_io_ompio_file_write_shared (struct ompi_file_t *fh,
686  void *buf,
687  int count,
688  struct ompi_datatype_t *datatype,
689  ompi_status_public_t *status);
690 int mca_io_ompio_file_iread_shared (struct ompi_file_t *fh,
691  void *buf,
692  int count,
693  struct ompi_datatype_t *datatype,
695 int mca_io_ompio_file_iwrite_shared (struct ompi_file_t *fh,
696  void *buf,
697  int count,
698  struct ompi_datatype_t *datatype,
700 int mca_io_ompio_file_read_ordered (struct ompi_file_t *fh,
701  void *buf,
702  int count,
703  struct ompi_datatype_t *datatype,
704  ompi_status_public_t *status);
705 int mca_io_ompio_file_write_ordered (struct ompi_file_t *fh,
706  void *buf,
707  int count,
708  struct ompi_datatype_t *datatype,
709  ompi_status_public_t *status);
710 int mca_io_ompio_file_seek_shared (struct ompi_file_t *fh,
711  OMPI_MPI_OFFSET_TYPE offset,
712  int whence);
713 int mca_io_ompio_file_get_position_shared (struct ompi_file_t *fh,
714  OMPI_MPI_OFFSET_TYPE *offset);
715 
716 /* Section 9.4.5 */
717 int mca_io_ompio_file_read_at_all_begin (struct ompi_file_t *fh,
718  OMPI_MPI_OFFSET_TYPE offset,
719  void *buf,
720  int count,
721  struct ompi_datatype_t *datatype);
722 int mca_io_ompio_file_read_at_all_end (struct ompi_file_t *fh,
723  void *buf,
724  ompi_status_public_t *status);
725 int mca_io_ompio_file_write_at_all_begin (struct ompi_file_t *fh,
726  OMPI_MPI_OFFSET_TYPE offset,
727  void *buf,
728  int count,
729  struct ompi_datatype_t *datatype);
730 int mca_io_ompio_file_write_at_all_end (struct ompi_file_t *fh,
731  void *buf,
732  ompi_status_public_t *status);
733 int mca_io_ompio_file_read_all_begin (struct ompi_file_t *fh,
734  void *buf,
735  int count,
736  struct ompi_datatype_t *datatype);
737 int mca_io_ompio_file_read_all_end (struct ompi_file_t *fh,
738  void *buf,
739  ompi_status_public_t *status);
740 int mca_io_ompio_file_write_all_begin (struct ompi_file_t *fh,
741  void *buf,
742  int count,
743  struct ompi_datatype_t *datatype);
744 int mca_io_ompio_file_write_all_end (struct ompi_file_t *fh,
745  void *buf,
746  ompi_status_public_t *status);
747 int mca_io_ompio_file_read_ordered_begin (struct ompi_file_t *fh,
748  void *buf,
749  int count,
750  struct ompi_datatype_t *datatype);
751 int mca_io_ompio_file_read_ordered_end (struct ompi_file_t *fh,
752  void *buf,
753  ompi_status_public_t *status);
754 int mca_io_ompio_file_write_ordered_begin (struct ompi_file_t *fh,
755  void *buf,
756  int count,
757  struct ompi_datatype_t *datatype);
758 int mca_io_ompio_file_write_ordered_end (struct ompi_file_t *fh,
759  void *buf,
760  struct ompi_status_public_t *status);
761 
762 /* Section 9.5.1 */
763 int mca_io_ompio_file_get_type_extent (struct ompi_file_t *fh,
764  struct ompi_datatype_t *datatype,
765  MPI_Aint *extent);
766 
767 /* Section 9.6.1 */
768 int mca_io_ompio_file_set_atomicity (struct ompi_file_t *fh,
769  int flag);
770 int mca_io_ompio_file_get_atomicity (struct ompi_file_t *fh,
771  int *flag);
772 int mca_io_ompio_file_sync (struct ompi_file_t *fh);
773 /*
774  * ******************************************************************
775  * ************ functions implemented in this module end ************
776  * ******************************************************************
777  */
778 
779 
780 END_C_DECLS
781 
782 #endif /* MCA_IO_OMPIO_H */
Definition: fbtl.h:138
Common type for all MCA components.
Definition: mca.h:250
Definition: fcache.h:131
Definition: ompi_datatype.h:68
Definition: fcoll.h:150
Definition: io.h:106
Definition: mutex_unix.h:53
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
Definition: info.h:38
Definition: io.h:280
Definition: fs.h:127
Top-level description of requests.
Back-end structure for MPI_File.
Definition: file.h:42
Definition: io_ompio.h:101
Definition: ompi_uio.h:29
Definition: io_ompio.h:110
Back-end structure for MPI_File.
Definition: io_ompio.h:121
Definition: opal_convertor.h:90
Definition: mpi.h:337
Definition: io_ompio.h:186
Definition: evdns.c:158
Definition: sharedfp.h:120
Mutual exclusion functions.
Definition: communicator.h:118
Main top-level request struct definition.
Definition: request.h:100