23#ifdef MPI_LOGGER_ENABLED
31template<
class TupType,
size_t... I>
32inline void __print_tuple(
const TupType &_tup, std::index_sequence<I...>) {
34 (..., (std::cout << (I == 0 ?
"" :
", ") << std::get<I>(_tup)));
39inline void __print_tuple(
const std::tuple<T...> &_tup) {
40 __print_tuple(_tup, std::make_index_sequence<
sizeof...(T)>());
42 #define CALL_LOG_RETURN(a, b) \
43 std::cout << "%MPI_TRACE:" << #a; \
44 __print_tuple(std::make_tuple b); \
48 #define CALL_LOG_RETURN(a, b) return a b
53 inline int abort(MPI_Comm comm,
int errorcode) {
54 CALL_LOG_RETURN(MPI_Abort, (comm, errorcode));
56 inline int accumulate(
57 const void *origin_addr,
59 MPI_Datatype origin_datatype,
63 MPI_Datatype target_datatype,
78 inline int add_error_class(
int *errorclass) {
79 CALL_LOG_RETURN(MPI_Add_error_class, (errorclass));
81 inline int add_error_code(
int errorclass,
int *errorcode) {
82 CALL_LOG_RETURN(MPI_Add_error_code, (errorclass, errorcode));
84 inline int add_error_string(
int errorcode,
const char *
string) {
85 CALL_LOG_RETURN(MPI_Add_error_string, (errorcode,
string));
87 inline int alloc_mem(MPI_Aint size, MPI_Info info,
void *baseptr) {
88 CALL_LOG_RETURN(MPI_Alloc_mem, (size, info, baseptr));
90 inline int iallreduce(
94 MPI_Datatype datatype,
97 MPI_Request *request) {
98 CALL_LOG_RETURN(MPI_Iallreduce, (sendbuf, recvbuf, count, datatype, op, comm, request));
103 MPI_Datatype sendtype,
106 MPI_Datatype recvtype,
109 MPI_Alltoall, (sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm));
111 inline int ialltoall(
114 MPI_Datatype sendtype,
117 MPI_Datatype recvtype,
119 MPI_Request *request) {
122 (sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request));
124 inline int alltoallv(
126 const int sendcounts[],
128 MPI_Datatype sendtype,
130 const int recvcounts[],
132 MPI_Datatype recvtype,
136 (sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm));
138 inline int ialltoallv(
140 const int sendcounts[],
142 MPI_Datatype sendtype,
144 const int recvcounts[],
146 MPI_Datatype recvtype,
148 MPI_Request *request) {
162 inline int alltoallw(
164 const int sendcounts[],
166 const MPI_Datatype sendtypes[],
168 const int recvcounts[],
170 const MPI_Datatype recvtypes[],
184 inline int ialltoallw(
186 const int sendcounts[],
188 const MPI_Datatype sendtypes[],
190 const int recvcounts[],
192 const MPI_Datatype recvtypes[],
194 MPI_Request *request) {
208 inline int barrier(MPI_Comm comm) { CALL_LOG_RETURN(MPI_Barrier, (comm)); }
209 inline int ibarrier(MPI_Comm comm, MPI_Request *request) {
210 CALL_LOG_RETURN(MPI_Ibarrier, (comm, request));
212 inline int bcast(
void *buffer,
int count, MPI_Datatype datatype,
int root, MPI_Comm comm) {
213 CALL_LOG_RETURN(MPI_Bcast, (buffer, count, datatype, root, comm));
216 const void *buf,
int count, MPI_Datatype datatype,
int dest,
int tag, MPI_Comm comm) {
217 CALL_LOG_RETURN(MPI_Bsend, (buf, count, datatype, dest, tag, comm));
222 MPI_Datatype datatype,
225 MPI_Request *request) {
226 CALL_LOG_RETURN(MPI_Ibcast, (buffer, count, datatype, root, comm, request));
228 inline int bsend_init(
231 MPI_Datatype datatype,
235 MPI_Request *request) {
236 CALL_LOG_RETURN(MPI_Bsend_init, (buf, count, datatype, dest, tag, comm, request));
238 inline int buffer_attach(
void *buffer,
int size) {
239 CALL_LOG_RETURN(MPI_Buffer_attach, (buffer, size));
241 inline int buffer_detach(
void *buffer,
int *size) {
242 CALL_LOG_RETURN(MPI_Buffer_detach, (buffer, size));
244 inline int cancel(MPI_Request *request) { CALL_LOG_RETURN(MPI_Cancel, (request)); }
245 inline int cart_coords(MPI_Comm comm,
int rank,
int maxdims,
int coords[]) {
246 CALL_LOG_RETURN(MPI_Cart_coords, (comm, rank, maxdims, coords));
248 inline int cart_create(
254 MPI_Comm *comm_cart) {
255 CALL_LOG_RETURN(MPI_Cart_create, (old_comm, ndims, dims, periods, reorder, comm_cart));
257 inline int cart_get(MPI_Comm comm,
int maxdims,
int dims[],
int periods[],
int coords[]) {
258 CALL_LOG_RETURN(MPI_Cart_get, (comm, maxdims, dims, periods, coords));
261 MPI_Comm comm,
int ndims,
const int dims[],
const int periods[],
int *newrank) {
262 CALL_LOG_RETURN(MPI_Cart_map, (comm, ndims, dims, periods, newrank));
264 inline int cart_rank(MPI_Comm comm,
const int coords[],
int *rank) {
265 CALL_LOG_RETURN(MPI_Cart_rank, (comm, coords, rank));
267 inline int cart_shift(
268 MPI_Comm comm,
int direction,
int disp,
int *rank_source,
int *rank_dest) {
269 CALL_LOG_RETURN(MPI_Cart_shift, (comm, direction, disp, rank_source, rank_dest));
271 inline int cart_sub(MPI_Comm comm,
const int remain_dims[], MPI_Comm *new_comm) {
272 CALL_LOG_RETURN(MPI_Cart_sub, (comm, remain_dims, new_comm));
274 inline int cartdim_get(MPI_Comm comm,
int *ndims) {
275 CALL_LOG_RETURN(MPI_Cartdim_get, (comm, ndims));
277 inline int close_port(
const char *port_name) { CALL_LOG_RETURN(MPI_Close_port, (port_name)); }
278 inline int comm_accept(
279 const char *port_name, MPI_Info info,
int root, MPI_Comm comm, MPI_Comm *newcomm) {
280 CALL_LOG_RETURN(MPI_Comm_accept, (port_name, info, root, comm, newcomm));
282 inline MPI_Fint comm_c2f(MPI_Comm comm) { CALL_LOG_RETURN(MPI_Comm_c2f, (comm)); }
283 inline int comm_call_errhandler(MPI_Comm comm,
int errorcode) {
284 CALL_LOG_RETURN(MPI_Comm_call_errhandler, (comm, errorcode));
286 inline int comm_compare(MPI_Comm comm1, MPI_Comm comm2,
int *result) {
287 CALL_LOG_RETURN(MPI_Comm_compare, (comm1, comm2, result));
289 inline int comm_connect(
290 const char *port_name, MPI_Info info,
int root, MPI_Comm comm, MPI_Comm *newcomm) {
291 CALL_LOG_RETURN(MPI_Comm_connect, (port_name, info, root, comm, newcomm));
293 inline int comm_create_errhandler(
294 MPI_Comm_errhandler_function *function, MPI_Errhandler *errhandler) {
295 CALL_LOG_RETURN(MPI_Comm_create_errhandler, (function, errhandler));
297 inline int comm_create_keyval(
298 MPI_Comm_copy_attr_function *comm_copy_attr_fn,
299 MPI_Comm_delete_attr_function *comm_delete_attr_fn,
303 MPI_Comm_create_keyval,
304 (comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state));
306 inline int comm_create_group(MPI_Comm comm, MPI_Group group,
int tag, MPI_Comm *newcomm) {
307 CALL_LOG_RETURN(MPI_Comm_create_group, (comm, group, tag, newcomm));
309 inline int comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm) {
310 CALL_LOG_RETURN(MPI_Comm_create, (comm, group, newcomm));
312 inline int comm_delete_attr(MPI_Comm comm,
int comm_keyval) {
313 CALL_LOG_RETURN(MPI_Comm_delete_attr, (comm, comm_keyval));
315 inline int comm_disconnect(MPI_Comm *comm) { CALL_LOG_RETURN(MPI_Comm_disconnect, (comm)); }
316 inline int comm_dup(MPI_Comm comm, MPI_Comm *newcomm) {
317 CALL_LOG_RETURN(MPI_Comm_dup, (comm, newcomm));
319 inline int comm_idup(MPI_Comm comm, MPI_Comm *newcomm, MPI_Request *request) {
320 CALL_LOG_RETURN(MPI_Comm_idup, (comm, newcomm, request));
322 inline int comm_dup_with_info(MPI_Comm comm, MPI_Info info, MPI_Comm *newcomm) {
323 CALL_LOG_RETURN(MPI_Comm_dup_with_info, (comm, info, newcomm));
325 inline MPI_Comm comm_f2c(MPI_Fint comm) { CALL_LOG_RETURN(MPI_Comm_f2c, (comm)); }
326 inline int comm_free_keyval(
int *comm_keyval) {
327 CALL_LOG_RETURN(MPI_Comm_free_keyval, (comm_keyval));
329 inline int comm_free(MPI_Comm *comm) { CALL_LOG_RETURN(MPI_Comm_free, (comm)); }
330 inline int comm_get_attr(MPI_Comm comm,
int comm_keyval,
void *attribute_val,
int *flag) {
331 CALL_LOG_RETURN(MPI_Comm_get_attr, (comm, comm_keyval, attribute_val, flag));
333 inline int dist_graph_create(
344 MPI_Dist_graph_create,
345 (comm_old, n, nodes, degrees, targets, weights, info, reorder, newcomm));
347 inline int dist_graph_create_adjacent(
351 const int sourceweights[],
353 const int destinations[],
354 const int destweights[],
357 MPI_Comm *comm_dist_graph) {
359 MPI_Dist_graph_create_adjacent,
371 inline int dist_graph_neighbors(
380 MPI_Dist_graph_neighbors,
381 (comm, maxindegree, sources, sourceweights, maxoutdegree, destinations, destweights));
383 inline int dist_graph_neighbors_count(
384 MPI_Comm comm,
int *inneighbors,
int *outneighbors,
int *weighted) {
386 MPI_Dist_graph_neighbors_count, (comm, inneighbors, outneighbors, weighted));
388 inline int comm_get_errhandler(MPI_Comm comm, MPI_Errhandler *erhandler) {
389 CALL_LOG_RETURN(MPI_Comm_get_errhandler, (comm, erhandler));
391 inline int comm_get_info(MPI_Comm comm, MPI_Info *info_used) {
392 CALL_LOG_RETURN(MPI_Comm_get_info, (comm, info_used));
394 inline int comm_get_name(MPI_Comm comm,
char *comm_name,
int *resultlen) {
395 CALL_LOG_RETURN(MPI_Comm_get_name, (comm, comm_name, resultlen));
397 inline int comm_get_parent(MPI_Comm *parent) { CALL_LOG_RETURN(MPI_Comm_get_parent, (parent)); }
398 inline int comm_group(MPI_Comm comm, MPI_Group *group) {
399 CALL_LOG_RETURN(MPI_Comm_group, (comm, group));
401 inline int comm_join(
int fd, MPI_Comm *intercomm) {
402 CALL_LOG_RETURN(MPI_Comm_join, (fd, intercomm));
404 inline int comm_rank(MPI_Comm comm,
int *rank) { CALL_LOG_RETURN(MPI_Comm_rank, (comm, rank)); }
405 inline int comm_remote_group(MPI_Comm comm, MPI_Group *group) {
406 CALL_LOG_RETURN(MPI_Comm_remote_group, (comm, group));
408 inline int comm_remote_size(MPI_Comm comm,
int *size) {
409 CALL_LOG_RETURN(MPI_Comm_remote_size, (comm, size));
411 inline int comm_set_attr(MPI_Comm comm,
int comm_keyval,
void *attribute_val) {
412 CALL_LOG_RETURN(MPI_Comm_set_attr, (comm, comm_keyval, attribute_val));
414 inline int comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler) {
415 CALL_LOG_RETURN(MPI_Comm_set_errhandler, (comm, errhandler));
417 inline int comm_set_info(MPI_Comm comm, MPI_Info info) {
418 CALL_LOG_RETURN(MPI_Comm_set_info, (comm, info));
420 inline int comm_set_name(MPI_Comm comm,
const char *comm_name) {
421 CALL_LOG_RETURN(MPI_Comm_set_name, (comm, comm_name));
423 inline int comm_size(MPI_Comm comm,
int *size) { CALL_LOG_RETURN(MPI_Comm_size, (comm, size)); }
424 inline int comm_spawn(
432 int array_of_errcodes[]) {
435 (command, argv, maxprocs, info, root, comm, intercomm, array_of_errcodes));
437 inline int comm_spawn_multiple(
439 char *array_of_commands[],
440 char **array_of_argv[],
441 const int array_of_maxprocs[],
442 const MPI_Info array_of_info[],
446 int array_of_errcodes[]) {
448 MPI_Comm_spawn_multiple,
459 inline int comm_split(MPI_Comm comm,
int color,
int key, MPI_Comm *newcomm) {
460 CALL_LOG_RETURN(MPI_Comm_split, (comm, color, key, newcomm));
462 inline int comm_split_type(
463 MPI_Comm comm,
int split_type,
int key, MPI_Info info, MPI_Comm *newcomm) {
464 CALL_LOG_RETURN(MPI_Comm_split_type, (comm, split_type, key, info, newcomm));
466 inline int comm_test_inter(MPI_Comm comm,
int *flag) {
467 CALL_LOG_RETURN(MPI_Comm_test_inter, (comm, flag));
469 inline int compare_and_swap(
470 const void *origin_addr,
471 const void *compare_addr,
473 MPI_Datatype datatype,
475 MPI_Aint target_disp,
478 MPI_Compare_and_swap,
479 (origin_addr, compare_addr, result_addr, datatype, target_rank, target_disp, win));
481 inline int dims_create(
int nnodes,
int ndims,
int dims[]) {
482 CALL_LOG_RETURN(MPI_Dims_create, (nnodes, ndims, dims));
484 inline MPI_Fint errhandler_c2f(MPI_Errhandler errhandler) {
485 CALL_LOG_RETURN(MPI_Errhandler_c2f, (errhandler));
487 inline MPI_Errhandler errhandler_f2c(MPI_Fint errhandler) {
488 CALL_LOG_RETURN(MPI_Errhandler_f2c, (errhandler));
490 inline int errhandler_free(MPI_Errhandler *errhandler) {
491 CALL_LOG_RETURN(MPI_Errhandler_free, (errhandler));
493 inline int error_class(
int errorcode,
int *errorclass) {
494 CALL_LOG_RETURN(MPI_Error_class, (errorcode, errorclass));
496 inline int error_string(
int errorcode,
char *
string,
int *resultlen) {
497 CALL_LOG_RETURN(MPI_Error_string, (errorcode,
string, resultlen));
503 MPI_Datatype datatype,
506 CALL_LOG_RETURN(MPI_Exscan, (sendbuf, recvbuf, count, datatype, op, comm));
508 inline int fetch_and_op(
509 const void *origin_addr,
511 MPI_Datatype datatype,
513 MPI_Aint target_disp,
518 (origin_addr, result_addr, datatype, target_rank, target_disp, op, win));
524 MPI_Datatype datatype,
527 MPI_Request *request) {
528 CALL_LOG_RETURN(MPI_Iexscan, (sendbuf, recvbuf, count, datatype, op, comm, request));
530 inline MPI_Fint file_c2f(MPI_File file) { CALL_LOG_RETURN(MPI_File_c2f, (file)); }
531 inline MPI_File file_f2c(MPI_Fint file) { CALL_LOG_RETURN(MPI_File_f2c, (file)); }
532 inline int file_call_errhandler(MPI_File fh,
int errorcode) {
533 CALL_LOG_RETURN(MPI_File_call_errhandler, (fh, errorcode));
535 inline int file_create_errhandler(
536 MPI_File_errhandler_function *function, MPI_Errhandler *errhandler) {
537 CALL_LOG_RETURN(MPI_File_create_errhandler, (function, errhandler));
539 inline int file_set_errhandler(MPI_File file, MPI_Errhandler errhandler) {
540 CALL_LOG_RETURN(MPI_File_set_errhandler, (file, errhandler));
542 inline int file_get_errhandler(MPI_File file, MPI_Errhandler *errhandler) {
543 CALL_LOG_RETURN(MPI_File_get_errhandler, (file, errhandler));
545 inline int file_delete(
const char *filename, MPI_Info info) {
546 CALL_LOG_RETURN(MPI_File_delete, (filename, info));
548 inline int file_set_size(MPI_File fh, MPI_Offset size) {
549 CALL_LOG_RETURN(MPI_File_set_size, (fh, size));
551 inline int file_preallocate(MPI_File fh, MPI_Offset size) {
552 CALL_LOG_RETURN(MPI_File_preallocate, (fh, size));
554 inline int file_get_size(MPI_File fh, MPI_Offset *size) {
555 CALL_LOG_RETURN(MPI_File_get_size, (fh, size));
557 inline int file_get_group(MPI_File fh, MPI_Group *group) {
558 CALL_LOG_RETURN(MPI_File_get_group, (fh, group));
560 inline int file_get_amode(MPI_File fh,
int *amode) {
561 CALL_LOG_RETURN(MPI_File_get_amode, (fh, amode));
563 inline int file_set_info(MPI_File fh, MPI_Info info) {
564 CALL_LOG_RETURN(MPI_File_set_info, (fh, info));
566 inline int file_get_info(MPI_File fh, MPI_Info *info_used) {
567 CALL_LOG_RETURN(MPI_File_get_info, (fh, info_used));
569 inline int file_get_view(
570 MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype, MPI_Datatype *filetype,
char *datarep) {
571 CALL_LOG_RETURN(MPI_File_get_view, (fh, disp, etype, filetype, datarep));
573 inline int file_read_at_all(
578 MPI_Datatype datatype,
579 MPI_Status *status) {
580 CALL_LOG_RETURN(MPI_File_read_at_all, (fh, offset, buf, count, datatype, status));
582 inline int file_write_at_all(
587 MPI_Datatype datatype,
588 MPI_Status *status) {
589 CALL_LOG_RETURN(MPI_File_write_at_all, (fh, offset, buf, count, datatype, status));
591 inline int file_iread_at(
596 MPI_Datatype datatype,
597 MPI_Request *request) {
598 CALL_LOG_RETURN(MPI_File_iread_at, (fh, offset, buf, count, datatype, request));
600 inline int file_iwrite_at(
605 MPI_Datatype datatype,
606 MPI_Request *request) {
607 CALL_LOG_RETURN(MPI_File_iwrite_at, (fh, offset, buf, count, datatype, request));
609 inline int file_iread_at_all(
614 MPI_Datatype datatype,
615 MPI_Request *request) {
616 CALL_LOG_RETURN(MPI_File_iread_at_all, (fh, offset, buf, count, datatype, request));
618 inline int file_iwrite_at_all(
623 MPI_Datatype datatype,
624 MPI_Request *request) {
625 CALL_LOG_RETURN(MPI_File_iwrite_at_all, (fh, offset, buf, count, datatype, request));
627 inline int file_read_all(
628 MPI_File fh,
void *buf,
int count, MPI_Datatype datatype, MPI_Status *status) {
629 CALL_LOG_RETURN(MPI_File_read_all, (fh, buf, count, datatype, status));
631 inline int file_iread(
632 MPI_File fh,
void *buf,
int count, MPI_Datatype datatype, MPI_Request *request) {
633 CALL_LOG_RETURN(MPI_File_iread, (fh, buf, count, datatype, request));
635 inline int file_iwrite(
636 MPI_File fh,
const void *buf,
int count, MPI_Datatype datatype, MPI_Request *request) {
637 CALL_LOG_RETURN(MPI_File_iwrite, (fh, buf, count, datatype, request));
639 inline int file_iread_all(
640 MPI_File fh,
void *buf,
int count, MPI_Datatype datatype, MPI_Request *request) {
641 CALL_LOG_RETURN(MPI_File_iread_all, (fh, buf, count, datatype, request));
643 inline int file_iwrite_all(
644 MPI_File fh,
const void *buf,
int count, MPI_Datatype datatype, MPI_Request *request) {
645 CALL_LOG_RETURN(MPI_File_iwrite_all, (fh, buf, count, datatype, request));
647 inline int file_seek(MPI_File fh, MPI_Offset offset,
int whence) {
648 CALL_LOG_RETURN(MPI_File_seek, (fh, offset, whence));
650 inline int file_get_position(MPI_File fh, MPI_Offset *offset) {
651 CALL_LOG_RETURN(MPI_File_get_position, (fh, offset));
653 inline int file_get_byte_offset(MPI_File fh, MPI_Offset offset, MPI_Offset *disp) {
654 CALL_LOG_RETURN(MPI_File_get_byte_offset, (fh, offset, disp));
656 inline int file_read_shared(
657 MPI_File fh,
void *buf,
int count, MPI_Datatype datatype, MPI_Status *status) {
658 CALL_LOG_RETURN(MPI_File_read_shared, (fh, buf, count, datatype, status));
660 inline int file_write_shared(
661 MPI_File fh,
const void *buf,
int count, MPI_Datatype datatype, MPI_Status *status) {
662 CALL_LOG_RETURN(MPI_File_write_shared, (fh, buf, count, datatype, status));
664 inline int file_iread_shared(
665 MPI_File fh,
void *buf,
int count, MPI_Datatype datatype, MPI_Request *request) {
666 CALL_LOG_RETURN(MPI_File_iread_shared, (fh, buf, count, datatype, request));
668 inline int file_iwrite_shared(
669 MPI_File fh,
const void *buf,
int count, MPI_Datatype datatype, MPI_Request *request) {
670 CALL_LOG_RETURN(MPI_File_iwrite_shared, (fh, buf, count, datatype, request));
672 inline int file_read_ordered(
673 MPI_File fh,
void *buf,
int count, MPI_Datatype datatype, MPI_Status *status) {
674 CALL_LOG_RETURN(MPI_File_read_ordered, (fh, buf, count, datatype, status));
676 inline int file_write_ordered(
677 MPI_File fh,
const void *buf,
int count, MPI_Datatype datatype, MPI_Status *status) {
678 CALL_LOG_RETURN(MPI_File_write_ordered, (fh, buf, count, datatype, status));
680 inline int file_seek_shared(MPI_File fh, MPI_Offset offset,
int whence) {
681 CALL_LOG_RETURN(MPI_File_seek_shared, (fh, offset, whence));
683 inline int file_get_position_shared(MPI_File fh, MPI_Offset *offset) {
684 CALL_LOG_RETURN(MPI_File_get_position_shared, (fh, offset));
686 inline int file_read_at_all_begin(
687 MPI_File fh, MPI_Offset offset,
void *buf,
int count, MPI_Datatype datatype) {
688 CALL_LOG_RETURN(MPI_File_read_at_all_begin, (fh, offset, buf, count, datatype));
690 inline int file_read_at_all_end(MPI_File fh,
void *buf, MPI_Status *status) {
691 CALL_LOG_RETURN(MPI_File_read_at_all_end, (fh, buf, status));
693 inline int file_write_at_all_begin(
694 MPI_File fh, MPI_Offset offset,
const void *buf,
int count, MPI_Datatype datatype) {
695 CALL_LOG_RETURN(MPI_File_write_at_all_begin, (fh, offset, buf, count, datatype));
697 inline int file_write_at_all_end(MPI_File fh,
const void *buf, MPI_Status *status) {
698 CALL_LOG_RETURN(MPI_File_write_at_all_end, (fh, buf, status));
700 inline int file_read_all_begin(MPI_File fh,
void *buf,
int count, MPI_Datatype datatype) {
701 CALL_LOG_RETURN(MPI_File_read_all_begin, (fh, buf, count, datatype));
703 inline int file_read_all_end(MPI_File fh,
void *buf, MPI_Status *status) {
704 CALL_LOG_RETURN(MPI_File_read_all_end, (fh, buf, status));
706 inline int file_write_all_begin(
707 MPI_File fh,
const void *buf,
int count, MPI_Datatype datatype) {
708 CALL_LOG_RETURN(MPI_File_write_all_begin, (fh, buf, count, datatype));
710 inline int file_write_all_end(MPI_File fh,
const void *buf, MPI_Status *status) {
711 CALL_LOG_RETURN(MPI_File_write_all_end, (fh, buf, status));
713 inline int file_read_ordered_begin(MPI_File fh,
void *buf,
int count, MPI_Datatype datatype) {
714 CALL_LOG_RETURN(MPI_File_read_ordered_begin, (fh, buf, count, datatype));
716 inline int file_read_ordered_end(MPI_File fh,
void *buf, MPI_Status *status) {
717 CALL_LOG_RETURN(MPI_File_read_ordered_end, (fh, buf, status));
719 inline int file_write_ordered_begin(
720 MPI_File fh,
const void *buf,
int count, MPI_Datatype datatype) {
721 CALL_LOG_RETURN(MPI_File_write_ordered_begin, (fh, buf, count, datatype));
723 inline int file_write_ordered_end(MPI_File fh,
const void *buf, MPI_Status *status) {
724 CALL_LOG_RETURN(MPI_File_write_ordered_end, (fh, buf, status));
726 inline int file_get_type_extent(MPI_File fh, MPI_Datatype datatype, MPI_Aint *extent) {
727 CALL_LOG_RETURN(MPI_File_get_type_extent, (fh, datatype, extent));
729 inline int file_set_atomicity(MPI_File fh,
int flag) {
730 CALL_LOG_RETURN(MPI_File_set_atomicity, (fh, flag));
732 inline int file_get_atomicity(MPI_File fh,
int *flag) {
733 CALL_LOG_RETURN(MPI_File_get_atomicity, (fh, flag));
735 inline int file_sync(MPI_File fh) { CALL_LOG_RETURN(MPI_File_sync, (fh)); }
736 inline int finalize(
void) { CALL_LOG_RETURN(MPI_Finalize, ()); }
737 inline int finalized(
int *flag) { CALL_LOG_RETURN(MPI_Finalized, (flag)); }
738 inline int free_mem(
void *base) { CALL_LOG_RETURN(MPI_Free_mem, (base)); }
742 MPI_Datatype sendtype,
745 MPI_Datatype recvtype,
748 MPI_Request *request) {
751 (sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request));
756 MPI_Datatype sendtype,
758 const int recvcounts[],
760 MPI_Datatype recvtype,
763 MPI_Request *request) {
777 inline int get_address(
const void *location, MPI_Aint *address) {
778 CALL_LOG_RETURN(MPI_Get_address, (location, address));
780 inline int get_elements(
const MPI_Status *status, MPI_Datatype datatype,
int *count) {
781 CALL_LOG_RETURN(MPI_Get_elements, (status, datatype, count));
783 inline int get_elements_x(
const MPI_Status *status, MPI_Datatype datatype, MPI_Count *count) {
784 CALL_LOG_RETURN(MPI_Get_elements_x, (status, datatype, count));
789 MPI_Datatype origin_datatype,
791 MPI_Aint target_disp,
793 MPI_Datatype target_datatype,
806 inline int get_accumulate(
807 const void *origin_addr,
809 MPI_Datatype origin_datatype,
812 MPI_Datatype result_datatype,
814 MPI_Aint target_disp,
816 MPI_Datatype target_datatype,
834 inline int get_library_version(
char *version,
int *resultlen) {
835 CALL_LOG_RETURN(MPI_Get_library_version, (version, resultlen));
837 inline int get_processor_name(
char *name,
int *resultlen) {
838 CALL_LOG_RETURN(MPI_Get_processor_name, (name, resultlen));
840 inline int get_version(
int *version,
int *subversion) {
841 CALL_LOG_RETURN(MPI_Get_version, (version, subversion));
843 inline int graph_create(
849 MPI_Comm *comm_graph) {
850 CALL_LOG_RETURN(MPI_Graph_create, (comm_old, nnodes, index, edges, reorder, comm_graph));
852 inline int graph_get(MPI_Comm comm,
int maxindex,
int maxedges,
int index[],
int edges[]) {
853 CALL_LOG_RETURN(MPI_Graph_get, (comm, maxindex, maxedges, index, edges));
855 inline int graph_map(
856 MPI_Comm comm,
int nnodes,
const int index[],
const int edges[],
int *newrank) {
857 CALL_LOG_RETURN(MPI_Graph_map, (comm, nnodes, index, edges, newrank));
859 inline int graph_neighbors_count(MPI_Comm comm,
int rank,
int *nneighbors) {
860 CALL_LOG_RETURN(MPI_Graph_neighbors_count, (comm, rank, nneighbors));
862 inline int graph_neighbors(MPI_Comm comm,
int rank,
int maxneighbors,
int neighbors[]) {
863 CALL_LOG_RETURN(MPI_Graph_neighbors, (comm, rank, maxneighbors, neighbors));
865 inline int graphdims_get(MPI_Comm comm,
int *nnodes,
int *nedges) {
866 CALL_LOG_RETURN(MPI_Graphdims_get, (comm, nnodes, nedges));
868 inline int grequest_complete(MPI_Request request) {
869 CALL_LOG_RETURN(MPI_Grequest_complete, (request));
871 inline int grequest_start(
872 MPI_Grequest_query_function *query_fn,
873 MPI_Grequest_free_function *free_fn,
874 MPI_Grequest_cancel_function *cancel_fn,
876 MPI_Request *request) {
877 CALL_LOG_RETURN(MPI_Grequest_start, (query_fn, free_fn, cancel_fn, extra_state, request));
879 inline MPI_Fint group_c2f(MPI_Group group) { CALL_LOG_RETURN(MPI_Group_c2f, (group)); }
880 inline int group_compare(MPI_Group group1, MPI_Group group2,
int *result) {
881 CALL_LOG_RETURN(MPI_Group_compare, (group1, group2, result));
883 inline int group_difference(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup) {
884 CALL_LOG_RETURN(MPI_Group_difference, (group1, group2, newgroup));
886 inline int group_excl(MPI_Group group,
int n,
const int ranks[], MPI_Group *newgroup) {
887 CALL_LOG_RETURN(MPI_Group_excl, (group, n, ranks, newgroup));
889 inline MPI_Group group_f2c(MPI_Fint group) { CALL_LOG_RETURN(MPI_Group_f2c, (group)); }
890 inline int group_free(MPI_Group *group) { CALL_LOG_RETURN(MPI_Group_free, (group)); }
891 inline int group_incl(MPI_Group group,
int n,
const int ranks[], MPI_Group *newgroup) {
892 CALL_LOG_RETURN(MPI_Group_incl, (group, n, ranks, newgroup));
894 inline int group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup) {
895 CALL_LOG_RETURN(MPI_Group_intersection, (group1, group2, newgroup));
897 inline int group_range_excl(MPI_Group group,
int n,
int ranges[][3], MPI_Group *newgroup) {
898 CALL_LOG_RETURN(MPI_Group_range_excl, (group, n, ranges, newgroup));
900 inline int group_range_incl(MPI_Group group,
int n,
int ranges[][3], MPI_Group *newgroup) {
901 CALL_LOG_RETURN(MPI_Group_range_incl, (group, n, ranges, newgroup));
903 inline int group_rank(MPI_Group group,
int *rank) {
904 CALL_LOG_RETURN(MPI_Group_rank, (group, rank));
906 inline int group_size(MPI_Group group,
int *size) {
907 CALL_LOG_RETURN(MPI_Group_size, (group, size));
909 inline int group_translate_ranks(
910 MPI_Group group1,
int n,
const int ranks1[], MPI_Group group2,
int ranks2[]) {
911 CALL_LOG_RETURN(MPI_Group_translate_ranks, (group1, n, ranks1, group2, ranks2));
913 inline int group_union(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup) {
914 CALL_LOG_RETURN(MPI_Group_union, (group1, group2, newgroup));
919 MPI_Datatype datatype,
923 MPI_Request *request) {
924 CALL_LOG_RETURN(MPI_Ibsend, (buf, count, datatype, dest, tag, comm, request));
927 int source,
int tag, MPI_Comm comm,
int *flag, MPI_Message *message, MPI_Status *status) {
928 CALL_LOG_RETURN(MPI_Improbe, (source, tag, comm, flag, message, status));
931 void *buf,
int count, MPI_Datatype type, MPI_Message *message, MPI_Request *request) {
932 CALL_LOG_RETURN(MPI_Imrecv, (buf, count, type, message, request));
934 inline MPI_Fint info_c2f(MPI_Info info) { CALL_LOG_RETURN(MPI_Info_c2f, (info)); }
935 inline int info_create(MPI_Info *info) { CALL_LOG_RETURN(MPI_Info_create, (info)); }
936 inline int info_delete(MPI_Info info,
const char *key) {
937 CALL_LOG_RETURN(MPI_Info_delete, (info, key));
939 inline int info_dup(MPI_Info info, MPI_Info *newinfo) {
940 CALL_LOG_RETURN(MPI_Info_dup, (info, newinfo));
942 inline MPI_Info info_f2c(MPI_Fint info) { CALL_LOG_RETURN(MPI_Info_f2c, (info)); }
943 inline int info_free(MPI_Info *info) { CALL_LOG_RETURN(MPI_Info_free, (info)); }
944 inline int info_get(MPI_Info info,
const char *key,
int valuelen,
char *value,
int *flag) {
945 CALL_LOG_RETURN(MPI_Info_get, (info, key, valuelen, value, flag));
947 inline int info_get_nkeys(MPI_Info info,
int *nkeys) {
948 CALL_LOG_RETURN(MPI_Info_get_nkeys, (info, nkeys));
950 inline int info_get_nthkey(MPI_Info info,
int n,
char *key) {
951 CALL_LOG_RETURN(MPI_Info_get_nthkey, (info, n, key));
953 inline int info_get_valuelen(MPI_Info info,
const char *key,
int *valuelen,
int *flag) {
954 CALL_LOG_RETURN(MPI_Info_get_valuelen, (info, key, valuelen, flag));
956 inline int info_set(MPI_Info info,
const char *key,
const char *value) {
957 CALL_LOG_RETURN(MPI_Info_set, (info, key, value));
959 inline int init(
int *argc,
char ***argv) { CALL_LOG_RETURN(MPI_Init, (argc, argv)); }
960 inline int initialized(
int *flag) { CALL_LOG_RETURN(MPI_Initialized, (flag)); }
961 inline int init_thread(
int *argc,
char ***argv,
int required,
int *provided) {
962 CALL_LOG_RETURN(MPI_Init_thread, (argc, argv, required, provided));
964 inline int intercomm_create(
967 MPI_Comm bridge_comm,
970 MPI_Comm *newintercomm) {
972 MPI_Intercomm_create,
973 (local_comm, local_leader, bridge_comm, remote_leader, tag, newintercomm));
975 inline int intercomm_merge(MPI_Comm intercomm,
int high, MPI_Comm *newintercomm) {
976 CALL_LOG_RETURN(MPI_Intercomm_merge, (intercomm, high, newintercomm));
978 inline int iprobe(
int source,
int tag, MPI_Comm comm,
int *flag, MPI_Status *status) {
979 CALL_LOG_RETURN(MPI_Iprobe, (source, tag, comm, flag, status));
984 MPI_Datatype datatype,
988 MPI_Request *request) {
989 CALL_LOG_RETURN(MPI_Irsend, (buf, count, datatype, dest, tag, comm, request));
994 MPI_Datatype datatype,
998 MPI_Request *request) {
999 CALL_LOG_RETURN(MPI_Issend, (buf, count, datatype, dest, tag, comm, request));
1001 inline int is_thread_main(
int *flag) { CALL_LOG_RETURN(MPI_Is_thread_main, (flag)); }
1002 inline int lookup_name(
const char *service_name, MPI_Info info,
char *port_name) {
1003 CALL_LOG_RETURN(MPI_Lookup_name, (service_name, info, port_name));
1005 inline MPI_Fint message_c2f(MPI_Message message) {
1006 CALL_LOG_RETURN(MPI_Message_c2f, (message));
1008 inline MPI_Message message_f2c(MPI_Fint message) {
1009 CALL_LOG_RETURN(MPI_Message_f2c, (message));
1012 int source,
int tag, MPI_Comm comm, MPI_Message *message, MPI_Status *status) {
1013 CALL_LOG_RETURN(MPI_Mprobe, (source, tag, comm, message, status));
1016 void *buf,
int count, MPI_Datatype type, MPI_Message *message, MPI_Status *status) {
1017 CALL_LOG_RETURN(MPI_Mrecv, (buf, count, type, message, status));
1019 inline int neighbor_allgather(
1020 const void *sendbuf,
1022 MPI_Datatype sendtype,
1025 MPI_Datatype recvtype,
1028 MPI_Neighbor_allgather,
1029 (sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm));
1031 inline int ineighbor_allgather(
1032 const void *sendbuf,
1034 MPI_Datatype sendtype,
1037 MPI_Datatype recvtype,
1039 MPI_Request *request) {
1041 MPI_Ineighbor_allgather,
1042 (sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request));
1044 inline int neighbor_allgatherv(
1045 const void *sendbuf,
1047 MPI_Datatype sendtype,
1049 const int recvcounts[],
1051 MPI_Datatype recvtype,
1054 MPI_Neighbor_allgatherv,
1055 (sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm));
1057 inline int ineighbor_allgatherv(
1058 const void *sendbuf,
1060 MPI_Datatype sendtype,
1062 const int recvcounts[],
1064 MPI_Datatype recvtype,
1066 MPI_Request *request) {
1068 MPI_Ineighbor_allgatherv,
1069 (sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request));
1071 inline int neighbor_alltoall(
1072 const void *sendbuf,
1074 MPI_Datatype sendtype,
1077 MPI_Datatype recvtype,
1080 MPI_Neighbor_alltoall,
1081 (sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm));
1083 inline int ineighbor_alltoall(
1084 const void *sendbuf,
1086 MPI_Datatype sendtype,
1089 MPI_Datatype recvtype,
1091 MPI_Request *request) {
1093 MPI_Ineighbor_alltoall,
1094 (sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request));
1096 inline int neighbor_alltoallv(
1097 const void *sendbuf,
1098 const int sendcounts[],
1099 const int sdispls[],
1100 MPI_Datatype sendtype,
1102 const int recvcounts[],
1103 const int rdispls[],
1104 MPI_Datatype recvtype,
1107 MPI_Neighbor_alltoallv,
1108 (sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm));
1110 inline int ineighbor_alltoallv(
1111 const void *sendbuf,
1112 const int sendcounts[],
1113 const int sdispls[],
1114 MPI_Datatype sendtype,
1116 const int recvcounts[],
1117 const int rdispls[],
1118 MPI_Datatype recvtype,
1120 MPI_Request *request) {
1122 MPI_Ineighbor_alltoallv,
1134 inline int neighbor_alltoallw(
1135 const void *sendbuf,
1136 const int sendcounts[],
1137 const MPI_Aint sdispls[],
1138 const MPI_Datatype sendtypes[],
1140 const int recvcounts[],
1141 const MPI_Aint rdispls[],
1142 const MPI_Datatype recvtypes[],
1145 MPI_Neighbor_alltoallw,
1156 inline int ineighbor_alltoallw(
1157 const void *sendbuf,
1158 const int sendcounts[],
1159 const MPI_Aint sdispls[],
1160 const MPI_Datatype sendtypes[],
1162 const int recvcounts[],
1163 const MPI_Aint rdispls[],
1164 const MPI_Datatype recvtypes[],
1166 MPI_Request *request) {
1168 MPI_Ineighbor_alltoallw,
1180 inline MPI_Fint op_c2f(MPI_Op op) { CALL_LOG_RETURN(MPI_Op_c2f, (op)); }
1181 inline int op_commutative(MPI_Op op,
int *commute) {
1182 CALL_LOG_RETURN(MPI_Op_commutative, (op, commute));
1184 inline int op_create(MPI_User_function *function,
int commute, MPI_Op *op) {
1185 CALL_LOG_RETURN(MPI_Op_create, (function, commute, op));
1187 inline int open_port(MPI_Info info,
char *port_name) {
1188 CALL_LOG_RETURN(MPI_Open_port, (info, port_name));
1190 inline MPI_Op op_f2c(MPI_Fint op) { CALL_LOG_RETURN(MPI_Op_f2c, (op)); }
1191 inline int op_free(MPI_Op *op) { CALL_LOG_RETURN(MPI_Op_free, (op)); }
1192 inline int pack_external(
1193 const char datarep[],
1196 MPI_Datatype datatype,
1199 MPI_Aint *position) {
1201 MPI_Pack_external, (datarep, inbuf, incount, datatype, outbuf, outsize, position));
1203 inline int pack_external_size(
1204 const char datarep[],
int incount, MPI_Datatype datatype, MPI_Aint *size) {
1205 CALL_LOG_RETURN(MPI_Pack_external_size, (datarep, incount, datatype, size));
1210 MPI_Datatype datatype,
1215 CALL_LOG_RETURN(MPI_Pack, (inbuf, incount, datatype, outbuf, outsize, position, comm));
1217 inline int pack_size(
int incount, MPI_Datatype datatype, MPI_Comm comm,
int *size) {
1218 CALL_LOG_RETURN(MPI_Pack_size, (incount, datatype, comm, size));
1224 inline int publish_name(
const char *service_name, MPI_Info info,
const char *port_name) {
1225 CALL_LOG_RETURN(MPI_Publish_name, (service_name, info, port_name));
1228 const void *origin_addr,
1230 MPI_Datatype origin_datatype,
1232 MPI_Aint target_disp,
1234 MPI_Datatype target_datatype,
1247 inline int query_thread(
int *provided) { CALL_LOG_RETURN(MPI_Query_thread, (provided)); }
1248 inline int raccumulate(
1249 const void *origin_addr,
1251 MPI_Datatype origin_datatype,
1253 MPI_Aint target_disp,
1255 MPI_Datatype target_datatype,
1258 MPI_Request *request) {
1272 inline int recv_init(
1275 MPI_Datatype datatype,
1279 MPI_Request *request) {
1280 CALL_LOG_RETURN(MPI_Recv_init, (buf, count, datatype, source, tag, comm, request));
1283 const void *sendbuf,
1286 MPI_Datatype datatype,
1290 CALL_LOG_RETURN(MPI_Reduce, (sendbuf, recvbuf, count, datatype, op, root, comm));
1293 const void *sendbuf,
1296 MPI_Datatype datatype,
1300 MPI_Request *request) {
1301 CALL_LOG_RETURN(MPI_Ireduce, (sendbuf, recvbuf, count, datatype, op, root, comm, request));
1303 inline int reduce_local(
1304 const void *inbuf,
void *inoutbuf,
int count, MPI_Datatype datatype, MPI_Op op) {
1305 CALL_LOG_RETURN(MPI_Reduce_local, (inbuf, inoutbuf, count, datatype, op));
1307 inline int reduce_scatter(
1308 const void *sendbuf,
1310 const int recvcounts[],
1311 MPI_Datatype datatype,
1314 CALL_LOG_RETURN(MPI_Reduce_scatter, (sendbuf, recvbuf, recvcounts, datatype, op, comm));
1316 inline int ireduce_scatter(
1317 const void *sendbuf,
1319 const int recvcounts[],
1320 MPI_Datatype datatype,
1323 MPI_Request *request) {
1325 MPI_Ireduce_scatter, (sendbuf, recvbuf, recvcounts, datatype, op, comm, request));
1327 inline int reduce_scatter_block(
1328 const void *sendbuf,
1331 MPI_Datatype datatype,
1335 MPI_Reduce_scatter_block, (sendbuf, recvbuf, recvcount, datatype, op, comm));
1337 inline int ireduce_scatter_block(
1338 const void *sendbuf,
1341 MPI_Datatype datatype,
1344 MPI_Request *request) {
1346 MPI_Ireduce_scatter_block, (sendbuf, recvbuf, recvcount, datatype, op, comm, request));
1348 inline int register_datarep(
1349 const char *datarep,
1350 MPI_Datarep_conversion_function *read_conversion_fn,
1351 MPI_Datarep_conversion_function *write_conversion_fn,
1352 MPI_Datarep_extent_function *dtype_file_extent_fn,
1353 void *extra_state) {
1355 MPI_Register_datarep,
1356 (datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state));
1358 inline MPI_Fint request_c2f(MPI_Request request) {
1359 CALL_LOG_RETURN(MPI_Request_c2f, (request));
1361 inline MPI_Request request_f2c(MPI_Fint request) {
1362 CALL_LOG_RETURN(MPI_Request_f2c, (request));
1364 inline int request_free(MPI_Request *request) { CALL_LOG_RETURN(MPI_Request_free, (request)); }
1365 inline int request_get_status(MPI_Request request,
int *flag, MPI_Status *status) {
1366 CALL_LOG_RETURN(MPI_Request_get_status, (request, flag, status));
1371 MPI_Datatype origin_datatype,
1373 MPI_Aint target_disp,
1375 MPI_Datatype target_datatype,
1377 MPI_Request *request) {
1390 inline int rget_accumulate(
1391 const void *origin_addr,
1393 MPI_Datatype origin_datatype,
1396 MPI_Datatype result_datatype,
1398 MPI_Aint target_disp,
1400 MPI_Datatype target_datatype,
1403 MPI_Request *request) {
1405 MPI_Rget_accumulate,
1421 const void *origin_addr,
1423 MPI_Datatype origin_datatype,
1425 MPI_Aint target_disp,
1427 MPI_Datatype target_datatype,
1429 MPI_Request *request) {
1443 const void *ibuf,
int count, MPI_Datatype datatype,
int dest,
int tag, MPI_Comm comm) {
1444 CALL_LOG_RETURN(MPI_Rsend, (ibuf, count, datatype, dest, tag, comm));
1446 inline int rsend_init(
1449 MPI_Datatype datatype,
1453 MPI_Request *request) {
1454 CALL_LOG_RETURN(MPI_Rsend_init, (buf, count, datatype, dest, tag, comm, request));
1457 const void *sendbuf,
1460 MPI_Datatype datatype,
1463 CALL_LOG_RETURN(MPI_Scan, (sendbuf, recvbuf, count, datatype, op, comm));
1466 const void *sendbuf,
1469 MPI_Datatype datatype,
1472 MPI_Request *request) {
1473 CALL_LOG_RETURN(MPI_Iscan, (sendbuf, recvbuf, count, datatype, op, comm, request));
1476 const void *sendbuf,
1478 MPI_Datatype sendtype,
1481 MPI_Datatype recvtype,
1485 MPI_Scatter, (sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm));
1487 inline int iscatter(
1488 const void *sendbuf,
1490 MPI_Datatype sendtype,
1493 MPI_Datatype recvtype,
1496 MPI_Request *request) {
1499 (sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request));
1501 inline int scatterv(
1502 const void *sendbuf,
1503 const int sendcounts[],
1505 MPI_Datatype sendtype,
1508 MPI_Datatype recvtype,
1513 (sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm));
1515 inline int iscatterv(
1516 const void *sendbuf,
1517 const int sendcounts[],
1519 MPI_Datatype sendtype,
1522 MPI_Datatype recvtype,
1525 MPI_Request *request) {
1539 inline int send_init(
1542 MPI_Datatype datatype,
1546 MPI_Request *request) {
1547 CALL_LOG_RETURN(MPI_Send_init, (buf, count, datatype, dest, tag, comm, request));
1549 inline int sendrecv(
1550 const void *sendbuf,
1552 MPI_Datatype sendtype,
1557 MPI_Datatype recvtype,
1561 MPI_Status *status) {
1577 inline int sendrecv_replace(
1580 MPI_Datatype datatype,
1586 MPI_Status *status) {
1588 MPI_Sendrecv_replace,
1589 (buf, count, datatype, dest, sendtag, source, recvtag, comm, status));
1591 inline int ssend_init(
1594 MPI_Datatype datatype,
1598 MPI_Request *request) {
1599 CALL_LOG_RETURN(MPI_Ssend_init, (buf, count, datatype, dest, tag, comm, request));
1602 const void *buf,
int count, MPI_Datatype datatype,
int dest,
int tag, MPI_Comm comm) {
1603 CALL_LOG_RETURN(MPI_Ssend, (buf, count, datatype, dest, tag, comm));
1605 inline int start(MPI_Request *request) { CALL_LOG_RETURN(MPI_Start, (request)); }
1606 inline int startall(
int count, MPI_Request array_of_requests[]) {
1607 CALL_LOG_RETURN(MPI_Startall, (count, array_of_requests));
1609 inline int status_c2f(
const MPI_Status *c_status, MPI_Fint *f_status) {
1610 CALL_LOG_RETURN(MPI_Status_c2f, (c_status, f_status));
1612 inline int status_f2c(
const MPI_Fint *f_status, MPI_Status *c_status) {
1613 CALL_LOG_RETURN(MPI_Status_f2c, (f_status, c_status));
1615 inline int status_set_cancelled(MPI_Status *status,
int flag) {
1616 CALL_LOG_RETURN(MPI_Status_set_cancelled, (status, flag));
1618 inline int status_set_elements(MPI_Status *status, MPI_Datatype datatype,
int count) {
1619 CALL_LOG_RETURN(MPI_Status_set_elements, (status, datatype, count));
1621 inline int status_set_elements_x(MPI_Status *status, MPI_Datatype datatype, MPI_Count count) {
1622 CALL_LOG_RETURN(MPI_Status_set_elements_x, (status, datatype, count));
1625 int count, MPI_Request array_of_requests[],
int *flag, MPI_Status array_of_statuses[]) {
1626 CALL_LOG_RETURN(MPI_Testall, (count, array_of_requests, flag, array_of_statuses));
1629 int count, MPI_Request array_of_requests[],
int *index,
int *flag, MPI_Status *status) {
1630 CALL_LOG_RETURN(MPI_Testany, (count, array_of_requests, index, flag, status));
1632 inline int test(MPI_Request *request,
int *flag, MPI_Status *status) {
1633 CALL_LOG_RETURN(MPI_Test, (request, flag, status));
1635 inline int test_cancelled(
const MPI_Status *status,
int *flag) {
1636 CALL_LOG_RETURN(MPI_Test_cancelled, (status, flag));
1638 inline int testsome(
1640 MPI_Request array_of_requests[],
1642 int array_of_indices[],
1643 MPI_Status array_of_statuses[]) {
1646 (incount, array_of_requests, outcount, array_of_indices, array_of_statuses));
1648 inline int topo_test(MPI_Comm comm,
int *status) {
1649 CALL_LOG_RETURN(MPI_Topo_test, (comm, status));
1651 inline MPI_Fint type_c2f(MPI_Datatype datatype) { CALL_LOG_RETURN(MPI_Type_c2f, (datatype)); }
1652 inline int type_commit(MPI_Datatype *type) { CALL_LOG_RETURN(MPI_Type_commit, (type)); }
1653 inline int type_contiguous(
int count, MPI_Datatype oldtype, MPI_Datatype *newtype) {
1654 CALL_LOG_RETURN(MPI_Type_contiguous, (count, oldtype, newtype));
1656 inline int type_create_darray(
1660 const int gsize_array[],
1661 const int distrib_array[],
1662 const int darg_array[],
1663 const int psize_array[],
1665 MPI_Datatype oldtype,
1666 MPI_Datatype *newtype) {
1668 MPI_Type_create_darray,
1680 inline int type_create_f90_complex(
int p,
int r, MPI_Datatype *newtype) {
1681 CALL_LOG_RETURN(MPI_Type_create_f90_complex, (p, r, newtype));
1683 inline int type_create_f90_integer(
int r, MPI_Datatype *newtype) {
1684 CALL_LOG_RETURN(MPI_Type_create_f90_integer, (r, newtype));
1686 inline int type_create_f90_real(
int p,
int r, MPI_Datatype *newtype) {
1687 CALL_LOG_RETURN(MPI_Type_create_f90_real, (p, r, newtype));
1689 inline int type_create_hindexed_block(
1692 const MPI_Aint array_of_displacements[],
1693 MPI_Datatype oldtype,
1694 MPI_Datatype *newtype) {
1696 MPI_Type_create_hindexed_block,
1697 (count, blocklength, array_of_displacements, oldtype, newtype));
1699 inline int type_create_hindexed(
1701 const int array_of_blocklengths[],
1702 const MPI_Aint array_of_displacements[],
1703 MPI_Datatype oldtype,
1704 MPI_Datatype *newtype) {
1706 MPI_Type_create_hindexed,
1707 (count, array_of_blocklengths, array_of_displacements, oldtype, newtype));
1709 inline int type_create_hvector(
1710 int count,
int blocklength, MPI_Aint stride, MPI_Datatype oldtype, MPI_Datatype *newtype) {
1711 CALL_LOG_RETURN(MPI_Type_create_hvector, (count, blocklength, stride, oldtype, newtype));
1713 inline int type_create_keyval(
1714 MPI_Type_copy_attr_function *type_copy_attr_fn,
1715 MPI_Type_delete_attr_function *type_delete_attr_fn,
1717 void *extra_state) {
1719 MPI_Type_create_keyval,
1720 (type_copy_attr_fn, type_delete_attr_fn, type_keyval, extra_state));
1722 inline int type_create_indexed_block(
1725 const int array_of_displacements[],
1726 MPI_Datatype oldtype,
1727 MPI_Datatype *newtype) {
1729 MPI_Type_create_indexed_block,
1730 (count, blocklength, array_of_displacements, oldtype, newtype));
1732 inline int type_create_struct(
1734 const int array_of_block_lengths[],
1735 const MPI_Aint array_of_displacements[],
1736 const MPI_Datatype array_of_types[],
1737 MPI_Datatype *newtype) {
1739 MPI_Type_create_struct,
1740 (count, array_of_block_lengths, array_of_displacements, array_of_types, newtype));
1742 inline int type_create_subarray(
1744 const int size_array[],
1745 const int subsize_array[],
1746 const int start_array[],
1748 MPI_Datatype oldtype,
1749 MPI_Datatype *newtype) {
1751 MPI_Type_create_subarray,
1752 (ndims, size_array, subsize_array, start_array, order, oldtype, newtype));
1754 inline int type_create_resized(
1755 MPI_Datatype oldtype, MPI_Aint lb, MPI_Aint extent, MPI_Datatype *newtype) {
1756 CALL_LOG_RETURN(MPI_Type_create_resized, (oldtype, lb, extent, newtype));
1758 inline int type_delete_attr(MPI_Datatype type,
int type_keyval) {
1759 CALL_LOG_RETURN(MPI_Type_delete_attr, (type, type_keyval));
1761 inline int type_dup(MPI_Datatype type, MPI_Datatype *newtype) {
1762 CALL_LOG_RETURN(MPI_Type_dup, (type, newtype));
1764 inline int type_free(MPI_Datatype *type) { CALL_LOG_RETURN(MPI_Type_free, (type)); }
1765 inline int type_free_keyval(
int *type_keyval) {
1766 CALL_LOG_RETURN(MPI_Type_free_keyval, (type_keyval));
1768 inline MPI_Datatype type_f2c(MPI_Fint datatype) { CALL_LOG_RETURN(MPI_Type_f2c, (datatype)); }
1769 inline int type_get_attr(MPI_Datatype type,
int type_keyval,
void *attribute_val,
int *flag) {
1770 CALL_LOG_RETURN(MPI_Type_get_attr, (type, type_keyval, attribute_val, flag));
1772 inline int type_get_contents(
1777 int array_of_integers[],
1778 MPI_Aint array_of_addresses[],
1779 MPI_Datatype array_of_datatypes[]) {
1781 MPI_Type_get_contents,
1788 array_of_datatypes));
1790 inline int type_get_envelope(
1797 MPI_Type_get_envelope, (type, num_integers, num_addresses, num_datatypes, combiner));
1799 inline int type_get_extent_x(MPI_Datatype type, MPI_Count *lb, MPI_Count *extent) {
1800 CALL_LOG_RETURN(MPI_Type_get_extent_x, (type, lb, extent));
1802 inline int type_get_name(MPI_Datatype type,
char *type_name,
int *resultlen) {
1803 CALL_LOG_RETURN(MPI_Type_get_name, (type, type_name, resultlen));
1805 inline int type_get_true_extent(
1806 MPI_Datatype datatype, MPI_Aint *true_lb, MPI_Aint *true_extent) {
1807 CALL_LOG_RETURN(MPI_Type_get_true_extent, (datatype, true_lb, true_extent));
1809 inline int type_get_true_extent_x(
1810 MPI_Datatype datatype, MPI_Count *true_lb, MPI_Count *true_extent) {
1811 CALL_LOG_RETURN(MPI_Type_get_true_extent_x, (datatype, true_lb, true_extent));
1813 inline int type_indexed(
1815 const int array_of_blocklengths[],
1816 const int array_of_displacements[],
1817 MPI_Datatype oldtype,
1818 MPI_Datatype *newtype) {
1821 (count, array_of_blocklengths, array_of_displacements, oldtype, newtype));
1823 inline int type_match_size(
int typeclass,
int size, MPI_Datatype *type) {
1824 CALL_LOG_RETURN(MPI_Type_match_size, (typeclass, size, type));
1826 inline int type_set_attr(MPI_Datatype type,
int type_keyval,
void *attr_val) {
1827 CALL_LOG_RETURN(MPI_Type_set_attr, (type, type_keyval, attr_val));
1829 inline int type_set_name(MPI_Datatype type,
const char *type_name) {
1830 CALL_LOG_RETURN(MPI_Type_set_name, (type, type_name));
1832 inline int type_size(MPI_Datatype type,
int *size) {
1833 CALL_LOG_RETURN(MPI_Type_size, (type, size));
1835 inline int type_size_x(MPI_Datatype type, MPI_Count *size) {
1836 CALL_LOG_RETURN(MPI_Type_size_x, (type, size));
1838 inline int type_vector(
1839 int count,
int blocklength,
int stride, MPI_Datatype oldtype, MPI_Datatype *newtype) {
1840 CALL_LOG_RETURN(MPI_Type_vector, (count, blocklength, stride, oldtype, newtype));
1848 MPI_Datatype datatype,
1850 CALL_LOG_RETURN(MPI_Unpack, (inbuf, insize, position, outbuf, outcount, datatype, comm));
1852 inline int unpublish_name(
const char *service_name, MPI_Info info,
const char *port_name) {
1853 CALL_LOG_RETURN(MPI_Unpublish_name, (service_name, info, port_name));
1855 inline int unpack_external(
1856 const char datarep[],
1862 MPI_Datatype datatype) {
1864 MPI_Unpack_external, (datarep, inbuf, insize, position, outbuf, outcount, datatype));
1866 inline int waitany(
int count, MPI_Request array_of_requests[],
int *index, MPI_Status *status) {
1867 CALL_LOG_RETURN(MPI_Waitany, (count, array_of_requests, index, status));
1870 inline int waitsome(
1872 MPI_Request array_of_requests[],
1874 int array_of_indices[],
1875 MPI_Status array_of_statuses[]) {
1878 (incount, array_of_requests, outcount, array_of_indices, array_of_statuses));
1880 inline int win_allocate(
1881 MPI_Aint size,
int disp_unit, MPI_Info info, MPI_Comm comm,
void *baseptr, MPI_Win *win) {
1882 CALL_LOG_RETURN(MPI_Win_allocate, (size, disp_unit, info, comm, baseptr, win));
1884 inline int win_allocate_shared(
1885 MPI_Aint size,
int disp_unit, MPI_Info info, MPI_Comm comm,
void *baseptr, MPI_Win *win) {
1886 CALL_LOG_RETURN(MPI_Win_allocate_shared, (size, disp_unit, info, comm, baseptr, win));
1888 inline int win_attach(MPI_Win win,
void *base, MPI_Aint size) {
1889 CALL_LOG_RETURN(MPI_Win_attach, (win, base, size));
1891 inline MPI_Fint win_c2f(MPI_Win win) { CALL_LOG_RETURN(MPI_Win_c2f, (win)); }
1892 inline int win_call_errhandler(MPI_Win win,
int errorcode) {
1893 CALL_LOG_RETURN(MPI_Win_call_errhandler, (win, errorcode));
1895 inline int win_complete(MPI_Win win) { CALL_LOG_RETURN(MPI_Win_complete, (win)); }
1896 inline int win_create(
1897 void *base, MPI_Aint size,
int disp_unit, MPI_Info info, MPI_Comm comm, MPI_Win *win) {
1898 CALL_LOG_RETURN(MPI_Win_create, (base, size, disp_unit, info, comm, win));
1900 inline int win_create_dynamic(MPI_Info info, MPI_Comm comm, MPI_Win *win) {
1901 CALL_LOG_RETURN(MPI_Win_create_dynamic, (info, comm, win));
1903 inline int win_create_errhandler(
1904 MPI_Win_errhandler_function *function, MPI_Errhandler *errhandler) {
1905 CALL_LOG_RETURN(MPI_Win_create_errhandler, (function, errhandler));
1907 inline int win_create_keyval(
1908 MPI_Win_copy_attr_function *win_copy_attr_fn,
1909 MPI_Win_delete_attr_function *win_delete_attr_fn,
1911 void *extra_state) {
1913 MPI_Win_create_keyval, (win_copy_attr_fn, win_delete_attr_fn, win_keyval, extra_state));
1915 inline int win_delete_attr(MPI_Win win,
int win_keyval) {
1916 CALL_LOG_RETURN(MPI_Win_delete_attr, (win, win_keyval));
1918 inline int win_detach(MPI_Win win,
const void *base) {
1919 CALL_LOG_RETURN(MPI_Win_detach, (win, base));
1921 inline MPI_Win win_f2c(MPI_Fint win) { CALL_LOG_RETURN(MPI_Win_f2c, (win)); }
1922 inline int win_fence(
int assert, MPI_Win win) { CALL_LOG_RETURN(MPI_Win_fence, (assert, win)); }
1923 inline int win_flush(
int rank, MPI_Win win) { CALL_LOG_RETURN(MPI_Win_flush, (rank, win)); }
1924 inline int win_flush_all(MPI_Win win) { CALL_LOG_RETURN(MPI_Win_flush_all, (win)); }
1925 inline int win_flush_local(
int rank, MPI_Win win) {
1926 CALL_LOG_RETURN(MPI_Win_flush_local, (rank, win));
1928 inline int win_flush_local_all(MPI_Win win) { CALL_LOG_RETURN(MPI_Win_flush_local_all, (win)); }
1929 inline int win_free(MPI_Win *win) { CALL_LOG_RETURN(MPI_Win_free, (win)); }
1930 inline int win_free_keyval(
int *win_keyval) {
1931 CALL_LOG_RETURN(MPI_Win_free_keyval, (win_keyval));
1933 inline int win_get_attr(MPI_Win win,
int win_keyval,
void *attribute_val,
int *flag) {
1934 CALL_LOG_RETURN(MPI_Win_get_attr, (win, win_keyval, attribute_val, flag));
1936 inline int win_get_errhandler(MPI_Win win, MPI_Errhandler *errhandler) {
1937 CALL_LOG_RETURN(MPI_Win_get_errhandler, (win, errhandler));
1939 inline int win_get_group(MPI_Win win, MPI_Group *group) {
1940 CALL_LOG_RETURN(MPI_Win_get_group, (win, group));
1942 inline int win_get_info(MPI_Win win, MPI_Info *info_used) {
1943 CALL_LOG_RETURN(MPI_Win_get_info, (win, info_used));
1945 inline int win_get_name(MPI_Win win,
char *win_name,
int *resultlen) {
1946 CALL_LOG_RETURN(MPI_Win_get_name, (win, win_name, resultlen));
1948 inline int win_lock(
int lock_type,
int rank,
int assert, MPI_Win win) {
1949 CALL_LOG_RETURN(MPI_Win_lock, (lock_type, rank, assert, win));
1951 inline int win_lock_all(
int assert, MPI_Win win) {
1952 CALL_LOG_RETURN(MPI_Win_lock_all, (assert, win));
1954 inline int win_post(MPI_Group group,
int assert, MPI_Win win) {
1955 CALL_LOG_RETURN(MPI_Win_post, (group, assert, win));
1957 inline int win_set_attr(MPI_Win win,
int win_keyval,
void *attribute_val) {
1958 CALL_LOG_RETURN(MPI_Win_set_attr, (win, win_keyval, attribute_val));
1960 inline int win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler) {
1961 CALL_LOG_RETURN(MPI_Win_set_errhandler, (win, errhandler));
1963 inline int win_set_info(MPI_Win win, MPI_Info info) {
1964 CALL_LOG_RETURN(MPI_Win_set_info, (win, info));
1966 inline int win_set_name(MPI_Win win,
const char *win_name) {
1967 CALL_LOG_RETURN(MPI_Win_set_name, (win, win_name));
1969 inline int win_shared_query(
1970 MPI_Win win,
int rank, MPI_Aint *size,
int *disp_unit,
void *baseptr) {
1971 CALL_LOG_RETURN(MPI_Win_shared_query, (win, rank, size, disp_unit, baseptr));
1973 inline int win_start(MPI_Group group,
int assert, MPI_Win win) {
1974 CALL_LOG_RETURN(MPI_Win_start, (group, assert, win));
1976 inline int win_sync(MPI_Win win) { CALL_LOG_RETURN(MPI_Win_sync, (win)); }
1977 inline int win_test(MPI_Win win,
int *flag) { CALL_LOG_RETURN(MPI_Win_test, (win, flag)); }
1978 inline int win_unlock(
int rank, MPI_Win win) { CALL_LOG_RETURN(MPI_Win_unlock, (rank, win)); }
1979 inline int win_unlock_all(MPI_Win win) { CALL_LOG_RETURN(MPI_Win_unlock_all, (win)); }
1980 inline int win_wait(MPI_Win win) { CALL_LOG_RETURN(MPI_Win_wait, (win)); }
1981 inline double wtick(
void) { CALL_LOG_RETURN(MPI_Wtick, ()); }
1982 inline double wtime(
void) { CALL_LOG_RETURN(MPI_Wtime, ()); }
1986#undef CALL_LOG_RETURN
Use this header to include MPI properly.