1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #ifndef MCA_FCOLL_TWO_PHASE_EXPORT_H
23 #define MCA_FCOLL_TWO_PHASE_EXPORT_H
24
25 #include "ompi_config.h"
26
27 #include "mpi.h"
28 #include "ompi/mca/mca.h"
29 #include "ompi/mca/fcoll/fcoll.h"
30 #include "ompi/mca/fcoll/base/base.h"
31 #include "ompi/mca/common/ompio/common_ompio.h"
32
33 BEGIN_C_DECLS
34
35
36
37 extern int mca_fcoll_two_phase_priority;
38
39 OMPI_MODULE_DECLSPEC extern mca_fcoll_base_component_2_0_0_t mca_fcoll_two_phase_component;
40
41
42
43 int mca_fcoll_two_phase_component_init_query(bool enable_progress_threads,
44 bool enable_mpi_threads);
45 struct mca_fcoll_base_module_1_0_0_t *
46 mca_fcoll_two_phase_component_file_query (ompio_file_t *fh, int *priority);
47
48 int mca_fcoll_two_phase_component_file_unquery (ompio_file_t *file);
49
50 int mca_fcoll_two_phase_module_init (ompio_file_t *file);
51 int mca_fcoll_two_phase_module_finalize (ompio_file_t *file);
52
53 int mca_fcoll_two_phase_file_read_all (ompio_file_t *fh,
54 void *buf,
55 int count,
56 struct ompi_datatype_t *datatype,
57 ompi_status_public_t * status);
58
59
60 int mca_fcoll_two_phase_file_write_all (ompio_file_t *fh,
61 const void *buf,
62 int count,
63 struct ompi_datatype_t *datatype,
64 ompi_status_public_t * status);
65
66
67 int mca_fcoll_two_phase_calc_aggregator (ompio_file_t *fh,
68 OMPI_MPI_OFFSET_TYPE off,
69 OMPI_MPI_OFFSET_TYPE min_off,
70 OMPI_MPI_OFFSET_TYPE *len,
71 OMPI_MPI_OFFSET_TYPE fd_size,
72 OMPI_MPI_OFFSET_TYPE *fd_start,
73 OMPI_MPI_OFFSET_TYPE *fd_end,
74 int striping_unit,
75 int num_aggregators,
76 int *aggregator_list);
77
78 int mca_fcoll_two_phase_calc_others_requests(ompio_file_t *fh,
79 int count_my_req_procs,
80 int *count_my_req_per_proc,
81 mca_common_ompio_access_array_t *my_req,
82 int *count_others_req_procs_ptr,
83 mca_common_ompio_access_array_t **others_req_ptr);
84
85 int mca_fcoll_two_phase_calc_my_requests (ompio_file_t *fh,
86 struct iovec *offset_len,
87 int contig_access_count,
88 OMPI_MPI_OFFSET_TYPE min_st_offset,
89 OMPI_MPI_OFFSET_TYPE *fd_start,
90 OMPI_MPI_OFFSET_TYPE *fd_end,
91 OMPI_MPI_OFFSET_TYPE fd_size,
92 int *count_my_req_procs_ptr,
93 int **count_my_req_per_proc_ptr,
94 mca_common_ompio_access_array_t **my_req_ptr,
95 size_t **buf_indices,
96 int striping_unit,
97 int num_aggregators,
98 int *aggregator_list);
99
100 int mca_fcoll_two_phase_domain_partition (ompio_file_t *fh,
101 OMPI_MPI_OFFSET_TYPE *start_offsets,
102 OMPI_MPI_OFFSET_TYPE *end_offsets,
103 OMPI_MPI_OFFSET_TYPE *min_st_offset_ptr,
104 OMPI_MPI_OFFSET_TYPE **fd_st_ptr,
105 OMPI_MPI_OFFSET_TYPE **fd_end_ptr,
106 int min_fd_size,
107 OMPI_MPI_OFFSET_TYPE *fd_size_ptr,
108 int striping_unit,
109 int nprocs_for_coll);
110
111
112
113
114 END_C_DECLS
115
116 #endif