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 #ifndef OMPI_MCA_SHAREDFP_H
27 #define OMPI_MCA_SHAREDFP_H
28
29 #include "ompi_config.h"
30 #include "mpi.h"
31 #include "ompi/mca/mca.h"
32 #include "opal/mca/base/base.h"
33 #include "ompi/request/request.h"
34 #include "ompi/info/info.h"
35
36
37 BEGIN_C_DECLS
38
39 struct ompio_file_t;
40 struct ompi_file_t;
41
42
43
44 #define MCA_SHAREDFP_BASE_VERSION_2_0_0 \
45 OMPI_MCA_BASE_VERSION_2_1_0("sharedfp", 2, 0, 0)
46
47
48
49
50
51
52
53
54
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 (*mca_sharedfp_base_component_init_query_1_0_0_fn_t)
78 (bool enable_progress_threads,
79 bool enable_mpi_threads);
80
81 typedef struct mca_sharedfp_base_module_1_0_0_t *
82 (*mca_sharedfp_base_component_file_query_1_0_0_fn_t)
83 (struct ompio_file_t *file, int *priority);
84
85 typedef int (*mca_sharedfp_base_component_file_unquery_1_0_0_fn_t)
86 (struct ompio_file_t *file);
87
88
89
90
91
92
93
94 struct mca_sharedfp_base_component_2_0_0_t {
95 mca_base_component_t sharedfpm_version;
96 mca_base_component_data_t sharedfpm_data;
97
98 mca_sharedfp_base_component_init_query_1_0_0_fn_t sharedfpm_init_query;
99 mca_sharedfp_base_component_file_query_1_0_0_fn_t sharedfpm_file_query;
100 mca_sharedfp_base_component_file_unquery_1_0_0_fn_t sharedfpm_file_unquery;
101 };
102 typedef struct mca_sharedfp_base_component_2_0_0_t mca_sharedfp_base_component_2_0_0_t;
103 typedef struct mca_sharedfp_base_component_2_0_0_t mca_sharedfp_base_component_t;
104
105
106
107
108
109
110
111
112
113 typedef int (*mca_sharedfp_base_module_init_1_0_0_fn_t)
114 (struct ompio_file_t *file);
115
116 typedef int (*mca_sharedfp_base_module_finalize_1_0_0_fn_t)
117 (struct ompio_file_t *file);
118
119
120
121 typedef int (*mca_sharedfp_base_module_seek_fn_t)(
122 struct ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, int whence);
123 typedef int (*mca_sharedfp_base_module_get_position_fn_t)(
124 struct ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE * offset);
125 typedef int (*mca_sharedfp_base_module_write_fn_t)(
126 struct ompio_file_t *fh,
127 const void *buf,
128 int count,
129 struct ompi_datatype_t *datatype,
130 ompi_status_public_t *status);
131 typedef int (*mca_sharedfp_base_module_write_ordered_fn_t)(
132 struct ompio_file_t *fh,
133 const void *buf,
134 int count,
135 struct ompi_datatype_t *datatype,
136 ompi_status_public_t *status);
137 typedef int (*mca_sharedfp_base_module_write_ordered_begin_fn_t)(
138 struct ompio_file_t *fh,
139 const void *buf,
140 int count,
141 struct ompi_datatype_t *datatype);
142 typedef int (*mca_sharedfp_base_module_write_ordered_end_fn_t)(
143 struct ompio_file_t *fh,
144 const void *buf,
145 ompi_status_public_t *status);
146 typedef int (*mca_sharedfp_base_module_iwrite_fn_t)(
147 struct ompio_file_t *fh,
148 const void *buf,
149 int count,
150 struct ompi_datatype_t *datatype,
151 ompi_request_t ** request);
152 typedef int (*mca_sharedfp_base_module_read_fn_t)(
153 struct ompio_file_t *fh,
154 void *buf,
155 int count,
156 struct ompi_datatype_t *datatype,
157 ompi_status_public_t *status);
158 typedef int (*mca_sharedfp_base_module_read_ordered_fn_t)(
159 struct ompio_file_t *fh,
160 void *buf,
161 int count,
162 struct ompi_datatype_t *datatype,
163 ompi_status_public_t *status);
164 typedef int (*mca_sharedfp_base_module_iread_fn_t)(
165 struct ompio_file_t *fh,
166 void *buf,
167 int count,
168 struct ompi_datatype_t *datatype,
169 ompi_request_t ** request);
170 typedef int (*mca_sharedfp_base_module_read_ordered_begin_fn_t)(
171 struct ompio_file_t *fh,
172 void *buf,
173 int count,
174 struct ompi_datatype_t *datatype);
175 typedef int (*mca_sharedfp_base_module_read_ordered_end_fn_t)(
176 struct ompio_file_t *fh,
177 void *buf,
178 ompi_status_public_t *status);
179 typedef int (*mca_sharedfp_base_module_file_open_fn_t)(
180 struct ompi_communicator_t *comm, const char *filename, int amode,
181 struct opal_info_t *info, struct ompio_file_t *fh);
182 typedef int (*mca_sharedfp_base_module_file_close_fn_t)(struct ompio_file_t *fh);
183
184
185
186
187
188
189
190 struct mca_sharedfp_base_module_1_0_0_t {
191
192
193
194
195
196 mca_sharedfp_base_module_init_1_0_0_fn_t sharedfp_module_init;
197 mca_sharedfp_base_module_finalize_1_0_0_fn_t sharedfp_module_finalize;
198
199
200
201 mca_sharedfp_base_module_seek_fn_t sharedfp_seek;
202 mca_sharedfp_base_module_get_position_fn_t sharedfp_get_position;
203 mca_sharedfp_base_module_read_fn_t sharedfp_read;
204 mca_sharedfp_base_module_read_ordered_fn_t sharedfp_read_ordered;
205 mca_sharedfp_base_module_read_ordered_begin_fn_t sharedfp_read_ordered_begin;
206 mca_sharedfp_base_module_read_ordered_end_fn_t sharedfp_read_ordered_end;
207 mca_sharedfp_base_module_iread_fn_t sharedfp_iread;
208 mca_sharedfp_base_module_write_fn_t sharedfp_write;
209 mca_sharedfp_base_module_write_ordered_fn_t sharedfp_write_ordered;
210 mca_sharedfp_base_module_write_ordered_begin_fn_t sharedfp_write_ordered_begin;
211 mca_sharedfp_base_module_write_ordered_end_fn_t sharedfp_write_ordered_end;
212 mca_sharedfp_base_module_iwrite_fn_t sharedfp_iwrite;
213 mca_sharedfp_base_module_file_open_fn_t sharedfp_file_open;
214 mca_sharedfp_base_module_file_close_fn_t sharedfp_file_close;
215 };
216 typedef struct mca_sharedfp_base_module_1_0_0_t mca_sharedfp_base_module_1_0_0_t;
217 typedef mca_sharedfp_base_module_1_0_0_t mca_sharedfp_base_module_t;
218
219
220
221
222
223
224 struct mca_sharedfp_base_data_t{
225
226 OMPI_MPI_OFFSET_TYPE global_offset;
227
228
229
230 void *selected_module_data;
231 };
232
233
234
235 END_C_DECLS
236
237 #endif