21 #ifndef MCA_IO_OMPIO_H
22 #define MCA_IO_OMPIO_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"
43 extern int mca_io_ompio_cycle_buffer_size;
44 extern int mca_io_ompio_bytes_per_agg;
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
56 #define OMPIO_MIN(a, b) (((a) < (b)) ? (a) : (b))
57 #define OMPIO_MAX(a, b) (((a) < (b)) ? (b) : (a))
62 #define OMPIO_PREALLOC_MAX_BUF_SIZE 33554432
63 #define OMPIO_PERM_NULL -1
64 #define OMPIO_IOVEC_INITIAL_SIZE 100
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
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
102 void *memory_address;
111 OMPI_MPI_OFFSET_TYPE *offsets;
124 OMPI_MPI_OFFSET_TYPE f_offset;
125 OMPI_MPI_OFFSET_TYPE f_disp;
138 size_t f_stripe_size;
141 enum ompio_fs_type f_fstype;
144 int *f_procs_in_group;
145 int f_procs_per_group;
146 int f_aggregator_index;
149 struct iovec *f_decoded_iov;
150 uint32_t f_iov_count;
152 size_t f_position_in_file_view;
153 size_t f_total_bytes;
154 int f_index_in_file_view;
155 OPAL_PTRDIFF_TYPE f_view_extent;
163 int f_num_of_io_entries;
203 uint32_t *iov_count);
213 OMPI_DECLSPEC
int ompi_io_ompio_sort_iovec (
struct iovec *iov,
218 OMPI_MPI_OFFSET_TYPE offset);
222 struct iovec **f_iov,
228 int *procs_per_group,
232 size_t bytes_per_proc);
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,
244 int *aggregator_list);
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,
260 int *aggregator_list);
266 int count_my_req_procs,
267 int *count_my_req_per_proc,
269 int *count_othres_req_procs_ptr,
278 struct iovec **broken_iov,
282 struct iovec *broken_iov,
292 size_t total_bytes_sent,
294 struct iovec *broken_iovec,
298 int *bytes_per_process,
305 size_t total_bytes_recv,
307 struct iovec *broken_iovec,
311 int *bytes_per_process,
318 size_t total_bytes_sent,
319 struct iovec *decoded_iov,
322 struct iovec *broken_iovec,
326 int *bytes_per_process,
333 size_t total_bytes_recv,
334 struct iovec *decoded_iov,
337 struct iovec *broken_iovec,
341 int *bytes_per_process,
350 OMPI_DECLSPEC
int ompi_io_ompio_gatherv (
void *sbuf,
360 OMPI_DECLSPEC
int ompi_io_ompio_scatterv (
void *sbuf,
370 OMPI_DECLSPEC
int ompi_io_ompio_allgather (
void *sbuf,
379 OMPI_DECLSPEC
int ompi_io_ompio_allgatherv (
void *sbuf,
389 OMPI_DECLSPEC
int ompi_io_ompio_gather (
void *sbuf,
398 OMPI_DECLSPEC
int ompi_io_ompio_bcast (
void *buff,
409 OMPI_DECLSPEC
int ompi_io_ompio_gatherv_array (
void *sbuf,
420 OMPI_DECLSPEC
int ompi_io_ompio_scatterv_array (
void *sbuf,
431 OMPI_DECLSPEC
int ompi_io_ompio_allgather_array (
void *sbuf,
441 OMPI_DECLSPEC
int ompi_io_ompio_allgatherv_array (
void *sbuf,
452 OMPI_DECLSPEC
int ompi_io_ompio_gather_array (
void *sbuf,
462 OMPI_DECLSPEC
int ompi_io_ompio_bcast_array (
void *buff,
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,
477 OMPI_MPI_OFFSET_TYPE *fd_size_ptr,
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,
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,
494 OMPI_DECLSPEC
int mca_io_ompio_get_iov_type (
ompi_file_t *fh,
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,
501 OMPI_DECLSPEC
int mca_io_ompio_free_f_io_array (
ompi_file_t *fh);
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,
510 uint32_t *iov_count);
511 OMPI_DECLSPEC
int mca_io_ompio_generate_current_file_view (
ompi_file_t *fp,
513 struct iovec **f_iov,
515 OMPI_DECLSPEC
int mca_io_ompio_set_aggregator_props (
ompi_file_t *fh,
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,
522 int *bytes_per_process,
529 OMPI_DECLSPEC
int mca_io_ompio_datatype_is_contiguous (
ompi_datatype_t *datatype,
531 OMPI_DECLSPEC
int mca_io_ompio_non_contiguous_create_send_buf (
int *bytes_sent,
532 struct iovec *decoded_iov,
534 OMPI_DECLSPEC
int mca_io_ompio_non_contiguous_create_receive_buf(
int *bytes_received,
535 struct iovec *decoded_iov,
545 int mca_io_ompio_file_set_view (
struct ompi_file_t *fh,
546 OMPI_MPI_OFFSET_TYPE disp,
553 OMPI_MPI_OFFSET_TYPE disp,
559 int mca_io_ompio_file_get_view (
struct ompi_file_t *fh,
560 OMPI_MPI_OFFSET_TYPE *disp,
569 int mca_io_ompio_file_close (
struct ompi_file_t *fh);
570 int mca_io_ompio_file_delete (
char *filename,
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,
580 int mca_io_ompio_file_set_info (
struct ompi_file_t *fh,
582 int mca_io_ompio_file_get_info (
struct ompi_file_t *fh,
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,
589 int mca_io_ompio_file_set_view (
struct ompi_file_t *fh,
590 OMPI_MPI_OFFSET_TYPE disp,
595 int mca_io_ompio_file_get_view (
struct ompi_file_t *fh,
596 OMPI_MPI_OFFSET_TYPE *disp,
602 int mca_io_ompio_file_read_at (
struct ompi_file_t *fh,
603 OMPI_MPI_OFFSET_TYPE offset,
608 int mca_io_ompio_file_read_at_all (
struct ompi_file_t *fh,
609 OMPI_MPI_OFFSET_TYPE offset,
614 int mca_io_ompio_file_write_at (
struct ompi_file_t *fh,
615 OMPI_MPI_OFFSET_TYPE offset,
620 int mca_io_ompio_file_write_at_all (
struct ompi_file_t *fh,
621 OMPI_MPI_OFFSET_TYPE offset,
626 int mca_io_ompio_file_iread_at (
struct ompi_file_t *fh,
627 OMPI_MPI_OFFSET_TYPE offset,
632 int mca_io_ompio_file_iwrite_at (
struct ompi_file_t *fh,
633 OMPI_MPI_OFFSET_TYPE offset,
640 int mca_io_ompio_file_read (
struct ompi_file_t *fh,
645 int mca_io_ompio_file_read_all (
struct ompi_file_t *fh,
650 int mca_io_ompio_file_write (
struct ompi_file_t *fh,
655 int mca_io_ompio_file_write_all (
struct ompi_file_t *fh,
660 int mca_io_ompio_file_iread (
struct ompi_file_t *fh,
665 int mca_io_ompio_file_iwrite (
struct ompi_file_t *fh,
670 int mca_io_ompio_file_seek (
struct ompi_file_t *fh,
671 OMPI_MPI_OFFSET_TYPE offset,
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);
680 int mca_io_ompio_file_read_shared (
struct ompi_file_t *fh,
685 int mca_io_ompio_file_write_shared (
struct ompi_file_t *fh,
690 int mca_io_ompio_file_iread_shared (
struct ompi_file_t *fh,
695 int mca_io_ompio_file_iwrite_shared (
struct ompi_file_t *fh,
700 int mca_io_ompio_file_read_ordered (
struct ompi_file_t *fh,
705 int mca_io_ompio_file_write_ordered (
struct ompi_file_t *fh,
710 int mca_io_ompio_file_seek_shared (
struct ompi_file_t *fh,
711 OMPI_MPI_OFFSET_TYPE offset,
713 int mca_io_ompio_file_get_position_shared (
struct ompi_file_t *fh,
714 OMPI_MPI_OFFSET_TYPE *offset);
717 int mca_io_ompio_file_read_at_all_begin (
struct ompi_file_t *fh,
718 OMPI_MPI_OFFSET_TYPE offset,
722 int mca_io_ompio_file_read_at_all_end (
struct ompi_file_t *fh,
725 int mca_io_ompio_file_write_at_all_begin (
struct ompi_file_t *fh,
726 OMPI_MPI_OFFSET_TYPE offset,
730 int mca_io_ompio_file_write_at_all_end (
struct ompi_file_t *fh,
733 int mca_io_ompio_file_read_all_begin (
struct ompi_file_t *fh,
737 int mca_io_ompio_file_read_all_end (
struct ompi_file_t *fh,
740 int mca_io_ompio_file_write_all_begin (
struct ompi_file_t *fh,
744 int mca_io_ompio_file_write_all_end (
struct ompi_file_t *fh,
747 int mca_io_ompio_file_read_ordered_begin (
struct ompi_file_t *fh,
751 int mca_io_ompio_file_read_ordered_end (
struct ompi_file_t *fh,
754 int mca_io_ompio_file_write_ordered_begin (
struct ompi_file_t *fh,
758 int mca_io_ompio_file_write_ordered_end (
struct ompi_file_t *fh,
763 int mca_io_ompio_file_get_type_extent (
struct ompi_file_t *fh,
768 int mca_io_ompio_file_set_atomicity (
struct ompi_file_t *fh,
770 int mca_io_ompio_file_get_atomicity (
struct ompi_file_t *fh,
772 int mca_io_ompio_file_sync (
struct ompi_file_t *fh);
Common type for all MCA components.
Definition: mca.h:250
Definition: ompi_datatype.h:68
Definition: mutex_unix.h:53
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
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: io_ompio.h:186
Definition: sharedfp.h:120
Mutual exclusion functions.
Definition: communicator.h:118
Main top-level request struct definition.
Definition: request.h:100