[1603] | 1 | #ifndef EP_LIB_HPP_INCLUDED |
---|
| 2 | #define EP_LIB_HPP_INCLUDED |
---|
| 3 | |
---|
| 4 | #include "ep_type.hpp" |
---|
| 5 | #include "ep_lib_intercomm.hpp" |
---|
| 6 | #include "ep_lib_endpoint.hpp" |
---|
| 7 | #include "ep_lib_local.hpp" |
---|
| 8 | #include "ep_lib_collective.hpp" |
---|
| 9 | #include "ep_lib_fortran.hpp" |
---|
| 10 | #include "ep_lib_win.hpp" |
---|
| 11 | #include "ep_lib_mpi.hpp" |
---|
| 12 | |
---|
| 13 | |
---|
| 14 | namespace ep_lib |
---|
| 15 | { |
---|
| 16 | typedef void* MPI_Datatype; |
---|
| 17 | typedef void* MPI_Op; |
---|
| 18 | |
---|
| 19 | int MPI_Init_thread(int* argc, char*** argv, int required, int*provided); |
---|
| 20 | |
---|
| 21 | int MPI_Init(int *argc, char ***argv); |
---|
| 22 | |
---|
| 23 | int MPI_Initialized(int *flag); |
---|
| 24 | |
---|
| 25 | int MPI_Comm_rank(MPI_Comm comm, int* rank); |
---|
| 26 | |
---|
| 27 | int MPI_Comm_size(MPI_Comm comm, int* rank); |
---|
| 28 | |
---|
| 29 | int MPI_Comm_free(MPI_Comm* comm); |
---|
| 30 | |
---|
| 31 | int MPI_Finalize(); |
---|
| 32 | |
---|
| 33 | double MPI_Wtime(); |
---|
| 34 | |
---|
| 35 | int MPI_Abort(MPI_Comm comm, int errorcode); |
---|
| 36 | |
---|
| 37 | int MPI_Get_count(const MPI_Status *status, MPI_Datatype datatype, int *count); |
---|
| 38 | |
---|
| 39 | int MPI_Comm_remote_size(MPI_Comm comm, int *size); |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | int MPI_Send(void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm); |
---|
| 43 | int MPI_Ssend(void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm); |
---|
| 44 | int MPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request); |
---|
| 45 | int MPI_Issend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request); |
---|
| 46 | |
---|
| 47 | |
---|
| 48 | int MPI_Recv (void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Status *status); |
---|
| 49 | int MPI_Irecv (void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Request *request); |
---|
| 50 | int MPI_Mrecv (void *buf, int count, MPI_Datatype datatype, MPI_Message *message, MPI_Status *status); |
---|
| 51 | int MPI_Imrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message, MPI_Request *request); |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | int MPI_Test(MPI_Request *request, int *flag, MPI_Status *status); |
---|
| 55 | int MPI_Testall(int count, MPI_Request *array_of_requests, int *flag, MPI_Status *array_of_statuses); |
---|
| 56 | |
---|
| 57 | int MPI_Wait(MPI_Request *request, MPI_Status *status); |
---|
| 58 | int MPI_Waitall(int count, MPI_Request *array_of_requests, MPI_Status *array_of_statuses); |
---|
| 59 | |
---|
| 60 | |
---|
| 61 | int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag, MPI_Status *status); |
---|
| 62 | int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, MPI_Message *message, MPI_Status *status); |
---|
| 63 | |
---|
| 64 | int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr); |
---|
| 65 | int MPI_Alloc_mem(unsigned long size, MPI_Info info, void *baseptr); |
---|
| 66 | |
---|
| 67 | int MPI_Comm_test_inter(MPI_Comm comm, int *flag); |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | void check_sum_send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, int type); |
---|
| 71 | void check_sum_recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, int type); |
---|
| 72 | |
---|
| 73 | bool valid_type(MPI_Datatype type); |
---|
| 74 | bool valid_op(MPI_Op op); |
---|
| 75 | |
---|
| 76 | int tag_combine(int real_tag, int src, int dest); |
---|
| 77 | int get_ep_rank(MPI_Comm comm, int ep_rank_loc, int mpi_rank); |
---|
| 78 | |
---|
| 79 | int Message_Check(MPI_Comm comm); |
---|
| 80 | |
---|
| 81 | int Request_Check(); |
---|
| 82 | |
---|
| 83 | void show_EP_PendingRequests(std::list< ep_lib::MPI_Request* > * EP_PendingRequest); |
---|
| 84 | |
---|
| 85 | int test_sendrecv(MPI_Comm comm); |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | } |
---|
| 89 | |
---|
| 90 | #endif // EP_LIB_HPP_INCLUDED |
---|