1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 /*
3  *  (C) 2001 by Argonne National Laboratory.
4  *      See COPYRIGHT in top-level directory.
5  */
6 /* This file replaces all MPI function names with their PMPI equivalents.
7    PMPI versions are used by default so that the user can profile
8    application code without interference from MPI functions used by
9    MPI-IO. */
10 
11 #ifndef USE_MPI_VERSIONS
12 
13 #undef MPI_Abort
14 #define MPI_Abort PMPI_Abort
15 #undef MPI_Allgather
16 #define MPI_Allgather PMPI_Allgather
17 #undef MPI_Allgatherv
18 #define MPI_Allgatherv PMPI_Allgatherv
19 #undef MPI_Allreduce
20 #define MPI_Allreduce PMPI_Allreduce
21 #undef MPI_Alltoall
22 #define MPI_Alltoall PMPI_Alltoall
23 #undef MPI_Alltoallv
24 #define MPI_Alltoallv PMPI_Alltoallv
25 #undef MPI_Alltoallw
26 #define MPI_Alltoallw PMPI_Alltoallw
27 #undef MPI_Attr_delete
28 #define MPI_Attr_delete PMPI_Attr_delete
29 #undef MPI_Attr_get
30 #define MPI_Attr_get PMPI_Attr_get
31 #undef MPI_Barrier
32 #define MPI_Barrier PMPI_Barrier
33 #undef MPI_Bcast
34 #define MPI_Bcast PMPI_Bcast
35 #undef MPI_Bsend
36 #define MPI_Bsend PMPI_Bsend
37 #undef MPI_Bsend_init
38 #define MPI_Bsend_init PMPI_Bsend_init
39 #undef MPI_Buffer_attach
40 #define MPI_Buffer_attach PMPI_Buffer_attach
41 #undef MPI_Buffer_detach
42 #define MPI_Buffer_detach PMPI_Buffer_detach
43 #undef MPI_Cancel
44 #define MPI_Cancel PMPI_Cancel
45 #undef MPI_Cart_coords
46 #define MPI_Cart_coords PMPI_Cart_coords
47 #undef MPI_Cart_create
48 #define MPI_Cart_create PMPI_Cart_create
49 #undef MPI_Cart_get
50 #define MPI_Cart_get PMPI_Cart_get
51 #undef MPI_Cart_map
52 #define MPI_Cart_map PMPI_Cart_map
53 #undef MPI_Cart_rank
54 #define MPI_Cart_rank PMPI_Cart_rank
55 #undef MPI_Cart_shift
56 #define MPI_Cart_shift PMPI_Cart_shift
57 #undef MPI_Cart_sub
58 #define MPI_Cart_sub PMPI_Cart_sub
59 #undef MPI_Cartdim_get
60 #define MPI_Cartdim_get PMPI_Cartdim_get
61 #undef MPI_Comm_call_errhandler
62 #define MPI_Comm_call_errhandler PMPI_Comm_call_errhandler
63 #undef MPI_Comm_compare
64 #define MPI_Comm_compare PMPI_Comm_compare
65 #undef MPI_Comm_create
66 #define MPI_Comm_create PMPI_Comm_create
67 #undef MPI_Comm_create_keyval
68 #define MPI_Comm_create_keyval PMPI_Comm_create_keyval
69 #undef MPI_Comm_dup
70 #define MPI_Comm_dup PMPI_Comm_dup
71 #undef MPI_Comm_free
72 #define MPI_Comm_free PMPI_Comm_free
73 #undef MPI_Comm_free_keyval
74 #define MPI_Comm_free_keyval PMPI_Comm_free_keyval
75 #undef MPI_Comm_group
76 #define MPI_Comm_group PMPI_Comm_group
77 #undef MPI_Comm_rank
78 #define MPI_Comm_rank PMPI_Comm_rank
79 #undef MPI_Comm_remote_group
80 #define MPI_Comm_remote_group PMPI_Comm_remote_group
81 #undef MPI_Comm_remote_size
82 #define MPI_Comm_remote_size PMPI_Comm_remote_size
83 #undef MPI_Comm_set_attr
84 #define MPI_Comm_set_attr PMPI_Comm_set_attr
85 #undef MPI_Comm_size
86 #define MPI_Comm_size PMPI_Comm_size
87 #undef MPI_Comm_split
88 #define MPI_Comm_split PMPI_Comm_split
89 #undef MPI_Comm_test_inter
90 #define MPI_Comm_test_inter PMPI_Comm_test_inter
91 #undef MPI_Dims_create
92 #define MPI_Dims_create PMPI_Dims_create
93 #undef MPI_Errhandler_create
94 #define MPI_Errhandler_create PMPI_Errhandler_create
95 #undef MPI_Errhandler_free
96 #define MPI_Errhandler_free PMPI_Errhandler_free
97 #undef MPI_Errhandler_get
98 #define MPI_Errhandler_get PMPI_Errhandler_get
99 #undef MPI_Errhandler_set
100 #define MPI_Errhandler_set PMPI_Errhandler_set
101 #undef MPI_Error_class
102 #define MPI_Error_class PMPI_Error_class
103 #undef MPI_Error_string
104 #define MPI_Error_string PMPI_Error_string
105 #undef MPI_Finalize
106 #define MPI_Finalize PMPI_Finalize
107 #undef MPI_Gather
108 #define MPI_Gather PMPI_Gather
109 #undef MPI_Gatherv
110 #define MPI_Gatherv PMPI_Gatherv
111 #undef MPI_Get_address
112 #define MPI_Get_address PMPI_Get_address
113 #undef MPI_Get_count
114 #define MPI_Get_count PMPI_Get_count
115 #undef MPI_Get_elements
116 #define MPI_Get_elements PMPI_Get_elements
117 #undef MPI_Get_processor_name
118 #define MPI_Get_processor_name PMPI_Get_processor_name
119 #undef MPI_Get_version
120 #define MPI_Get_version PMPI_Get_version
121 #undef MPI_Graph_create
122 #define MPI_Graph_create PMPI_Graph_create
123 #undef MPI_Graph_get
124 #define MPI_Graph_get PMPI_Graph_get
125 #undef MPI_Graph_map
126 #define MPI_Graph_map PMPI_Graph_map
127 #undef MPI_Graph_neighbors
128 #define MPI_Graph_neighbors PMPI_Graph_neighbors
129 #undef MPI_Graph_neighbors_count
130 #define MPI_Graph_neighbors_count PMPI_Graph_neighbors_count
131 #undef MPI_Graphdims_get
132 #define MPI_Graphdims_get PMPI_Graphdims_get
133 #undef MPI_Group_compare
134 #define MPI_Group_compare PMPI_Group_compare
135 #undef MPI_Group_difference
136 #define MPI_Group_difference PMPI_Group_difference
137 #undef MPI_Group_excl
138 #define MPI_Group_excl PMPI_Group_excl
139 #undef MPI_Group_free
140 #define MPI_Group_free PMPI_Group_free
141 #undef MPI_Group_incl
142 #define MPI_Group_incl PMPI_Group_incl
143 #undef MPI_Group_intersection
144 #define MPI_Group_intersection PMPI_Group_intersection
145 #undef MPI_Group_range_excl
146 #define MPI_Group_range_excl PMPI_Group_range_excl
147 #undef MPI_Group_range_incl
148 #define MPI_Group_range_incl PMPI_Group_range_incl
149 #undef MPI_Group_rank
150 #define MPI_Group_rank PMPI_Group_rank
151 #undef MPI_Group_size
152 #define MPI_Group_size PMPI_Group_size
153 #undef MPI_Group_translate_ranks
154 #define MPI_Group_translate_ranks PMPI_Group_translate_ranks
155 #undef MPI_Group_union
156 #define MPI_Group_union PMPI_Group_union
157 #undef MPI_Ibsend
158 #define MPI_Ibsend PMPI_Ibsend
159 #undef MPI_Init
160 #define MPI_Init PMPI_Init
161 #undef MPI_Initialized
162 #define MPI_Initialized PMPI_Initialized
163 #undef MPI_Intercomm_create
164 #define MPI_Intercomm_create PMPI_Intercomm_create
165 #undef MPI_Intercomm_merge
166 #define MPI_Intercomm_merge PMPI_Intercomm_merge
167 #undef MPI_Iprobe
168 #define MPI_Iprobe PMPI_Iprobe
169 #undef MPI_Irecv
170 #define MPI_Irecv PMPI_Irecv
171 #undef MPI_Irsend
172 #define MPI_Irsend PMPI_Irsend
173 #undef MPI_Isend
174 #define MPI_Isend PMPI_Isend
175 #undef MPI_Issend
176 #define MPI_Issend PMPI_Issend
177 #undef MPI_Name_get
178 #define MPI_Name_get PMPI_Name_get
179 #undef MPI_Name_put
180 #define MPI_Name_put PMPI_Name_put
181 #undef MPI_Op_create
182 #define MPI_Op_create PMPI_Op_create
183 #undef MPI_Op_free
184 #define MPI_Op_free PMPI_Op_free
185 #undef MPI_Pack
186 #define MPI_Pack PMPI_Pack
187 #undef MPI_Pack_size
188 #define MPI_Pack_size PMPI_Pack_size
189 #undef MPI_Pcontrol
190 #define MPI_Pcontrol PMPI_Pcontrol
191 #undef MPI_Probe
192 #define MPI_Probe PMPI_Probe
193 #undef MPI_Recv
194 #define MPI_Recv PMPI_Recv
195 #undef MPI_Recv_init
196 #define MPI_Recv_init PMPI_Recv_init
197 #undef MPI_Reduce
198 #define MPI_Reduce PMPI_Reduce
199 #undef MPI_Reduce_scatter
200 #define MPI_Reduce_scatter PMPI_Reduce_scatter
201 #undef MPI_Request_c2f
202 #define MPI_Request_c2f PMPI_Request_c2f
203 #undef MPI_Request_free
204 #define MPI_Request_free PMPI_Request_free
205 #undef MPI_Rsend
206 #define MPI_Rsend PMPI_Rsend
207 #undef MPI_Rsend_init
208 #define MPI_Rsend_init PMPI_Rsend_init
209 #undef MPI_Scan
210 #define MPI_Scan PMPI_Scan
211 #undef MPI_Scatter
212 #define MPI_Scatter PMPI_Scatter
213 #undef MPI_Scatterv
214 #define MPI_Scatterv PMPI_Scatterv
215 #undef MPI_Send
216 #define MPI_Send PMPI_Send
217 #undef MPI_Send_init
218 #define MPI_Send_init PMPI_Send_init
219 #undef MPI_Sendrecv
220 #define MPI_Sendrecv PMPI_Sendrecv
221 #undef MPI_Sendrecv_replace
222 #define MPI_Sendrecv_replace PMPI_Sendrecv_replace
223 #undef MPI_Ssend
224 #define MPI_Ssend PMPI_Ssend
225 #undef MPI_Ssend_init
226 #define MPI_Ssend_init PMPI_Ssend_init
227 #undef MPI_Start
228 #define MPI_Start PMPI_Start
229 #undef MPI_Startall
230 #define MPI_Startall PMPI_Startall
231 #undef MPI_Test
232 #define MPI_Test PMPI_Test
233 #undef MPI_Test_cancelled
234 #define MPI_Test_cancelled PMPI_Test_cancelled
235 #undef MPI_Testall
236 #define MPI_Testall PMPI_Testall
237 #undef MPI_Testany
238 #define MPI_Testany PMPI_Testany
239 #undef MPI_Testsome
240 #define MPI_Testsome PMPI_Testsome
241 #undef MPI_Topo_status
242 #define MPI_Topo_status PMPI_Topo_status
243 #undef MPI_Topo_test
244 #define MPI_Topo_test PMPI_Topo_test
245 #undef MPI_Type_commit
246 #define MPI_Type_commit PMPI_Type_commit
247 #undef MPI_Type_contiguous
248 #define MPI_Type_contiguous PMPI_Type_contiguous
249 #undef MPI_Type_count
250 #define MPI_Type_count PMPI_Type_count
251 #undef MPI_Type_create_struct
252 #define MPI_Type_create_struct PMPI_Type_create_struct
253 #undef MPI_Type_create_resized
254 #define MPI_Type_create_resized PMPI_Type_create_resized
255 /* #define MPI_Type_create_darray PMPI_Type_create_darray */
256 #undef MPI_Type_create_indexed_block
257 #define MPI_Type_create_indexed_block PMPI_Type_create_indexed_block
258 #undef MPI_Type_create_hindexed
259 #define MPI_Type_create_hindexed PMPI_Type_create_hindexed
260 #undef MPI_Type_create_hindexed_block
261 #define MPI_Type_create_hindexed_block PMPI_Type_create_hindexed_block
262 #undef MPI_Type_create_hvector
263 #define MPI_Type_create_hvector PMPI_Type_create_hvector
264 /* #define MPI_Type_create_subarray PMPI_Type_create_subarray */
265 #undef MPI_Type_get_extent
266 #define MPI_Type_get_extent PMPI_Type_get_extent
267 #undef MPI_Type_free
268 #define MPI_Type_free PMPI_Type_free
269 #undef MPI_Type_get_contents
270 #define MPI_Type_get_contents PMPI_Type_get_contents
271 #undef MPI_Type_get_envelope
272 #define MPI_Type_get_envelope PMPI_Type_get_envelope
273 #undef MPI_Type_get_true_extent
274 #define MPI_Type_get_true_extent PMPI_Type_get_true_extent
275 #undef MPI_Type_indexed
276 #define MPI_Type_indexed PMPI_Type_indexed
277 #undef MPI_Type_size
278 #define MPI_Type_size PMPI_Type_size
279 #undef MPI_Type_vector
280 #define MPI_Type_vector PMPI_Type_vector
281 #undef MPI_Unpack
282 #define MPI_Unpack PMPI_Unpack
283 #undef MPI_Wait
284 #define MPI_Wait PMPI_Wait
285 #undef MPI_Waitall
286 #define MPI_Waitall PMPI_Waitall
287 #undef MPI_Waitany
288 #define MPI_Waitany PMPI_Waitany
289 #undef MPI_Waitsome
290 #define MPI_Waitsome PMPI_Waitsome
291 #undef MPI_Wtick
292 #define MPI_Wtick PMPI_Wtick
293 #undef MPI_Wtime
294 #define MPI_Wtime PMPI_Wtime
295 
296 /* commented out because these could be macros themselves, as in MPICH
297 #undef MPI_Type_c2f
298 #define MPI_Type_c2f PMPI_Type_c2f
299 #undef MPI_Type_f2c
300 #define MPI_Type_f2c PMPI_Type_f2c
301 #undef MPI_Comm_c2f
302 #define MPI_Comm_c2f PMPI_Comm_c2f
303 #undef MPI_Comm_f2c
304 #define MPI_Comm_f2c PMPI_Comm_f2c
305 #undef MPI_Group_c2f
306 #define MPI_Group_c2f PMPI_Group_c2f
307 #undef MPI_Group_f2c
308 #define MPI_Group_f2c PMPI_Group_f2c
309 #undef MPI_Op_c2f
310 #define MPI_Op_c2f PMPI_Op_c2f
311 #undef MPI_Op_f2c
312 #define MPI_Op_f2c PMPI_Op_f2c
313 #undef MPI_Request_c2f
314 #define MPI_Request_c2f PMPI_Request_c2f
315 #undef MPI_Request_f2c
316 #define MPI_Request_f2c PMPI_Request_f2c
317 #undef MPI_Win_c2f
318 #define MPI_Win_c2f PMPI_Win_c2f
319 #undef MPI_Win_f2c
320 #define MPI_Win_f2c PMPI_Win_f2c
321 */
322 #undef MPI_Status_c2f
323 #define MPI_Status_c2f PMPI_Status_c2f
324 #undef MPI_Status_f2c
325 #define MPI_Status_f2c PMPI_Status_f2c
326 
327 #undef MPI_Status_set_elements
328 #define MPI_Status_set_elements PMPI_Status_set_elements
329 
330 #ifndef HAVE_MPI_INFO_SRC  /* everywhere except in info source directory */
331 #undef MPI_Info_create
332 #define MPI_Info_create PMPI_Info_create
333 #undef MPI_Info_set
334 #define MPI_Info_set PMPI_Info_set
335 #undef MPI_Info_delete
336 #define MPI_Info_delete PMPI_Info_delete
337 #undef MPI_Info_get
338 #define MPI_Info_get PMPI_Info_get
339 #undef MPI_Info_get_valuelen
340 #define MPI_Info_get_valuelen PMPI_Info_get_valuelen
341 #undef MPI_Info_get_nkeys
342 #define MPI_Info_get_nkeys PMPI_Info_get_nkeys
343 #undef MPI_Info_get_nthkey
344 #define MPI_Info_get_nthkey PMPI_Info_get_nthkey
345 #undef MPI_Info_dup
346 #define MPI_Info_dup PMPI_Info_dup
347 #undef MPI_Info_free
348 #define MPI_Info_free PMPI_Info_free
349 /* #undef MPI_Info_c2f
350 #define MPI_Info_c2f PMPI_Info_c2f
351 #undef MPI_Info_f2c
352 #define MPI_Info_f2c PMPI_Info_f2c
353 */
354 #endif
355 #undef MPI_Grequest_start
356 #define MPI_Grequest_start PMPI_Grequest_start
357 #undef MPI_Grequest_complete
358 #define MPI_Grequest_complete PMPI_Grequest_complete
359 #undef MPI_Status_set_cancelled
360 #define MPI_Status_set_cancelled PMPI_Status_set_cancelled
361 
362 #undef MPIX_Grequest_class_create
363 #define MPIX_Grequest_class_create PMPIX_Grequest_class_create
364 #undef MPIX_Grequest_class_allocate
365 #define MPIX_Grequest_class_allocate PMPIX_Grequest_class_allocate
366 
367 #ifdef MPIO_FORTRAN_SRC   /* only in MPI-IO Fortran source directory */
368 #undef MPI_File_c2f
369 #define MPI_File_c2f PMPI_File_c2f
370 #undef MPI_File_f2c
371 #define MPI_File_f2c PMPI_File_f2c
372 #endif
373 
374 #undef MPI_Type_get_attr
375 #define MPI_Type_get_attr PMPI_Type_get_attr
376 #undef MPI_Type_set_attr
377 #define MPI_Type_set_attr PMPI_Type_set_attr
378 #undef MPI_Comm_set_attr
379 #define MPI_Comm_set_attr PMPI_Comm_set_attr
380 #undef MPI_Type_create_keyval
381 #define MPI_Type_create_keyval PMPI_Type_create_keyval
382 
383 #endif
384