35 (
"MPI_Allgather",
"sendcount"):1,
36 (
"MPI_Allgather",
"sendtype"):2,
37 (
"MPI_Allgatherv",
"sendcount"):1,
38 (
"MPI_Allgatherv",
"sendtype"):2,
39 (
"MPI_Allreduce",
"count"):1,
40 (
"MPI_Allreduce",
"datatype"):2,
41 (
"MPI_Alltoall",
"sendcount"):1,
42 (
"MPI_Alltoall",
"sendtype"):2,
43 (
"MPI_Bcast",
"count"):1,
44 (
"MPI_Bcast",
"datatype"):2,
45 (
"MPI_Bsend",
"count"):1,
46 (
"MPI_Bsend",
"datatype"):2,
47 (
"MPI_Gather",
"sendcnt"):1,
48 (
"MPI_Gather",
"sendtype"):2,
49 (
"MPI_Gatherv",
"sendcnt"):1,
50 (
"MPI_Gatherv",
"sendtype"):2,
51 (
"MPI_Ibsend",
"count"):1,
52 (
"MPI_Ibsend",
"datatype"):2,
53 (
"MPI_Irecv",
"count"):1,
54 (
"MPI_Irecv",
"datatype"):2,
55 (
"MPI_Irsend",
"count"):1,
56 (
"MPI_Irsend",
"datatype"):2,
57 (
"MPI_Isend",
"count"):1,
58 (
"MPI_Isend",
"datatype"):2,
59 (
"MPI_Issend",
"count"):1,
60 (
"MPI_Issend",
"datatype"):2,
61 (
"MPI_Recv",
"count"):1,
62 (
"MPI_Recv",
"datatype"):2,
63 (
"MPI_Reduce",
"count"):1,
64 (
"MPI_Reduce",
"datatype"):2,
65 (
"MPI_Rsend",
"count"):1,
66 (
"MPI_Rsend",
"datatype"):2,
67 (
"MPI_Scan",
"count"):1,
68 (
"MPI_Scan",
"datatype"):2,
69 (
"MPI_Scatter",
"sendcnt"):1,
70 (
"MPI_Scatter",
"sendtype"):2,
71 (
"MPI_Send",
"count"):1,
72 (
"MPI_Send",
"datatype"):2,
73 (
"MPI_Sendrecv",
"sendcount"):1,
74 (
"MPI_Sendrecv",
"sendtype"):2,
75 (
"MPI_Sendrecv_replace",
"count"):1,
76 (
"MPI_Sendrecv_replace",
"datatype"):2,
77 (
"MPI_Ssend",
"count"):1,
78 (
"MPI_Ssend",
"datatype"):2
83 (
"MPI_File_read",
"count"):1,
84 (
"MPI_File_read",
"datatype"):2,
85 (
"MPI_File_read_all",
"count"):1,
86 (
"MPI_File_read_all",
"datatype"):2,
87 (
"MPI_File_read_at",
"count"):1,
88 (
"MPI_File_read_at",
"datatype"):2,
89 (
"MPI_File_write",
"count"):1,
90 (
"MPI_File_write",
"datatype"):2,
91 (
"MPI_File_write_all",
"count"):1,
92 (
"MPI_File_write_all",
"datatype"):2,
93 (
"MPI_File_write_at",
"count"):1,
94 (
"MPI_File_write_at",
"datatype"):2
99 (
"MPI_Accumulate",
"target_count"):1,
100 (
"MPI_Accumulate",
"target_datatype"):2,
101 (
"MPI_Get",
"origin_count"):1,
102 (
"MPI_Get",
"origin_datatype"):2,
103 (
"MPI_Put",
"origin_count"):1,
104 (
"MPI_Put",
"origin_datatype"):2
112 (
"MPI_Abort",
"comm"):
"MPI_Comm",
113 (
"MPI_Accumulate",
"origin_datatype"):
"MPI_Datatype",
114 (
"MPI_Accumulate",
"target_datatype"):
"MPI_Datatype",
115 (
"MPI_Accumulate",
"op"):
"MPI_Op",
116 (
"MPI_Accumulate",
"win"):
"MPI_Win",
117 (
"MPI_Allgather",
"comm"):
"MPI_Comm",
118 (
"MPI_Allgather",
"recvtype"):
"MPI_Datatype",
119 (
"MPI_Allgather",
"sendtype"):
"MPI_Datatype",
120 (
"MPI_Allgatherv",
"comm"):
"MPI_Comm",
121 (
"MPI_Allgatherv",
"recvtype"):
"MPI_Datatype",
122 (
"MPI_Allgatherv",
"sendtype"):
"MPI_Datatype",
123 (
"MPI_Allreduce",
"comm"):
"MPI_Comm",
124 (
"MPI_Allreduce",
"datatype"):
"MPI_Datatype",
125 (
"MPI_Allreduce",
"op"):
"MPI_Op",
126 (
"MPI_Alltoall",
"comm"):
"MPI_Comm",
127 (
"MPI_Alltoall",
"recvtype"):
"MPI_Datatype",
128 (
"MPI_Alltoall",
"sendtype"):
"MPI_Datatype",
129 (
"MPI_Alltoallv",
"comm"):
"MPI_Comm",
130 (
"MPI_Alltoallv",
"recvtype"):
"MPI_Datatype",
131 (
"MPI_Alltoallv",
"sendtype"):
"MPI_Datatype",
132 (
"MPI_Attr_delete",
"comm"):
"MPI_Comm",
133 (
"MPI_Attr_get",
"comm"):
"MPI_Comm",
134 (
"MPI_Attr_put",
"comm"):
"MPI_Comm",
135 (
"MPI_Attr_put",
"comm"):
"MPI_Comm",
136 (
"MPI_Barrier",
"comm"):
"MPI_Comm",
137 (
"MPI_Bcast",
"datatype"):
"MPI_Datatype",
138 (
"MPI_Bcast",
"comm"):
"MPI_Comm",
139 (
"MPI_Bsend",
"comm"):
"MPI_Comm",
140 (
"MPI_Bsend",
"datatype"):
"MPI_Datatype",
141 (
"MPI_Bsend_init",
"comm"):
"MPI_Comm",
142 (
"MPI_Bsend_init",
"datatype"):
"MPI_Datatype",
143 (
"MPI_Cancel",
"request"):
"MPI_Request",
144 (
"MPI_Cart_coords",
"comm"):
"MPI_Comm",
145 (
"MPI_Cart_create",
"comm_old"):
"MPI_Comm",
146 (
"MPI_Cart_get",
"comm"):
"MPI_Comm",
147 (
"MPI_Cart_map",
"comm_old"):
"MPI_Comm",
148 (
"MPI_Cart_rank",
"comm"):
"MPI_Comm",
149 (
"MPI_Cart_shift",
"comm"):
"MPI_Comm",
150 (
"MPI_Cart_sub",
"comm"):
"MPI_Comm",
151 (
"MPI_Cartdim_get",
"comm"):
"MPI_Comm",
152 (
"MPI_Comm_compare",
"comm1"):
"MPI_Comm",
153 (
"MPI_Comm_compare",
"comm2"):
"MPI_Comm",
154 (
"MPI_Comm_create",
"comm"):
"MPI_Comm",
155 (
"MPI_Comm_create",
"group"):
"MPI_Group",
156 (
"MPI_Comm_dup",
"comm"):
"MPI_Comm",
157 (
"MPI_Comm_free",
"commp"):
"MPI_Comm",
158 (
"MPI_Comm_group",
"comm"):
"MPI_Comm",
159 (
"MPI_Comm_rank",
"comm"):
"MPI_Comm",
160 (
"MPI_Comm_remote_group",
"comm"):
"MPI_Comm",
161 (
"MPI_Comm_remote_size",
"comm"):
"MPI_Comm",
162 (
"MPI_Comm_size",
"comm"):
"MPI_Comm",
163 (
"MPI_Comm_split",
"comm"):
"MPI_Comm",
164 (
"MPI_Comm_test_inter",
"comm"):
"MPI_Comm",
165 (
"MPI_Errhandler_get",
"comm"):
"MPI_Comm",
166 (
"MPI_Errhandler_set",
"comm"):
"MPI_Comm",
167 (
"MPI_File_close",
"fh"):
"MPI_File",
168 (
"MPI_File_open",
"comm"):
"MPI_Comm",
169 (
"MPI_File_open",
"info"):
"MPI_Info",
170 (
"MPI_File_preallocate",
"fh"):
"MPI_File",
171 (
"MPI_File_read",
"fh"):
"MPI_File",
172 (
"MPI_File_read",
"datatype"):
"MPI_Datatype",
173 (
"MPI_File_read_all",
"fh"):
"MPI_File",
174 (
"MPI_File_read_all",
"datatype"):
"MPI_Datatype",
175 (
"MPI_File_read_at",
"fh"):
"MPI_File",
176 (
"MPI_File_read_at",
"datatype"):
"MPI_Datatype",
177 (
"MPI_File_seek",
"fh"):
"MPI_File",
178 (
"MPI_File_set_view",
"fh"):
"MPI_File",
179 (
"MPI_File_set_view",
"etype"):
"MPI_Datatype",
180 (
"MPI_File_set_view",
"filetype"):
"MPI_Datatype",
181 (
"MPI_File_set_view",
"info"):
"MPI_Info",
182 (
"MPI_File_write",
"fh"):
"MPI_File",
183 (
"MPI_File_write",
"datatype"):
"MPI_Datatype",
184 (
"MPI_File_write_all",
"fh"):
"MPI_File",
185 (
"MPI_File_write_all",
"datatype"):
"MPI_Datatype",
186 (
"MPI_File_write_at",
"fh"):
"MPI_File",
187 (
"MPI_File_write_at",
"datatype"):
"MPI_Datatype",
188 (
"MPI_Gather",
"comm"):
"MPI_Comm",
189 (
"MPI_Gather",
"recvtype"):
"MPI_Datatype",
190 (
"MPI_Gather",
"sendtype"):
"MPI_Datatype",
191 (
"MPI_Gatherv",
"comm"):
"MPI_Comm",
192 (
"MPI_Gatherv",
"recvtype"):
"MPI_Datatype",
193 (
"MPI_Gatherv",
"sendtype"):
"MPI_Datatype",
194 (
"MPI_Get",
"origin_datatype"):
"MPI_Datatype",
195 (
"MPI_Get",
"target_datatype"):
"MPI_Datatype",
196 (
"MPI_Get",
"win"):
"MPI_Win",
197 (
"MPI_Get_count",
"datatype"):
"MPI_Datatype",
198 (
"MPI_Get_elements",
"datatype"):
"MPI_Datatype",
199 (
"MPI_Graph_create",
"comm_old"):
"MPI_Comm",
200 (
"MPI_Graph_get",
"comm"):
"MPI_Comm",
201 (
"MPI_Graph_map",
"comm_old"):
"MPI_Comm",
202 (
"MPI_Graph_neighbors",
"comm"):
"MPI_Comm",
203 (
"MPI_Graph_neighbors_count",
"comm"):
"MPI_Comm",
204 (
"MPI_Graphdims_get",
"comm"):
"MPI_Comm",
205 (
"MPI_Group_compare",
"group1"):
"MPI_Group",
206 (
"MPI_Group_compare",
"group2"):
"MPI_Group",
207 (
"MPI_Group_difference",
"group1"):
"MPI_Group",
208 (
"MPI_Group_difference",
"group2"):
"MPI_Group",
209 (
"MPI_Group_excl",
"group"):
"MPI_Group",
210 (
"MPI_Group_free",
"group"):
"MPI_Group",
211 (
"MPI_Group_incl",
"group"):
"MPI_Group",
212 (
"MPI_Group_intersection",
"group1"):
"MPI_Group",
213 (
"MPI_Group_intersection",
"group2"):
"MPI_Group",
214 (
"MPI_Group_range_excl",
"group"):
"MPI_Group",
215 (
"MPI_Group_range_incl",
"group"):
"MPI_Group",
216 (
"MPI_Group_rank",
"group"):
"MPI_Group",
217 (
"MPI_Group_size",
"group"):
"MPI_Group",
218 (
"MPI_Group_translate_ranks",
"group_a"):
"MPI_Group",
219 (
"MPI_Group_translate_ranks",
"group_b"):
"MPI_Group",
220 (
"MPI_Group_union",
"group1"):
"MPI_Group",
221 (
"MPI_Group_union",
"group2"):
"MPI_Group",
222 (
"MPI_Ibsend",
"comm"):
"MPI_Comm",
223 (
"MPI_Ibsend",
"datatype"):
"MPI_Datatype",
224 (
"MPI_Intercomm_create",
"local_comm"):
"MPI_Comm",
225 (
"MPI_Intercomm_create",
"peer_comm"):
"MPI_Comm",
226 (
"MPI_Intercomm_merge",
"comm"):
"MPI_Comm",
227 (
"MPI_Iprobe",
"comm"):
"MPI_Comm",
228 (
"MPI_Irecv",
"comm"):
"MPI_Comm",
229 (
"MPI_Irecv",
"datatype"):
"MPI_Datatype",
230 (
"MPI_Irsend",
"comm"):
"MPI_Comm",
231 (
"MPI_Irsend",
"datatype"):
"MPI_Datatype",
232 (
"MPI_Isend",
"comm"):
"MPI_Comm",
233 (
"MPI_Isend",
"datatype"):
"MPI_Datatype",
234 (
"MPI_Issend",
"comm"):
"MPI_Comm",
235 (
"MPI_Issend",
"datatype"):
"MPI_Datatype",
236 (
"MPI_Pack",
"comm"):
"MPI_Comm",
237 (
"MPI_Pack",
"datatype"):
"MPI_Datatype",
238 (
"MPI_Pack_size",
"comm"):
"MPI_Comm",
239 (
"MPI_Pack_size",
"datatype"):
"MPI_Datatype",
240 (
"MPI_Probe",
"comm"):
"MPI_Comm",
241 (
"MPI_Put",
"origin_datatype"):
"MPI_Datatype",
242 (
"MPI_Put",
"target_datatype"):
"MPI_Datatype",
243 (
"MPI_Put",
"win"):
"MPI_Win",
244 (
"MPI_Recv",
"comm"):
"MPI_Comm",
245 (
"MPI_Recv",
"datatype"):
"MPI_Datatype",
246 (
"MPI_Recv_init",
"comm"):
"MPI_Comm",
247 (
"MPI_Recv_init",
"datatype"):
"MPI_Datatype",
248 (
"MPI_Reduce",
"comm"):
"MPI_Comm",
249 (
"MPI_Reduce",
"datatype"):
"MPI_Datatype",
250 (
"MPI_Reduce",
"op"):
"MPI_Op",
251 (
"MPI_Reduce_scatter",
"comm"):
"MPI_Comm",
252 (
"MPI_Reduce_scatter",
"datatype"):
"MPI_Datatype",
253 (
"MPI_Reduce_scatter",
"op"):
"MPI_Op",
254 (
"MPI_Request_free",
"request"):
"MPI_Request",
255 (
"MPI_Rsend",
"comm"):
"MPI_Comm",
256 (
"MPI_Rsend",
"datatype"):
"MPI_Datatype",
257 (
"MPI_Rsend_init",
"comm"):
"MPI_Comm",
258 (
"MPI_Rsend_init",
"datatype"):
"MPI_Datatype",
259 (
"MPI_Scan",
"comm"):
"MPI_Comm",
260 (
"MPI_Scan",
"op"):
"MPI_Op",
261 (
"MPI_Scan",
"datatype"):
"MPI_Datatype",
262 (
"MPI_Scatter",
"comm"):
"MPI_Comm",
263 (
"MPI_Scatter",
"recvtype"):
"MPI_Datatype",
264 (
"MPI_Scatter",
"sendtype"):
"MPI_Datatype",
265 (
"MPI_Scatterv",
"comm"):
"MPI_Comm",
266 (
"MPI_Scatterv",
"recvtype"):
"MPI_Datatype",
267 (
"MPI_Scatterv",
"sendtype"):
"MPI_Datatype",
268 (
"MPI_Send",
"comm"):
"MPI_Comm",
269 (
"MPI_Send",
"datatype"):
"MPI_Datatype",
270 (
"MPI_Send_init",
"comm"):
"MPI_Comm",
271 (
"MPI_Send_init",
"datatype"):
"MPI_Datatype",
272 (
"MPI_Sendrecv",
"comm"):
"MPI_Comm",
273 (
"MPI_Sendrecv",
"recvtag"):
"MPI_Datatype",
274 (
"MPI_Sendrecv",
"recvtype"):
"MPI_Datatype",
275 (
"MPI_Sendrecv",
"sendtype"):
"MPI_Datatype",
276 (
"MPI_Sendrecv_replace",
"comm"):
"MPI_Comm",
277 (
"MPI_Sendrecv_replace",
"datatype"):
"MPI_Datatype",
278 (
"MPI_Ssend",
"comm"):
"MPI_Comm",
279 (
"MPI_Ssend",
"datatype"):
"MPI_Datatype",
280 (
"MPI_Ssend_init",
"comm"):
"MPI_Comm",
281 (
"MPI_Ssend_init",
"datatype"):
"MPI_Datatype",
282 (
"MPI_Start",
"request"):
"MPI_Request",
283 (
"MPI_Startall",
"array_of_requests"):
"MPI_Request",
284 (
"MPI_Test",
"request"):
"MPI_Request",
285 (
"MPI_Testall",
"array_of_requests"):
"MPI_Request",
286 (
"MPI_Testany",
"array_of_requests"):
"MPI_Request",
287 (
"MPI_Testsome",
"array_of_requests"):
"MPI_Request",
288 (
"MPI_Topo_test",
"comm"):
"MPI_Comm",
289 (
"MPI_Type_commit",
"datatype"):
"MPI_Datatype",
290 (
"MPI_Type_contiguous",
"oldtype"):
"MPI_Datatype",
291 (
"MPI_Type_extent",
"datatype"):
"MPI_Datatype",
292 (
"MPI_Type_free",
"datatype"):
"MPI_Datatype",
293 (
"MPI_Type_get_contents",
"datatype"):
"MPI_Datatype",
294 (
"MPI_Type_get_envelope",
"datatype"):
"MPI_Datatype",
295 (
"MPI_Type_hindexed",
"oldtype"):
"MPI_Datatype",
296 (
"MPI_Type_hvector",
"oldtype"):
"MPI_Datatype",
297 (
"MPI_Type_indexed",
"oldtype"):
"MPI_Datatype",
298 (
"MPI_Type_lb",
"datatype"):
"MPI_Datatype",
299 (
"MPI_Type_size",
"datatype"):
"MPI_Datatype",
300 (
"MPI_Type_struct",
"array_of_types"):
"MPI_Datatype",
301 (
"MPI_Type_ub",
"datatype"):
"MPI_Datatype",
302 (
"MPI_Type_vector",
"oldtype"):
"MPI_Datatype",
303 (
"MPI_Unpack",
"comm"):
"MPI_Comm",
304 (
"MPI_Unpack",
"datatype"):
"MPI_Datatype",
305 (
"MPI_Wait",
"request"):
"MPI_Request",
306 (
"MPI_Waitall",
"array_of_requests"):
"MPI_Request",
307 (
"MPI_Waitany",
"array_of_requests"):
"MPI_Request",
308 (
"MPI_Waitsome",
"array_of_requests"):
"MPI_Request",
309 (
"MPI_Win_complete",
"win"):
"MPI_Win",
310 (
"MPI_Win_create",
"info"):
"MPI_Info",
311 (
"MPI_Win_create",
"comm"):
"MPI_Comm",
312 (
"MPI_Win_create",
"win"):
"MPI_Win",
313 (
"MPI_Win_fence",
"win"):
"MPI_Win",
314 (
"MPI_Win_free",
"win"):
"MPI_Win",
315 (
"MPI_Win_get_group",
"win"):
"MPI_Win",
316 (
"MPI_Win_get_group",
"group"):
"MPI_Group",
317 (
"MPI_Win_lock",
"win"):
"MPI_Win",
318 (
"MPI_Win_post",
"group"):
"MPI_Group",
319 (
"MPI_Win_post",
"win"):
"MPI_Win",
320 (
"MPI_Win_start",
"group"):
"MPI_Group",
321 (
"MPI_Win_start",
"win"):
"MPI_Win",
322 (
"MPI_Win_test",
"win"):
"MPI_Win",
323 (
"MPI_Win_unlock",
"win"):
"MPI_Win",
324 (
"MPI_Win_wait",
"win"):
"MPI_Win" 328 (
"MPI_Bsend_init",
"request"):
"MPI_Request",
329 (
"MPI_Cart_create",
"comm_cart"):
"MPI_Comm",
330 (
"MPI_Cart_sub",
"comm_new"):
"MPI_Comm",
331 (
"MPI_Comm_create",
"comm_out"):
"MPI_Comm",
332 (
"MPI_Comm_dup",
"comm_out"):
"MPI_Comm",
333 (
"MPI_Comm_free",
"commp"):
"MPI_Comm",
334 (
"MPI_Comm_group",
"group"):
"MPI_Group",
335 (
"MPI_Comm_remote_group",
"group"):
"MPI_Group",
336 (
"MPI_Comm_split",
"comm_out"):
"MPI_Comm",
337 (
"MPI_File_close",
"fh"):
"MPI_File",
338 (
"MPI_File_open",
"fh"):
"MPI_File",
339 (
"MPI_Graph_create",
"comm_graph"):
"MPI_Comm",
340 (
"MPI_Group_difference",
"group_out"):
"MPI_Group",
341 (
"MPI_Group_excl",
"newgroup"):
"MPI_Group",
342 (
"MPI_Group_free",
"group"):
"MPI_Group",
343 (
"MPI_Group_incl",
"group_out"):
"MPI_Group",
344 (
"MPI_Group_intersection",
"group_out"):
"MPI_Group",
345 (
"MPI_Group_range_excl",
"newgroup"):
"MPI_Group",
346 (
"MPI_Group_range_incl",
"newgroup"):
"MPI_Group",
347 (
"MPI_Group_union",
"group_out"):
"MPI_Group",
348 (
"MPI_Ibsend",
"request"):
"MPI_Request",
349 (
"MPI_Intercomm_create",
"comm_out"):
"MPI_Comm",
350 (
"MPI_Intercomm_merge",
"comm_out"):
"MPI_Comm",
351 (
"MPI_Irecv",
"request"):
"MPI_Request",
352 (
"MPI_Irsend",
"request"):
"MPI_Request",
353 (
"MPI_Isend",
"request"):
"MPI_Request",
354 (
"MPI_Issend",
"request"):
"MPI_Request",
355 (
"MPI_Op_create",
"op"):
"MPI_Op",
356 (
"MPI_Recv_init",
"request"):
"MPI_Request",
357 (
"MPI_Request_free",
"request"):
"MPI_Request",
358 (
"MPI_Rsend_init",
"request"):
"MPI_Request",
359 (
"MPI_Send_init",
"request"):
"MPI_Request",
360 (
"MPI_Ssend_init",
"request"):
"MPI_Request",
361 (
"MPI_Start",
"request"):
"MPI_Request",
362 (
"MPI_Startall",
"array_of_requests"):
"MPI_Request",
363 (
"MPI_Test",
"request"):
"MPI_Request",
364 (
"MPI_Testall",
"array_of_requests"):
"MPI_Request",
365 (
"MPI_Testany",
"array_of_requests"):
"MPI_Request",
366 (
"MPI_Testsome",
"array_of_requests"):
"MPI_Request",
367 (
"MPI_Type_commit",
"datatype"):
"MPI_Datatype",
368 (
"MPI_Type_contiguous",
"newtype"):
"MPI_Datatype",
369 (
"MPI_Type_free",
"datatype"):
"MPI_Datatype",
370 (
"MPI_Type_get_contents",
"array_of_datatypes"):
"MPI_Datatype",
371 (
"MPI_Type_hindexed",
"newtype"):
"MPI_Datatype",
372 (
"MPI_Type_hvector",
"newtype"):
"MPI_Datatype",
373 (
"MPI_Type_indexed",
"newtype"):
"MPI_Datatype",
374 (
"MPI_Type_struct",
"newtype"):
"MPI_Datatype",
375 (
"MPI_Type_vector",
"newtype"):
"MPI_Datatype",
376 (
"MPI_Wait",
"request"):
"MPI_Request",
377 (
"MPI_Waitall",
"array_of_requests"):
"MPI_Request",
378 (
"MPI_Waitany",
"array_of_requests"):
"MPI_Request",
379 (
"MPI_Waitsome",
"array_of_requests"):
"MPI_Request" 382 incrementFortranIndexDict = {
383 (
"MPI_Testany"): (
"*index", 1),
384 (
"MPI_Testsome"): (
"array_of_indices",
"*count"),
385 (
"MPI_Waitany"): (
"*index", 1),
386 (
"MPI_Waitsome"): (
"array_of_indices",
"*count")
389 xlateFortranArrayExceptions = {
390 (
"MPI_Testany",
"array_of_requests"): (
"index"),
391 (
"MPI_Waitany",
"array_of_requests"): (
"index")
396 def __init__ (self,name, basetype, pointerLevel, arrayLevel):
397 "initialize a new variable description structure" 405 def __init__ (self,name, id, returntype, paramList, paramStr, protoline):
406 "initialize a new function declaration structure" 431 "initialize a new Fortran translation structure" 437 tokens = string.split(line)
438 if tokens[0] ==
"nowrapper":
439 fdict[lastFunction].nowrapper = 1
440 elif tokens[0] ==
"extrafield":
441 fdict[lastFunction].extrafieldsList.append(tokens[2])
442 fdict[lastFunction].extrafields[tokens[2]] = tokens[1]
444 print "Warning: ",lastFunction,
" unknown directive [",string.strip(line),
"]" 449 fdict[lastFunction].wrapperPreList.append(line)
454 fdict[lastFunction].wrapperPostList.append(line)
461 print "\tParams\t",fdict[i].paramList
462 if fdict[i].wrapperPreList:
463 print "\tpre\t", fdict[i].wrapperPreList
464 if fdict[i].wrapperPostList:
465 print "\tpost\t", fdict[i].wrapperPostList
475 basetype = fdict[funct].paramDict[param].basetype
476 pointerLevel = fdict[funct].paramDict[param].pointerLevel
477 arrayLevel = fdict[funct].paramDict[param].arrayLevel
479 simplePointer = (pointerLevel == 1)
and (arrayLevel == 0)
481 if basetype ==
"MPI_Request" and simplePointer:
483 elif basetype ==
"MPI_Comm" and simplePointer:
485 elif basetype ==
"MPI_Datatype" and simplePointer:
487 elif basetype ==
"MPI_Group" and simplePointer:
489 elif basetype ==
"MPI_Info" and simplePointer:
491 elif basetype ==
"int" and simplePointer:
508 for p
in fdict[fname].paramList:
512 pointerLevel = string.count(p,
"*")
513 arrayLevel = string.count(p,
"[")
514 if (pointerLevel > 0)
and (arrayLevel > 0):
516 pname = p[string.rfind(p,
"*")+1:string.find(p,
"[")]
517 basetype = p[0:string.find(p,
"*")]
518 elif pointerLevel > 0:
520 pname = p[string.rfind(p,
"*")+1:len(p)]
521 basetype = p[0:string.find(p,
"*")]
524 pname = p[string.find(p,
" "):string.find(p,
"[")]
525 basetype = p[0:string.find(p,
" ")]
528 tokens = string.split(p)
534 pname = string.strip(tokens[1])
535 basetype = string.strip(tokens[0])
537 pname = string.strip(pname)
538 basetype = string.strip(basetype)
539 fdict[fname].paramDict[pname] =
VarDesc(pname,basetype,pointerLevel,arrayLevel)
540 fdict[fname].paramConciseList.append(pname)
543 if messParamDict.has_key((fname,pname)):
544 paramMessType = messParamDict[(fname,pname)]
545 if paramMessType == 1:
546 fdict[fname].sendCountPname = pname
547 elif paramMessType == 2:
548 fdict[fname].sendTypePname = pname
549 elif paramMessType == 3:
550 fdict[fname].recvCountPname = pname
551 elif paramMessType == 4:
552 fdict[fname].recvTypePname = pname
555 if ioParamDict.has_key((fname,pname)):
556 paramMessType = ioParamDict[(fname,pname)]
557 if paramMessType == 1:
558 fdict[fname].ioCountPname = pname
559 elif paramMessType == 2:
560 fdict[fname].ioTypePname = pname
563 if rmaParamDict.has_key((fname,pname)):
564 paramMessType = rmaParamDict[(fname,pname)]
565 if paramMessType == 1:
566 fdict[fname].rmaCountPname = pname
567 elif paramMessType == 2:
568 fdict[fname].rmaTypePname = pname
570 if (fdict[fname].paramDict[pname].pointerLevel == 0) \
571 and (fdict[fname].paramDict[pname].arrayLevel == 0) \
572 and (fdict[fname].paramDict[pname].basetype !=
"void"):
573 fdict[fname].paramDict[pname].recordIt = 1
575 fdict[fname].paramDict[pname].recordIt = 1
581 print "\t",pname, basetype, pointerLevel, arrayLevel
590 p_directives =
"directives" 591 p_wrapper_pre =
"wrapper_pre" 592 p_wrapper_post =
"wrapper_post" 593 parserState = p_start
600 print "-----*----- Parsing input file:",f
603 rawline = f.readline()
607 line = re.sub(
"\@.*$",
"",rawline)
610 tokens = string.split(line)
615 if (string.find(line,
"(") != -1) \
616 and (string.find(line,
")") != -1) \
617 and (string.find(line,
"MPI_") != -1) \
618 and parserState == p_start:
622 lparen = string.index(line,
"(")
623 rparen = string.index(line,
")")
624 paramstr = line[lparen+1:rparen]
625 paramList = map(string.strip,string.split(paramstr,
","))
627 fdict[name] =
fdecl(name, fcounter, retype, paramList, paramstr, line)
634 if tokens[0] ==
"directives" and parserState != p_directives:
636 parserState = p_directives
637 elif tokens[0] ==
"directives" and parserState == p_directives:
639 parserState = p_start
640 elif parserState == p_directives:
645 elif tokens[0] ==
"wrapper_pre" and parserState != p_wrapper_pre:
647 parserState = p_wrapper_pre
648 elif tokens[0] ==
"wrapper_pre" and parserState == p_wrapper_pre:
650 parserState = p_start
651 elif parserState == p_wrapper_pre:
656 elif tokens[0] ==
"wrapper_post" and parserState != p_wrapper_post:
658 parserState = p_wrapper_post
659 elif tokens[0] ==
"wrapper_post" and parserState == p_wrapper_post:
661 parserState = p_start
662 elif parserState == p_wrapper_post:
668 print "Unknown input line ",cnt,
":", line,
674 fdict[f].id = fcounter
675 if f
not in noDefineList:
676 fcounter = fcounter + 1
677 print "-----*----- Parsing completed: ", len(fdict),
" functions found." 685 olist.append(
"/* " + fname +
" */\n")
686 olist.append(
"/* DO NOT EDIT -- AUTOMATICALLY GENERATED! */\n")
687 olist.append(
"/* Timestamp: " + time.strftime(
"%d %B %Y %H:%M", time.localtime(time.time())) +
" */\n")
688 olist.append(
"/* Location: " + socket.gethostname () +
" " + os.name +
" */\n")
689 olist.append(
"/* Creator: " + os.environ[
"LOGNAME"] +
" */\n")
717 print "-----*----- Generating structure files" 720 sname = cwd +
"/mpiPi_def.h" 725 olist.append(
"#define mpiPi_BASE " + str(baseID) +
"\n")
729 if funct
not in noDefineList:
730 olist.append(
"#define mpiPi_" + funct +
" " + str(fdict[funct].id) +
"\n")
732 olist.append(
"\n\n/* eof */\n")
744 print "-----*----- Generating the lookup table" 747 sname = cwd +
"/lookup.c" 751 olist.append(
"#include \"mpiPi.h\"\n")
752 olist.append(
"#include \"mpiPi_def.h\"\n")
756 olist.append(
"mpiPi_lookup_t mpiPi_lookup [] = {\n")
760 if funct
not in noDefineList:
761 if counter < len(flist) \
764 olist.append(
"\t{ mpiPi_" + funct)
765 olist.append(
", \"" + funct +
"\"")
767 counter = counter + 1
769 olist.append(
",\n\t{0,NULL}};\n")
772 olist.append(
"/* eof */\n")
785 if fdict[funct].nowrapper:
789 print "Wrapping ",funct
791 olist.append(
"\n\n\n/* --------------- " + funct +
" --------------- */\n" )
796 olist.append(
"\n\n" + fdict[funct].returntype +
" HPCRUN_MPI_WRAP(" 797 + fdict[funct].name +
") (" + fdict[funct].paramStr +
"){" )
798 if fdict[funct].wrapperPreList:
799 olist.extend(fdict[funct].wrapperPreList)
801 if ((fdict[funct].sendCountPname !=
"")
or (fdict[funct].recvCountPname !=
"")):
802 buffcount = fdict[funct].sendCountPname
803 bufftype = fdict[funct].sendTypePname
805 if (fdict[funct].sendCountPname ==
""):
806 buffcount = fdict[funct].recvCountPname
807 bufftype = fdict[funct].recvTypePname
810 +
"if ( " + fdict[funct].sendTypePname +
" != MPI_DATATYPE_NULL ) {\n" 811 +
" hpmpi_store_metric(Get_Msg_size(" +buffcount+
", "+ bufftype +
") );\n" 812 +
"} else {\n TMSG(MPI,\"MPI_DATATYPE_NULL encountered. MPI_IN_PLACE not supported.\\n\");\n" 813 +
" TMSG(MPI,\"Values for %s may be invalid.\\n\", &(__func__)[7]);\n}\n")
815 olist.append(
"\nreturn P" + funct +
"( " )
817 for i
in fdict[funct].paramConciseList:
818 if (fdict[funct].paramDict[i].pointerLevel == 0) \
819 and (fdict[funct].paramDict[i].arrayLevel == 0) \
820 and (fdict[funct].paramDict[i].basetype !=
"void"):
821 olist.append(
" " + i)
822 elif (fdict[funct].paramDict[i].pointerLevel > 0):
824 elif (fdict[funct].paramDict[i].arrayLevel > 0):
827 print "Warning: passing on arg",i,
"in",funct
828 if fdict[funct].paramConciseList.index(i) < len(fdict[funct].paramConciseList) - 1:
831 olist.append(
" );\n\n" )
832 olist.append(
"}" +
" /* " + funct +
" */\n")
840 olist.append(
"\n\nvoid " +
"F77_" + string.upper(funct) +
"(" )
869 xlateTargetTypes = [
"MPI_Comm",
"MPI_Datatype",
"MPI_File",
"MPI_Group",
"MPI_Info",
"MPI_Op",
"MPI_Request" ]
875 for i
in fdict[funct].paramConciseList:
877 if ( doOpaqueXlate
is True and fdict[funct].paramDict[i].basetype
in xlateTargetTypes ) :
880 if (
not ( opaqueInArgDict.has_key((funct, i))
or opaqueOutArgDict.has_key((funct, i)) ) ):
881 print "*** Failed to find translation information for " + funct +
":" + i +
"\n" 885 currBasetype =
"MPI_Fint" 888 xlateTypes.append(fdict[funct].paramDict[i].basetype)
889 xlateVarNames.append(i)
893 if ( xlateVarNames[xlateCount].count(
"array") > 0 ):
894 decl += xlateTypes[xlateCount] +
" *c_" + xlateVarNames[xlateCount] +
";\n";
896 decl += xlateTypes[xlateCount] +
" c_" + xlateVarNames[xlateCount] +
";\n";
901 currBasetype = fdict[funct].paramDict[i].basetype
904 olist.append(currBasetype +
' ')
906 if (fdict[funct].paramDict[i].pointerLevel == 0) \
907 and (fdict[funct].paramDict[i].arrayLevel == 0) \
908 and (fdict[funct].paramDict[i].basetype !=
"void"):
911 if (fdict[funct].paramDict[i].pointerLevel > 0):
912 for j
in xrange(1,fdict[funct].paramDict[i].pointerLevel+1):
917 if (fdict[funct].paramDict[i].arrayLevel > 0):
918 for x
in range(0, fdict[funct].paramDict[i].arrayLevel) :
920 for x
in range(0, fdict[funct].paramDict[i].arrayLevel) :
924 if fdict[funct].paramConciseList.index(i) < len(fdict[funct].paramConciseList) - 1:
928 olist.append(
" , MPI_Fint *ierr)")
932 if fdict[funct].wrapperPreList:
933 olist.extend(fdict[funct].wrapperPreList)
935 if (
'mips' in arch ) :
936 olist.append(
"void *saved_ret_addr = __builtin_return_address(0);\n")
938 if ( useSetJmp ==
True ) :
939 olist.append(
"setjmp (jbuf);\n\n")
942 for i
in range(len(xlateVarNames)) :
943 xlateVarName = xlateVarNames[i]
944 xlateType = xlateTypes[i]
948 if ( fdict[funct].paramConciseList.count(
"count") > 1 ):
949 print "*** Multiple arrays in 1 function!!!!\n";
951 if (
"incount" in fdict[funct].paramConciseList ):
952 countVar =
"incount";
953 elif (
"count" in fdict[funct].paramConciseList ):
956 countVar =
"max_integers" 958 if ( xlateVarName.count(
"array") > 0 ):
959 olist.append(
"c_" + xlateVarName +
" = (" + xlateType +
"*)malloc(sizeof(" + xlateType +
")*(*" + countVar +
"));\n")
960 olist.append(
"if ( c_" + xlateVarName +
" == NULL ) mpiPi_abort(\"Failed to allocate memory in " \
962 freelist.append(
"c_"+xlateVarName)
966 for i
in range(len(xlateVarNames)) :
969 xlateVarName = xlateVarNames[i]
970 xlateType = xlateTypes[i]
973 if ( opaqueInArgDict.has_key((funct, xlateVarName)) \
974 and opaqueInArgDict[(funct, xlateVarName)] == xlateType ) :
978 if ( xlateType ==
"MPI_Datatype" ):
979 xlateFuncType =
"MPI_Type" 981 xlateFuncType = xlateType
983 if ( xlateVarName.count(
"array") > 0 ):
984 olist.append(
"{\n int i; \n")
985 olist.append(
" for (i = 0; i < *" + countVar +
"; i++) { \n")
986 olist.append(
" c_" + xlateVarName +
"[i] = " + xlateFuncType +
"_f2c(" + xlateVarName +
"[i]);\n")
987 olist.append(
" }\n}\n")
989 olist.append(
"c_" + xlateVarName +
" = " + xlateFuncType +
"_f2c(*" + xlateVarName +
");\n")
994 olist.append(
"\nint rc = " + funct +
"( " )
998 for i
in fdict[funct].paramConciseList:
999 if ( i
in xlateVarNames
and 1000 ( opaqueInArgDict.has_key((funct, i))
or opaqueOutArgDict.has_key((funct, i))) ):
1001 if ( i.count(
"array") > 0 ):
1004 argname =
"&c_" + i;
1008 if (fdict[funct].paramDict[i].pointerLevel == 0) \
1009 and (fdict[funct].paramDict[i].arrayLevel == 0) \
1010 and (fdict[funct].paramDict[i].basetype !=
"void"):
1011 olist.append(
"*"+argname)
1012 elif (fdict[funct].paramDict[i].pointerLevel > 0):
1013 olist.append(argname)
1014 elif (fdict[funct].paramDict[i].arrayLevel > 0):
1015 olist.append(argname)
1019 if fdict[funct].paramConciseList.index(i) < len(fdict[funct].paramConciseList) - 1:
1022 olist.append(
" );\n")
1023 olist.append(
"*ierr = (MPI_Fint)rc;\n")
1029 for i
in range(len(xlateVarNames)) :
1031 xlateVarName = xlateVarNames[i]
1032 xlateType = xlateTypes[i]
1034 if ( opaqueOutArgDict.has_key((funct, xlateVarName)) \
1035 and opaqueOutArgDict[(funct, xlateVarName)] == xlateType ):
1039 if ( xlateType ==
"MPI_Datatype" ):
1040 xlateFuncType =
"MPI_Type" 1042 xlateFuncType = xlateType
1045 if ( xlateFortranArrayExceptions.has_key((funct, xlateVarName)) ) :
1046 xlateCode.append(xlateVarName +
"[*" + xlateFortranArrayExceptions[(funct,xlateVarName)] + \
1047 "] = " + xlateFuncType +
"_c2f(c_" + xlateVarName + \
1048 "[*" + xlateFortranArrayExceptions[(funct, xlateVarName)] +
"]);\n")
1049 elif ( xlateVarName.count(
"array") > 0 ):
1050 xlateCode.append(
"{\n int i; \n")
1051 xlateCode.append(
" for (i = 0; i < *" + countVar +
"; i++) { \n")
1052 xlateCode.append(
" " + xlateVarName +
"[i] = " + xlateFuncType +
"_c2f(c_" + xlateVarName +
"[i]);\n")
1053 xlateCode.append(
" }\n}\n")
1055 xlateCode.append(
"*" + xlateVarName +
" = " + xlateFuncType +
"_c2f(c_" + xlateVarName +
");\n")
1060 if incrementFortranIndexDict.has_key(funct) :
1061 if incrementFortranIndexDict[funct][1] == 1 :
1062 xlateCode.append(
"if ( " + incrementFortranIndexDict[funct][0] +
" >= 0 ) (" + incrementFortranIndexDict[funct][0] +
")++;\n")
1064 xlateCode.append(
"{ int i; for ( i = 0; i < " + incrementFortranIndexDict[funct][1] +
"; i++) " \
1065 + incrementFortranIndexDict[funct][0] +
"[i]++;}\n")
1068 olist.append(
"if ( rc == MPI_SUCCESS ) { \n")
1070 olist.extend(xlateCode)
1074 for freeSym
in freelist:
1075 olist.append(
"free("+freeSym+
");\n")
1077 olist.append(
"} /* " + string.lower(funct) +
" */\n")
1082 print " Wrapped " + funct
1089 global doWeakSymbols
1091 print "-----*----- Generating profiling wrappers" 1094 sname = cwd +
"/mpi-overrides.c" 1095 g = open(sname,
"w")
1097 olist.append(
"#include <assert.h>\n")
1098 olist.append(
"#include <ucontext.h>\n")
1099 olist.append(
"#include <stdlib.h>\n")
1100 olist.append(
"#include <unistd.h>\n")
1101 olist.append(
"#include <mpi.h>\n")
1102 olist.append(
"\n/**** local include files****/\n")
1103 olist.append(
"#include <messages/messages.h>\n")
1104 olist.append(
"#include <safe-sampling.h>\n")
1105 olist.append(
"#include <sample_event.h>\n")
1106 olist.append(
"#include <monitor-exts/monitor_ext.h>\n")
1107 olist.append(
"#include \"symbols.h\"\n")
1109 olist.append(
"\n/**** macros ****/\n")
1110 olist.append(
"\n#define HPCRUN_MPI_WRAP MONITOR_EXT_WRAP_NAME\n")
1112 olist.append(
"\n/**** external functions ****/\n")
1113 olist.append(
"\nextern int hpcrun_mpi_metric_id();\n")
1115 olist.append(
"\n/**** internal private functions ****/\n")
1116 olist.append(
"\nstatic inline int Get_Msg_size( int count, MPI_Datatype datatype ){\n")
1117 olist.append(
" int dsize;\n PMPI_Type_size( datatype, &dsize );\n return count * dsize;\n}\n");
1118 olist.append(
"\nstatic void hpmpi_store_metric(size_t bytes){\n");
1119 olist.append(
" ucontext_t uc;\n");
1120 olist.append(
" if (hpcrun_safe_enter()) {\n");
1121 olist.append(
" getcontext(&uc);\n");
1122 olist.append(
" sample_val_t sampleVal = hpcrun_sample_callpath(&uc, hpcrun_mpi_metric_id(), bytes, 0, 1);\n");
1123 olist.append(
" TMSG(MPI, \"sample: %p, bytes: %d\", sampleVal.sample_node, bytes);\n");
1124 olist.append(
" hpcrun_safe_exit();\n");
1125 olist.append(
" }\n");
1126 olist.append(
"}\n");
1132 olist.append(
"/* eof */\n")
1140 if fsymtp ==
'symbol':
1141 ofsym = string.lower(fsym)
1142 elif fsymtp ==
'symbol_':
1143 ofsym = string.lower(fsym) +
"_" 1144 elif fsymtp ==
'symbol__':
1145 ofsym = string.lower(fsym) +
"__" 1146 elif fsymtp ==
'SYMBOL':
1147 ofsym = string.upper(fsym)
1148 elif fsymtp ==
'SYMBOL_':
1149 ofsym = string.upper(fsym) +
"_" 1150 elif fsymtp ==
'SYMBOL__':
1151 ofsym = string.upper(fsym) +
"__" 1166 sname = cwd +
"/weak-symbols.h" 1167 g = open(sname,
"w")
1169 sname = cwd +
"/weak-symbols-special.h" 1170 s = open(sname,
"w")
1172 sname = cwd +
"/weak-symbols-pcontrol.h" 1173 p = open(sname,
"w")
1175 fmlist = [
'symbol',
'symbol_',
'symbol__',
'SYMBOL',
'SYMBOL_',
'SYMBOL__' ]
1176 if f77symbol
in fmlist :
1177 fmlist.remove(f77symbol)
1179 symflist = copy.deepcopy(flist)
1181 for funct
in symflist:
1186 if funct
in [
'MPI_Init',
'MPI_Init_thread',
'MPI_Finalize'] :
1187 s.write(
"#pragma weak " + wfunc +
" = " + dfunc +
"\n")
1188 elif 'Pcontrol' in funct :
1189 p.write(
"#pragma weak " + wfunc +
" = " + dfunc +
"\n")
1190 elif fdict[funct].nowrapper == 0 :
1191 g.write(
"#pragma weak " + wfunc +
" = " + dfunc +
"\n")
1204 sname = cwd +
"/symbols.h" 1206 symflist = copy.deepcopy(flist)
1207 symflist.append(
'mpipi_get_fortran_argc')
1208 symflist.append(
'mpipi_get_fortran_arg')
1210 g = open(sname,
"w")
1211 for funct
in symflist:
1212 if f77symbol ==
'symbol':
1213 f77funct = string.lower(funct)
1214 elif f77symbol ==
'symbol_':
1215 f77funct = string.lower(funct) +
"_" 1216 elif f77symbol ==
'symbol__':
1217 f77funct = string.lower(funct) +
"__" 1218 elif f77symbol ==
'SYMBOL':
1219 f77funct = string.upper(funct)
1220 elif f77symbol ==
'SYMBOL_':
1221 f77funct = string.upper(funct) +
"_" 1222 elif f77symbol ==
'SYMBOL__':
1223 f77funct = string.upper(funct) +
"__" 1225 f77funct = string.lower(funct)
1227 g.write(
"#define F77_" + string.upper(funct) +
" " + f77funct +
"\n")
1235 global doOpaqueXlate
1237 global doWeakSymbols
1240 opts, pargs = getopt.getopt(sys.argv[1:],
'', [
'f77symbol=',
'xlate',
'arch=',
'weak',
'usesetjmp'])
1242 print "MPI Wrapper Generator ($Revision: 442 $)" 1246 f77symbol =
'symbol' 1247 doOpaqueXlate =
False 1248 doWeakSymbols =
False 1253 print "o: ",o,
" a: ",a
1254 if o ==
'--f77symbol':
1257 doOpaqueXlate =
True 1259 doWeakSymbols =
True 1262 if o ==
'--usesetjmp':
1273 print "-----*----- Beginning parameter optimization" 1279 if doWeakSymbols ==
True :
def CreateWrapper(funct, olist)
Create a MPI wrapper for one function using the information in the function dict. ...
def __init__(self, name, id, returntype, paramList, paramStr, protoline)
def GenerateStructureFile()
Create the structure files.
def ProcessWrapperPreLine(lastFunction, line)
def StandardFileHeader(fname)
create a standard file header and return the init list
def __init__(self, name, basetype, pointerLevel, arrayLevel)
def ProcessWrapperPostLine(lastFunction, line)
def ProcessDirectiveLine(lastFunction, line)
def GenerateLookup()
Generate a lookup table where mpiP can grab variables and function pointers.
def GenerateWeakSymbols()
def ParamDictUpdate(fname)
ParamDictUpdate - updates the datastructures for a function after the basics have been entered...
def ReadInputFile(f)
Parses the input file and loads the information into the function dict.
def GetFortranSymbol(fsymtp, fsym)
def SpecialParamRecord(funct, param)
Some MPI types we want to record.
def ParameterOptimization()
Scan the lists of all functions and look for optimization opportunities (in space/speed).
def __init__(self, mpiType, varName)