Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] Remove sg_cabinet_cb
[simgrid.git] / src / smpi / smpi_mpi.c
1 /* Copyright (c) 2007-2014. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #include "private.h"
8 #include "simgrid/sg_config.h"
9
10 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_mpi, smpi,
11                                 "Logging specific to SMPI (mpi)");
12
13 /* MPI User level calls */
14
15 int MPI_Init(int *argc, char ***argv)
16 {
17
18   return PMPI_Init(argc, argv);
19 }
20
21 int MPI_Finalize(void)
22 {
23   return PMPI_Finalize();
24 }
25
26 int MPI_Finalized(int * flag)
27 {
28   return PMPI_Finalized(flag);
29 }
30
31 int MPI_Init_thread(int *argc, char ***argv, int required, int *provided)
32 {
33   return PMPI_Init_thread(argc, argv, required, provided);
34 }
35
36 int MPI_Query_thread(int *provided)
37 {
38   return PMPI_Query_thread(provided);
39 }
40
41 int MPI_Is_thread_main(int *flag)
42 {
43   return PMPI_Is_thread_main(flag);
44 }
45
46 int MPI_Abort(MPI_Comm comm, int errorcode)
47 {
48   return PMPI_Abort(comm, errorcode);
49 }
50
51 double MPI_Wtime(void)
52 {
53   return PMPI_Wtime();
54 }
55
56 double MPI_Wtick(void)
57 {
58   return PMPI_Wtick();
59 }
60
61 int MPI_Address(void *location, MPI_Aint * address)
62 {
63   return PMPI_Address(location, address);
64 }
65
66 int MPI_Get_address(void *location, MPI_Aint * address)
67 {
68   return PMPI_Get_address(location, address);
69 }
70
71 int MPI_Type_free(MPI_Datatype * datatype)
72 {
73   return PMPI_Type_free(datatype);
74 }
75
76 int MPI_Type_dup(MPI_Datatype  datatype, MPI_Datatype * newdatatype)
77 {
78   return PMPI_Type_dup(datatype, newdatatype);
79 }
80
81 int MPI_Type_set_name(MPI_Datatype  datatype, char * name)
82 {
83   return PMPI_Type_set_name(datatype, name);
84 }
85
86 int MPI_Type_get_name(MPI_Datatype  datatype, char * name, int* len)
87 {
88   return PMPI_Type_get_name(datatype,name,len);
89 }
90
91 int MPI_Type_get_attr (MPI_Datatype type, int type_keyval, void *attribute_val, int* flag)
92 {
93    return PMPI_Type_get_attr ( type, type_keyval, attribute_val, flag);
94 }
95
96 int MPI_Type_set_attr (MPI_Datatype type, int type_keyval, void *attribute_val)
97 {
98    return PMPI_Type_set_attr ( type, type_keyval, attribute_val);
99 }
100
101 int MPI_Type_delete_attr (MPI_Datatype type, int type_keyval)
102 {
103    return PMPI_Type_delete_attr (type,  type_keyval);
104 }
105
106 int MPI_Type_create_keyval(MPI_Type_copy_attr_function* copy_fn, MPI_Type_delete_attr_function* delete_fn, int* keyval, void* extra_state)
107 {
108    return PMPI_Type_create_keyval(copy_fn,  delete_fn,  keyval,  extra_state) ;
109 }
110
111 int MPI_Type_free_keyval(int* keyval) {
112    return PMPI_Type_free_keyval( keyval);
113 }
114
115 int MPI_Pcontrol(const int level )
116 {
117   return PMPI_Pcontrol(level);
118 }
119
120 int MPI_Type_size(MPI_Datatype datatype, int *size)
121 {
122   return PMPI_Type_size(datatype, size);
123 }
124
125 int MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint * lb, MPI_Aint * extent)
126 {
127   return PMPI_Type_get_extent(datatype, lb, extent);
128 }
129
130 int MPI_Type_get_true_extent(MPI_Datatype datatype, MPI_Aint * lb, MPI_Aint * extent)
131 {
132   return PMPI_Type_get_true_extent(datatype, lb, extent);
133 }
134
135 int MPI_Type_extent(MPI_Datatype datatype, MPI_Aint * extent)
136 {
137   return PMPI_Type_extent(datatype, extent);
138 }
139
140 int MPI_Type_lb(MPI_Datatype datatype, MPI_Aint * disp)
141 {
142   return PMPI_Type_lb(datatype, disp);
143 }
144
145 int MPI_Type_ub(MPI_Datatype datatype, MPI_Aint * disp)
146 {
147   return PMPI_Type_ub(datatype, disp);
148 }
149
150 int MPI_Op_create(MPI_User_function * function, int commute, MPI_Op * op)
151 {
152   return PMPI_Op_create(function, commute, op);
153 }
154
155 int MPI_Op_free(MPI_Op * op)
156 {
157   return PMPI_Op_free(op);
158 }
159
160 int MPI_Group_free(MPI_Group * group)
161 {
162   return PMPI_Group_free(group);
163 }
164
165 int MPI_Group_size(MPI_Group group, int *size)
166 {
167   return PMPI_Group_size(group, size);
168 }
169
170 int MPI_Group_rank(MPI_Group group, int *rank)
171 {
172   return PMPI_Group_rank(group, rank);
173 }
174
175 int MPI_Group_translate_ranks(MPI_Group group1, int n, int *ranks1,
176                               MPI_Group group2, int *ranks2)
177 {
178   return PMPI_Group_translate_ranks(group1, n, ranks1, group2, ranks2);
179 }
180
181 int MPI_Group_compare(MPI_Group group1, MPI_Group group2, int *result)
182 {
183   return PMPI_Group_compare(group1, group2, result);
184 }
185
186 int MPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group * newgroup)
187 {
188   return PMPI_Group_union(group1, group2, newgroup);
189 }
190
191 int MPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group * newgroup)
192 {
193   return PMPI_Group_intersection(group1, group2, newgroup);
194 }
195
196 int MPI_Group_difference(MPI_Group group1, MPI_Group group2, MPI_Group * newgroup)
197 {
198   return PMPI_Group_difference(group1, group2, newgroup);
199 }
200
201 int MPI_Group_incl(MPI_Group group, int n, int *ranks, MPI_Group * newgroup)
202 {
203   return PMPI_Group_incl(group, n, ranks, newgroup);
204 }
205
206 int MPI_Group_excl(MPI_Group group, int n, int *ranks, MPI_Group * newgroup)
207 {
208   return PMPI_Group_excl(group, n, ranks, newgroup);
209 }
210
211 int MPI_Group_range_incl(MPI_Group group, int n, int ranges[][3],
212                          MPI_Group * newgroup)
213 {
214   return PMPI_Group_range_incl(group, n, ranges, newgroup);
215 }
216
217 int MPI_Group_range_excl(MPI_Group group, int n, int ranges[][3],
218                          MPI_Group * newgroup)
219 {
220   return PMPI_Group_range_excl(group, n, ranges, newgroup);
221 }
222
223 int MPI_Comm_rank(MPI_Comm comm, int *rank)
224 {
225   return PMPI_Comm_rank(comm, rank);
226 }
227
228 int MPI_Comm_size(MPI_Comm comm, int *size)
229 {
230   return PMPI_Comm_size(comm, size);
231 }
232
233 int MPI_Comm_get_attr (MPI_Comm comm, int comm_keyval, void *attribute_val, int *flag)
234 {
235   return PMPI_Comm_get_attr (comm, comm_keyval, attribute_val, flag);
236 }
237
238 int MPI_Comm_set_attr (MPI_Comm comm, int comm_keyval, void *attribute_val)
239 {
240    return PMPI_Comm_set_attr ( comm, comm_keyval, attribute_val);
241 }
242
243 int MPI_Comm_delete_attr (MPI_Comm comm, int comm_keyval)
244 {
245    return PMPI_Comm_delete_attr (comm,  comm_keyval);
246 }
247
248 int MPI_Comm_create_keyval(MPI_Comm_copy_attr_function* copy_fn, MPI_Comm_delete_attr_function* delete_fn, int* keyval, void* extra_state)
249 {
250    return PMPI_Comm_create_keyval(copy_fn,  delete_fn,  keyval,  extra_state) ;
251 }
252
253 int MPI_Comm_free_keyval(int* keyval) {
254    return PMPI_Comm_free_keyval( keyval);
255 }
256
257 int MPI_Comm_get_name (MPI_Comm comm, char* name, int* len)
258 {
259   return PMPI_Comm_get_name(comm, name, len);
260 }
261
262 int MPI_Comm_group(MPI_Comm comm, MPI_Group * group)
263 {
264   return PMPI_Comm_group(comm, group);
265 }
266
267 int MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result)
268 {
269   return PMPI_Comm_compare(comm1, comm2, result);
270 }
271
272 int MPI_Comm_dup(MPI_Comm comm, MPI_Comm * newcomm)
273 {
274   return PMPI_Comm_dup(comm, newcomm);
275 }
276
277 int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm * newcomm)
278 {
279   return PMPI_Comm_create(comm, group, newcomm);
280 }
281
282 int MPI_Comm_free(MPI_Comm * comm)
283 {
284   return PMPI_Comm_free(comm);
285 }
286
287 int MPI_Comm_disconnect(MPI_Comm * comm)
288 {
289   return PMPI_Comm_disconnect(comm);
290 }
291
292 int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm* comm_out)
293 {
294   return PMPI_Comm_split(comm, color, key, comm_out);
295 }
296
297 int MPI_Send_init(void *buf, int count, MPI_Datatype datatype, int dst,
298                   int tag, MPI_Comm comm, MPI_Request * request)
299 {
300   return PMPI_Send_init(buf, count, datatype, dst, tag, comm, request);
301 }
302
303 int MPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int src,
304                   int tag, MPI_Comm comm, MPI_Request * request)
305 {
306   return PMPI_Recv_init(buf, count, datatype, src, tag, comm, request);
307 }
308
309 int MPI_Start(MPI_Request * request)
310 {
311   return PMPI_Start(request);
312 }
313
314 int MPI_Startall(int count, MPI_Request * requests)
315 {
316   return PMPI_Startall(count, requests);
317 }
318
319 int MPI_Request_free(MPI_Request * request)
320 {
321   return PMPI_Request_free(request);
322 }
323
324 int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int src,
325               int tag, MPI_Comm comm, MPI_Request * request)
326 {
327   return PMPI_Irecv(buf, count, datatype, src, tag, comm, request);
328 }
329
330 int MPI_Isend(void *buf, int count, MPI_Datatype datatype, int dst,
331               int tag, MPI_Comm comm, MPI_Request * request)
332 {
333   return PMPI_Isend(buf, count, datatype, dst, tag, comm, request);
334 }
335
336 int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag,
337              MPI_Comm comm, MPI_Status * status)
338 {
339   return PMPI_Recv(buf, count, datatype, src, tag, comm, status);
340 }
341
342 int MPI_Send(void *buf, int count, MPI_Datatype datatype, int dst, int tag,
343              MPI_Comm comm)
344 {
345   return PMPI_Send(buf, count, datatype, dst, tag, comm);
346 }
347
348 int MPI_Sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
349                  int dst, int sendtag, void *recvbuf, int recvcount,
350                  MPI_Datatype recvtype, int src, int recvtag,
351                  MPI_Comm comm, MPI_Status * status)
352 {
353   return PMPI_Sendrecv(sendbuf, sendcount, sendtype, dst, sendtag,
354                        recvbuf, recvcount, recvtype, src, recvtag,
355                        comm, status);
356 }
357
358 int MPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
359                          int dst, int sendtag, int src, int recvtag,
360                          MPI_Comm comm, MPI_Status * status)
361 {
362   return PMPI_Sendrecv_replace(buf, count, datatype, dst, sendtag, src,
363                                recvtag, comm, status);
364 }
365
366 int MPI_Test(MPI_Request * request, int *flag, MPI_Status * status)
367 {
368   return PMPI_Test(request, flag, status);
369 }
370
371 int MPI_Testany(int count, MPI_Request requests[], int *index, int *flag,
372                 MPI_Status * status)
373 {
374   return PMPI_Testany(count, requests, index, flag, status);
375 }
376
377 int MPI_Wait(MPI_Request * request, MPI_Status * status)
378 {
379   return PMPI_Wait(request, status);
380 }
381
382 int MPI_Waitany(int count, MPI_Request requests[], int *index, MPI_Status * status)
383 {
384   return PMPI_Waitany(count, requests, index, status);
385 }
386
387 int MPI_Waitall(int count, MPI_Request requests[], MPI_Status status[])
388 {
389   return PMPI_Waitall(count, requests, status);
390 }
391
392 int MPI_Waitsome(int incount, MPI_Request requests[], int *outcount,
393                  int *indices, MPI_Status status[])
394 {
395   return PMPI_Waitsome(incount, requests, outcount, indices, status);
396 }
397
398 int MPI_Bcast(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm)
399 {
400   return PMPI_Bcast(buf, count, datatype, root, comm);
401 }
402
403 int MPI_Barrier(MPI_Comm comm)
404 {
405   return PMPI_Barrier(comm);
406 }
407
408 int MPI_Gather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
409                void *recvbuf, int recvcount, MPI_Datatype recvtype,
410                int root, MPI_Comm comm)
411 {
412   return PMPI_Gather(sendbuf, sendcount, sendtype,
413                      recvbuf, recvcount, recvtype,
414                      root, comm);
415 }
416
417 int MPI_Gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
418                 void *recvbuf, int *recvcounts, int *displs,
419                 MPI_Datatype recvtype, int root, MPI_Comm comm)
420 {
421   return PMPI_Gatherv(sendbuf, sendcount, sendtype,
422                       recvbuf, recvcounts, displs, recvtype,
423                       root, comm);
424 }
425
426 int MPI_Allgather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
427                   void *recvbuf, int recvcount, MPI_Datatype recvtype,
428                   MPI_Comm comm)
429 {
430   return PMPI_Allgather(sendbuf, sendcount, sendtype,
431                         recvbuf, recvcount, recvtype,
432                         comm);
433 }
434
435 int MPI_Allgatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
436                    void *recvbuf, int *recvcounts, int *displs,
437                    MPI_Datatype recvtype, MPI_Comm comm)
438 {
439   return PMPI_Allgatherv(sendbuf, sendcount, sendtype,
440                          recvbuf, recvcounts, displs, recvtype,
441                          comm);
442 }
443
444 int MPI_Scatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
445                 void *recvbuf, int recvcount, MPI_Datatype recvtype,
446                 int root, MPI_Comm comm)
447 {
448   return PMPI_Scatter(sendbuf, sendcount, sendtype,
449                       recvbuf, recvcount, recvtype,
450                       root, comm);
451 }
452
453 int MPI_Scatterv(void *sendbuf, int *sendcounts, int *displs,
454                  MPI_Datatype sendtype, void *recvbuf, int recvcount,
455                  MPI_Datatype recvtype, int root, MPI_Comm comm)
456 {
457   return PMPI_Scatterv(sendbuf, sendcounts, displs, sendtype,
458                        recvbuf, recvcount, recvtype,
459                        root, comm);
460 }
461
462 int MPI_Reduce(void *sendbuf, void *recvbuf, int count,
463                MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm)
464 {
465   return PMPI_Reduce(sendbuf, recvbuf, count, datatype, op, root, comm);
466 }
467
468 int MPI_Reduce_local(void *inbuf, void *inoutbuf, int count,
469     MPI_Datatype datatype, MPI_Op op){
470   return PMPI_Reduce_local(inbuf, inoutbuf, count, datatype, op);
471 }
472
473 int MPI_Allreduce(void *sendbuf, void *recvbuf, int count,
474                   MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
475 {
476   return PMPI_Allreduce(sendbuf, recvbuf, count, datatype, op, comm);
477 }
478
479 int MPI_Scan(void *sendbuf, void *recvbuf, int count,
480              MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
481 {
482   return PMPI_Scan(sendbuf, recvbuf, count, datatype, op, comm);
483 }
484
485 int MPI_Reduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts,
486                        MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
487 {
488   return PMPI_Reduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm);
489 }
490
491 int MPI_Reduce_scatter_block(void *sendbuf, void *recvbuf, int recvcount,
492                       MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
493 {
494   return PMPI_Reduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, op, comm);
495 }
496
497 int MPI_Alltoall(void *sendbuf, int sendcount, MPI_Datatype sendtype,
498                  void *recvbuf, int recvcount, MPI_Datatype recvtype,
499                  MPI_Comm comm)
500 {
501   return PMPI_Alltoall(sendbuf, sendcount, sendtype,
502                        recvbuf, recvcount, recvtype,
503                        comm);
504 }
505
506 int MPI_Alltoallv(void *sendbuf, int *sendcounts, int *senddisps,
507                   MPI_Datatype sendtype, void *recvbuf, int *recvcounts,
508                   int *recvdisps, MPI_Datatype recvtype, MPI_Comm comm)
509 {
510   return PMPI_Alltoallv(sendbuf, sendcounts, senddisps, sendtype,
511                         recvbuf, recvcounts, recvdisps, recvtype,
512                         comm);
513 }
514
515 int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr){
516   return PMPI_Alloc_mem(size, info, baseptr);
517 }
518
519 int MPI_Free_mem(void *baseptr){
520   return PMPI_Free_mem(baseptr);
521 }
522
523 int MPI_Get_processor_name(char *name, int *resultlen)
524 {
525   return PMPI_Get_processor_name(name, resultlen);
526 }
527
528 int MPI_Get_count(MPI_Status * status, MPI_Datatype datatype, int *count)
529 {
530   return PMPI_Get_count(status, datatype, count);
531 }
532
533 int MPI_Pack_size(int incount, MPI_Datatype datatype, MPI_Comm comm, int* size) {
534   return PMPI_Pack_size(incount, datatype, comm, size);
535 }
536
537 int MPI_Cart_coords(MPI_Comm comm, int rank, int maxdims, int* coords) {
538   return PMPI_Cart_coords(comm, rank, maxdims, coords);
539 }
540
541 int MPI_Cart_create(MPI_Comm comm_old, int ndims, int* dims, int* periods, int reorder, MPI_Comm* comm_cart) {
542   return PMPI_Cart_create(comm_old, ndims, dims, periods, reorder, comm_cart);
543 }
544
545 int MPI_Cart_get(MPI_Comm comm, int maxdims, int* dims, int* periods, int* coords) {
546   return PMPI_Cart_get(comm, maxdims, dims, periods, coords);
547 }
548
549 int MPI_Cart_map(MPI_Comm comm_old, int ndims, int* dims, int* periods, int* newrank) {
550   return PMPI_Cart_map(comm_old, ndims, dims, periods, newrank);
551 }
552
553 int MPI_Cart_rank(MPI_Comm comm, int* coords, int* rank) {
554   return PMPI_Cart_rank(comm, coords, rank);
555 }
556
557 int MPI_Cart_shift(MPI_Comm comm, int direction, int displ, int* source, int* dest) {
558   return PMPI_Cart_shift(comm, direction, displ, source, dest);
559 }
560
561 int MPI_Cart_sub(MPI_Comm comm, int* remain_dims, MPI_Comm* comm_new) {
562   return PMPI_Cart_sub(comm, remain_dims, comm_new);
563 }
564
565 int MPI_Cartdim_get(MPI_Comm comm, int* ndims) {
566   return PMPI_Cartdim_get(comm, ndims);
567 }
568
569 int MPI_Graph_create(MPI_Comm comm_old, int nnodes, int* index, int* edges, int reorder, MPI_Comm* comm_graph) {
570   return PMPI_Graph_create(comm_old, nnodes, index, edges, reorder, comm_graph);
571 }
572
573 int MPI_Graph_get(MPI_Comm comm, int maxindex, int maxedges, int* index, int* edges) {
574   return PMPI_Graph_get(comm, maxindex, maxedges, index, edges);
575 }
576
577 int MPI_Graph_map(MPI_Comm comm_old, int nnodes, int* index, int* edges, int* newrank) {
578   return PMPI_Graph_map(comm_old, nnodes, index, edges, newrank);
579 }
580
581 int MPI_Graph_neighbors(MPI_Comm comm, int rank, int maxneighbors, int* neighbors) {
582   return PMPI_Graph_neighbors(comm, rank, maxneighbors, neighbors);
583 }
584
585 int MPI_Graph_neighbors_count(MPI_Comm comm, int rank, int* nneighbors) {
586   return PMPI_Graph_neighbors_count(comm, rank, nneighbors);
587 }
588
589 int MPI_Graphdims_get(MPI_Comm comm, int* nnodes, int* nedges) {
590   return PMPI_Graphdims_get(comm, nnodes, nedges);
591 }
592
593 int MPI_Topo_test(MPI_Comm comm, int* top_type) {
594   return PMPI_Topo_test(comm, top_type);
595 }
596
597 int MPI_Error_class(int errorcode, int* errorclass) {
598   return PMPI_Error_class(errorcode, errorclass);
599 }
600
601 int MPI_Errhandler_create(MPI_Handler_function* function, MPI_Errhandler* errhandler) {
602   return PMPI_Errhandler_create(function, errhandler);
603 }
604
605 int MPI_Errhandler_free(MPI_Errhandler* errhandler) {
606   return PMPI_Errhandler_free(errhandler);
607 }
608
609 int MPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler* errhandler) {
610   return PMPI_Errhandler_get(comm, errhandler);
611 }
612
613 int MPI_Error_string(int errorcode, char* string, int* resultlen) {
614   return PMPI_Error_string(errorcode, string, resultlen);
615 }
616
617 int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler) {
618   return PMPI_Errhandler_set(comm, errhandler);
619 }
620
621 int MPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler) {
622   return PMPI_Comm_set_errhandler(comm, errhandler);
623 }
624
625 int MPI_Comm_get_errhandler(MPI_Comm comm, MPI_Errhandler* errhandler) {
626   return PMPI_Errhandler_set(comm, errhandler);
627 }
628
629 int MPI_Win_get_group(MPI_Win  win, MPI_Group * group){
630   return PMPI_Win_get_group(win, group);
631 }
632
633 int MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler) {
634   return PMPI_Win_set_errhandler(win, errhandler);
635 }
636
637 int MPI_Type_contiguous(int count, MPI_Datatype old_type, MPI_Datatype* newtype) {
638   return PMPI_Type_contiguous(count, old_type, newtype);
639 }
640
641 int MPI_Cancel(MPI_Request* request) {
642   return PMPI_Cancel(request);
643 }
644
645 int MPI_Buffer_attach(void* buffer, int size) {
646   return PMPI_Buffer_attach(buffer, size);
647 }
648
649 int MPI_Buffer_detach(void* buffer, int* size) {
650   return PMPI_Buffer_detach(buffer, size);
651 }
652
653 int MPI_Testsome(int incount, MPI_Request* requests, int* outcount, int* indices, MPI_Status* statuses) {
654   return PMPI_Testsome(incount, requests, outcount, indices, statuses);
655 }
656
657 int MPI_Comm_test_inter(MPI_Comm comm, int* flag) {
658   return PMPI_Comm_test_inter(comm, flag);
659 }
660
661 int MPI_Unpack(void* inbuf, int insize, int* position, void* outbuf, int outcount, MPI_Datatype type, MPI_Comm comm) {
662   return PMPI_Unpack(inbuf, insize, position, outbuf, outcount, type, comm);
663 }
664
665 int MPI_Pack_external_size(char *datarep, int incount, MPI_Datatype datatype, MPI_Aint *size){
666   return PMPI_Pack_external_size(datarep, incount, datatype, size);
667 }
668
669 int MPI_Pack_external(char *datarep, void *inbuf, int incount, MPI_Datatype datatype, void *outbuf, MPI_Aint outcount, MPI_Aint *position){
670   return PMPI_Pack_external(datarep, inbuf, incount, datatype, outbuf, outcount, position);
671 }
672
673 int MPI_Unpack_external( char *datarep, void *inbuf, MPI_Aint insize, MPI_Aint *position, void *outbuf, int outcount, MPI_Datatype datatype){
674   return PMPI_Unpack_external( datarep, inbuf, insize, position, outbuf, outcount, datatype);
675 }
676
677 int MPI_Type_commit(MPI_Datatype* datatype) {
678   return PMPI_Type_commit(datatype);
679 }
680
681 int MPI_Type_hindexed(int count, int* blocklens, MPI_Aint* indices, MPI_Datatype old_type, MPI_Datatype* newtype) {
682   return PMPI_Type_hindexed(count, blocklens, indices, old_type, newtype);
683 }
684
685 int MPI_Type_create_hindexed(int count, int* blocklens, MPI_Aint* indices, MPI_Datatype old_type, MPI_Datatype* new_type) {
686   return PMPI_Type_create_hindexed(count, blocklens,indices,old_type,new_type);
687 }
688
689 int MPI_Type_create_hindexed_block(int count, int blocklength, MPI_Aint* indices, MPI_Datatype old_type, MPI_Datatype* newtype) {
690   return PMPI_Type_create_hindexed_block(count, blocklength, indices, old_type, newtype);
691 }
692
693 int MPI_Type_hvector(int count, int blocklen, MPI_Aint stride, MPI_Datatype old_type, MPI_Datatype* newtype) {
694   return PMPI_Type_hvector(count, blocklen, stride, old_type, newtype);
695 }
696
697 int MPI_Type_indexed(int count, int* blocklens, int* indices, MPI_Datatype old_type, MPI_Datatype* newtype) {
698   return PMPI_Type_indexed(count, blocklens, indices, old_type, newtype);
699 }
700
701 int MPI_Type_create_indexed(int count, int* blocklens, int* indices, MPI_Datatype old_type, MPI_Datatype* newtype) {
702   return PMPI_Type_create_indexed(count, blocklens, indices, old_type, newtype);
703 }
704
705 int MPI_Type_create_indexed_block(int count, int blocklength, int* indices,  MPI_Datatype old_type,  MPI_Datatype *newtype){
706   return PMPI_Type_create_indexed_block(count, blocklength, indices, old_type, newtype);
707 }
708
709 int MPI_Type_struct(int count, int* blocklens, MPI_Aint* indices, MPI_Datatype* old_types, MPI_Datatype* newtype) {
710   return PMPI_Type_struct(count, blocklens, indices, old_types, newtype);
711 }
712
713 int MPI_Type_create_struct(int count, int* blocklens, MPI_Aint* indices, MPI_Datatype* old_types, MPI_Datatype* newtype) {
714   return PMPI_Type_create_struct(count, blocklens, indices, old_types, newtype);
715 }
716
717 int MPI_Type_vector(int count, int blocklen, int stride, MPI_Datatype old_type, MPI_Datatype* newtype) {
718   return PMPI_Type_vector(count, blocklen, stride, old_type, newtype);
719 }
720
721 int MPI_Ssend(void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) {
722   return PMPI_Ssend(buf, count, datatype, dest, tag, comm);
723 }
724
725 int MPI_Ssend_init(void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request* request) {
726   return PMPI_Ssend_init(buf, count, datatype, dest, tag, comm, request);
727 }
728
729 int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader, MPI_Comm peer_comm, int remote_leader, int tag, MPI_Comm* comm_out) {
730   return PMPI_Intercomm_create(local_comm, local_leader, peer_comm, remote_leader, tag, comm_out);
731 }
732
733 int MPI_Intercomm_merge(MPI_Comm comm, int high, MPI_Comm* comm_out) {
734   return PMPI_Intercomm_merge(comm, high, comm_out);
735 }
736
737 int MPI_Bsend(void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) {
738   return PMPI_Bsend(buf, count, datatype, dest, tag, comm);
739 }
740
741 int MPI_Bsend_init(void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request* request) {
742   return PMPI_Bsend_init(buf, count, datatype, dest, tag, comm, request);
743 }
744
745 int MPI_Ibsend(void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request* request) {
746   return PMPI_Ibsend(buf, count, datatype, dest, tag, comm, request);
747 }
748
749 int MPI_Comm_remote_group(MPI_Comm comm, MPI_Group* group) {
750   return PMPI_Comm_remote_group(comm, group);
751 }
752
753 int MPI_Comm_remote_size(MPI_Comm comm, int* size) {
754   return PMPI_Comm_remote_size(comm, size);
755 }
756
757 int MPI_Issend(void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request* request) {
758   return PMPI_Issend(buf, count, datatype, dest, tag, comm, request);
759 }
760
761 int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status* status) {
762   return PMPI_Probe(source, tag, comm, status);
763 }
764
765 int MPI_Attr_delete(MPI_Comm comm, int keyval) {
766   return PMPI_Attr_delete(comm, keyval);
767 }
768
769 int MPI_Attr_get(MPI_Comm comm, int keyval, void* attr_value, int* flag) {
770   return PMPI_Attr_get(comm, keyval, attr_value, flag);
771 }
772
773 int MPI_Attr_put(MPI_Comm comm, int keyval, void* attr_value) {
774   return PMPI_Attr_put(comm, keyval, attr_value);
775 }
776
777 int MPI_Rsend(void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) {
778   return PMPI_Rsend(buf, count, datatype, dest, tag, comm);
779 }
780
781 int MPI_Rsend_init(void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request* request) {
782   return PMPI_Rsend_init(buf, count, datatype, dest, tag, comm, request);
783 }
784
785 int MPI_Irsend(void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request* request) {
786   return PMPI_Irsend(buf, count, datatype, dest, tag, comm, request);
787 }
788
789 int MPI_Keyval_create(MPI_Copy_function* copy_fn, MPI_Delete_function* delete_fn, int* keyval, void* extra_state) {
790   return PMPI_Keyval_create(copy_fn, delete_fn, keyval, extra_state);
791 }
792
793 int MPI_Keyval_free(int* keyval) {
794   return PMPI_Keyval_free(keyval);
795 }
796
797 int MPI_Test_cancelled(MPI_Status* status, int* flag) {
798   return PMPI_Test_cancelled(status, flag);
799 }
800
801 int MPI_Pack(void* inbuf, int incount, MPI_Datatype type, void* outbuf, int outcount, int* position, MPI_Comm comm) {
802   return PMPI_Pack(inbuf, incount, type, outbuf, outcount, position, comm);
803 }
804
805 int MPI_Testall(int count, MPI_Request* requests, int* flag, MPI_Status* statuses) {
806   return PMPI_Testall(count, requests, flag, statuses);
807 }
808
809 int MPI_Get_elements(MPI_Status* status, MPI_Datatype datatype, int* elements) {
810   return PMPI_Get_elements(status, datatype, elements);
811 }
812
813 int MPI_Dims_create(int nnodes, int ndims, int* dims) {
814   return PMPI_Dims_create(nnodes, ndims, dims);
815 }
816
817 int MPI_Iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status* status) {
818   return PMPI_Iprobe(source, tag, comm, flag, status);
819 }
820
821 int MPI_Initialized(int* flag) {
822   return PMPI_Initialized(flag);
823 }
824
825 int MPI_Win_fence( int assert,  MPI_Win win){
826    return PMPI_Win_fence( assert, win);
827 }
828
829 int MPI_Win_free( MPI_Win* win){
830    return PMPI_Win_free(  win);
831 }
832
833 int MPI_Win_create( void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, MPI_Win *win){
834   return PMPI_Win_create( base, size, disp_unit, info, comm,win);
835 }
836
837 int MPI_Win_set_name(MPI_Win  win, char * name)
838 {
839   return PMPI_Win_set_name(win, name);
840 }
841
842 int MPI_Win_get_name(MPI_Win  win, char * name, int* len)
843 {
844   return PMPI_Win_get_name(win,name,len);
845 }
846
847 int MPI_Win_complete(MPI_Win win){
848   return PMPI_Win_complete(win);
849 }
850
851 int MPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win) {
852   return PMPI_Win_lock(lock_type, rank, assert, win);
853 }
854
855 int MPI_Win_post(MPI_Group group, int assert, MPI_Win win){
856   return PMPI_Win_post(group, assert, win);
857 }
858
859 int MPI_Win_start(MPI_Group group, int assert, MPI_Win win){
860   return PMPI_Win_start(group, assert, win);
861 }
862
863 int MPI_Win_test(MPI_Win win, int *flag){
864   return PMPI_Win_test(win, flag);
865 }
866
867 int MPI_Win_unlock(int rank, MPI_Win win){
868   return PMPI_Win_unlock(rank, win);
869 }
870
871 int MPI_Win_wait(MPI_Win win){
872   return PMPI_Win_wait(win);
873 }
874
875 int MPI_Info_create( MPI_Info *info){
876   return PMPI_Info_create( info);
877 }
878
879 int MPI_Info_set( MPI_Info info, char *key, char *value){
880   return PMPI_Info_set( info, key, value);
881 }
882
883 int MPI_Info_free( MPI_Info *info){
884   return PMPI_Info_free( info);
885 }
886
887 int MPI_Get( void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,
888     MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win){
889   return PMPI_Get( origin_addr,origin_count, origin_datatype,target_rank,
890       target_disp, target_count,target_datatype, win);
891 }
892
893 int MPI_Put( void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,
894     MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win){
895   return PMPI_Put( origin_addr,origin_count, origin_datatype,target_rank,
896       target_disp, target_count,target_datatype, win);
897 }
898
899 int MPI_Accumulate( void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,
900     MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win){
901   return PMPI_Accumulate( origin_addr,origin_count, origin_datatype,target_rank,
902       target_disp, target_count,target_datatype,op, win);
903 }
904
905 int MPI_Type_get_envelope( MPI_Datatype datatype, int *num_integers,
906                           int *num_addresses, int *num_datatypes, int *combiner){
907   return PMPI_Type_get_envelope(  datatype, num_integers,
908       num_addresses, num_datatypes, combiner);
909 }
910
911 int MPI_Type_get_contents(MPI_Datatype datatype, int max_integers, int max_addresses,
912                             int max_datatypes, int* array_of_integers, MPI_Aint* array_of_addresses,
913                             MPI_Datatype *array_of_datatypes){
914   return PMPI_Type_get_contents(datatype, max_integers, max_addresses,
915       max_datatypes, array_of_integers, array_of_addresses,
916        array_of_datatypes);
917 }
918
919 int MPI_Type_create_darray(int size, int rank, int ndims, int* array_of_gsizes,
920                             int* array_of_distribs, int* array_of_dargs, int* array_of_psizes,
921                             int order, MPI_Datatype oldtype, MPI_Datatype *newtype) {
922   return PMPI_Type_create_darray(size, rank, ndims,  array_of_gsizes,
923        array_of_distribs,  array_of_dargs,  array_of_psizes,
924       order,  oldtype, newtype) ;
925 }
926
927 int MPI_Type_create_resized(MPI_Datatype oldtype,MPI_Aint lb, MPI_Aint extent, MPI_Datatype *newtype){
928   return PMPI_Type_create_resized(oldtype,lb, extent, newtype);
929 }
930
931 int MPI_Type_create_subarray(int ndims,int *array_of_sizes, int *array_of_subsizes, int *array_of_starts, int order, MPI_Datatype oldtype, MPI_Datatype *newtype){
932   return PMPI_Type_create_subarray(ndims,array_of_sizes, array_of_subsizes, array_of_starts, order, oldtype, newtype);
933 }
934
935 int MPI_Type_match_size(int typeclass,int size,MPI_Datatype *datatype){
936   return PMPI_Type_match_size(typeclass,size,datatype);
937 }
938
939 int MPI_Alltoallw( void *sendbuf, int *sendcnts, int *sdispls, MPI_Datatype *sendtypes,
940                    void *recvbuf, int *recvcnts, int *rdispls, MPI_Datatype *recvtypes,
941                    MPI_Comm comm){
942   return PMPI_Alltoallw( sendbuf, sendcnts, sdispls, sendtypes,
943       recvbuf, recvcnts, rdispls, recvtypes,
944       comm);
945 }
946
947 int MPI_Exscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
948                 MPI_Op op, MPI_Comm comm){
949   return PMPI_Exscan(sendbuf, recvbuf, count, datatype, op, comm);
950 }
951
952 int MPI_Comm_set_name (MPI_Comm comm, char* name){
953   return PMPI_Comm_set_name (comm, name);
954 }
955
956 int MPI_Comm_dup_with_info(MPI_Comm comm, MPI_Info info, MPI_Comm * newcomm){
957   return PMPI_Comm_dup_with_info(comm,info,newcomm);
958 }
959
960 int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, MPI_Info info, MPI_Comm *newcomm){
961   return PMPI_Comm_split_type(comm, split_type, key, info, newcomm);
962 }
963
964 int MPI_Comm_set_info (MPI_Comm comm, MPI_Info info){
965   return PMPI_Comm_set_info (comm, info);
966 }
967
968 int MPI_Comm_get_info (MPI_Comm comm, MPI_Info* info){
969   return PMPI_Comm_get_info (comm, info);
970 }
971
972 int MPI_Info_get(MPI_Info info,char *key,int valuelen, char *value, int *flag){
973   return PMPI_Info_get(info,key,valuelen, value, flag);
974 }
975
976 int MPI_Comm_create_errhandler( MPI_Comm_errhandler_fn *function, MPI_Errhandler *errhandler){
977   return PMPI_Comm_create_errhandler( function, errhandler);
978 }
979
980 int MPI_Add_error_class( int *errorclass){
981   return PMPI_Add_error_class( errorclass);
982 }
983
984 int MPI_Add_error_code(  int errorclass, int *errorcode){
985   return PMPI_Add_error_code(errorclass, errorcode);
986 }
987
988 int MPI_Add_error_string( int errorcode, char *string){
989   return PMPI_Add_error_string(errorcode, string);
990 }
991
992 int MPI_Comm_call_errhandler(MPI_Comm comm,int errorcode){
993   return PMPI_Comm_call_errhandler(comm, errorcode);
994 }
995
996 int MPI_Info_dup(MPI_Info info, MPI_Info *newinfo){
997   return PMPI_Info_dup(info, newinfo);
998 }
999
1000 int MPI_Info_get_valuelen( MPI_Info info, char *key, int *valuelen, int *flag){
1001   return PMPI_Info_get_valuelen( info, key, valuelen, flag);
1002 }
1003
1004 int MPI_Info_delete(MPI_Info info, char *key){
1005   return PMPI_Info_delete(info, key);
1006 }
1007
1008 int MPI_Info_get_nkeys( MPI_Info info, int *nkeys){
1009   return PMPI_Info_get_nkeys(  info, nkeys);
1010 }
1011
1012 int MPI_Info_get_nthkey( MPI_Info info, int n, char *key){
1013   return PMPI_Info_get_nthkey( info, n, key);
1014 }
1015
1016 int MPI_Get_version (int *version,int *subversion){
1017   return PMPI_Get_version (version,subversion);
1018 }
1019
1020 int MPI_Get_library_version (char *version,int *len){
1021   return PMPI_Get_library_version (version,len);
1022 }
1023
1024 int MPI_Request_get_status( MPI_Request request, int *flag, MPI_Status *status){
1025   return PMPI_Request_get_status( request, flag, status);
1026 }
1027
1028 int MPI_Grequest_start( MPI_Grequest_query_function *query_fn, MPI_Grequest_free_function *free_fn, MPI_Grequest_cancel_function *cancel_fn, void *extra_state, MPI_Request *request){
1029   return PMPI_Grequest_start( query_fn, free_fn, cancel_fn, extra_state, request);
1030 }
1031
1032 int MPI_Grequest_complete( MPI_Request request){
1033   return PMPI_Grequest_complete( request);
1034 }
1035
1036 int MPI_Status_set_cancelled(MPI_Status *status,int flag){
1037   return PMPI_Status_set_cancelled(status,flag);
1038 }
1039
1040 int MPI_Status_set_elements( MPI_Status *status, MPI_Datatype datatype, int count){
1041   return PMPI_Status_set_elements( status, datatype, count);
1042 }
1043
1044 int MPI_Comm_connect( char *port_name, MPI_Info info, int root, MPI_Comm comm, MPI_Comm *newcomm){
1045   return PMPI_Comm_connect( port_name, info, root, comm, newcomm);
1046 }
1047
1048 int MPI_Publish_name( char *service_name, MPI_Info info, char *port_name){
1049   return PMPI_Publish_name( service_name, info, port_name);
1050 }
1051
1052 int MPI_Unpublish_name( char *service_name, MPI_Info info, char *port_name){
1053   return PMPI_Unpublish_name( service_name, info, port_name);
1054 }
1055
1056 int MPI_Lookup_name( char *service_name, MPI_Info info, char *port_name){
1057   return PMPI_Lookup_name( service_name, info, port_name);
1058 }
1059
1060 int MPI_Comm_join( int fd, MPI_Comm *intercomm){
1061   return PMPI_Comm_join( fd, intercomm);
1062 }
1063
1064 int MPI_Open_port( MPI_Info info, char *port_name){
1065   return PMPI_Open_port( info,port_name);
1066 }
1067
1068 int MPI_Close_port( char *port_name){
1069   return PMPI_Close_port( port_name);
1070 }
1071
1072 int MPI_Comm_accept( char *port_name, MPI_Info info, int root, MPI_Comm comm, MPI_Comm *newcomm){
1073  return PMPI_Comm_accept( port_name, info, root, comm, newcomm);
1074 }
1075
1076 int MPI_Comm_spawn( char *command, char **argv, int maxprocs, MPI_Info info, int root,
1077                     MPI_Comm comm, MPI_Comm *intercomm, int* array_of_errcodes){
1078   return PMPI_Comm_spawn( command, argv, maxprocs, info, root, comm, intercomm, array_of_errcodes);
1079 }
1080
1081 int MPI_Comm_spawn_multiple( int count, char **array_of_commands, char*** array_of_argv,
1082                              int* array_of_maxprocs, MPI_Info* array_of_info, int root,
1083                              MPI_Comm comm, MPI_Comm *intercomm, int* array_of_errcodes){
1084   return PMPI_Comm_spawn_multiple( count, array_of_commands, array_of_argv, array_of_maxprocs,
1085                                   array_of_info, root, comm, intercomm, array_of_errcodes);
1086 }
1087
1088 int MPI_Comm_get_parent( MPI_Comm *parent){
1089   return PMPI_Comm_get_parent( parent);
1090 }
1091
1092 int MPI_Type_create_hvector(int count, int blocklen, MPI_Aint stride, MPI_Datatype old_type, MPI_Datatype* new_type) {
1093   return PMPI_Type_create_hvector(count, blocklen, stride, old_type, new_type);
1094 }
1095
1096 MPI_Datatype MPI_Type_f2c(MPI_Fint datatype){
1097   return PMPI_Type_f2c(datatype);
1098 }
1099
1100 MPI_Fint MPI_Type_c2f(MPI_Datatype datatype){
1101   return PMPI_Type_c2f( datatype);
1102 }
1103
1104 MPI_Group MPI_Group_f2c(MPI_Fint group){
1105   return PMPI_Group_f2c( group);
1106 }
1107
1108 MPI_Fint MPI_Group_c2f(MPI_Group group){
1109   return PMPI_Group_c2f(group);
1110 }
1111
1112 MPI_Request MPI_Request_f2c(MPI_Fint request){
1113   return PMPI_Request_f2c(request);
1114 }
1115
1116 MPI_Fint MPI_Request_c2f(MPI_Request request) {
1117   return PMPI_Request_c2f(request);
1118 }
1119
1120 MPI_Win MPI_Win_f2c(MPI_Fint win){
1121   return PMPI_Win_f2c(win);
1122 }
1123
1124 MPI_Fint MPI_Win_c2f(MPI_Win win){
1125   return PMPI_Win_c2f(win);
1126 }
1127
1128 MPI_Op MPI_Op_f2c(MPI_Fint op){
1129   return PMPI_Op_f2c(op);
1130 }
1131
1132 MPI_Fint MPI_Op_c2f(MPI_Op op){
1133   return PMPI_Op_c2f(op);
1134 }
1135
1136 MPI_Comm MPI_Comm_f2c(MPI_Fint comm){
1137   return PMPI_Comm_f2c(comm);
1138 }
1139
1140 MPI_Fint MPI_Comm_c2f(MPI_Comm comm){
1141   return PMPI_Comm_c2f(comm);
1142 }
1143
1144 MPI_Info MPI_Info_f2c(MPI_Fint info){
1145   return PMPI_Info_f2c(info);
1146 }
1147
1148 MPI_Fint MPI_Info_c2f(MPI_Info info){
1149   return PMPI_Info_c2f(info);
1150 }
1151
1152 MPI_Errhandler MPI_Errhandler_f2c(MPI_Fint errhandler){
1153   return PMPI_Errhandler_f2c(errhandler);
1154 }
1155
1156 MPI_Fint MPI_Errhandler_c2f(MPI_Errhandler errhandler){
1157   return PMPI_Errhandler_c2f(errhandler);
1158 }