[1037] | 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_local.hpp" |
---|
| 7 | #include "ep_lib_collective.hpp" |
---|
| 8 | #include "ep_tag.hpp" |
---|
| 9 | #include "ep_lib_fortran.hpp" |
---|
| 10 | |
---|
| 11 | |
---|
| 12 | namespace ep_lib |
---|
| 13 | { |
---|
| 14 | #ifdef _intelmpi |
---|
| 15 | typedef int MPI_Datatype; |
---|
| 16 | typedef int MPI_Op; |
---|
| 17 | #elif _openmpi |
---|
| 18 | typedef void* MPI_Datatype; |
---|
| 19 | typedef void* MPI_Op; |
---|
| 20 | #endif |
---|
| 21 | |
---|
[1053] | 22 | #ifdef _intelmpi |
---|
[1037] | 23 | #define MPI_ANY_SOURCE -2 |
---|
| 24 | #define MPI_ANY_TAG -1 |
---|
[1053] | 25 | #elif _openmpi |
---|
| 26 | #define MPI_ANY_SOURCE -1 |
---|
| 27 | #define MPI_ANY_TAG -1 |
---|
| 28 | #endif |
---|
[1037] | 29 | |
---|
| 30 | int MPI_Init_thread(int* argc, char*** argv, int required, int*provided); |
---|
| 31 | |
---|
| 32 | int MPI_Init(int *argc, char ***argv); |
---|
| 33 | |
---|
| 34 | int MPI_Initialized(int *flag); |
---|
| 35 | |
---|
| 36 | int MPI_Comm_rank(MPI_Comm comm, int* rank); |
---|
| 37 | |
---|
| 38 | int MPI_Comm_size(MPI_Comm comm, int* rank); |
---|
| 39 | |
---|
| 40 | int MPI_Comm_free(MPI_Comm* comm); |
---|
| 41 | |
---|
| 42 | int MPI_Finalize(); |
---|
| 43 | |
---|
| 44 | double MPI_Wtime(); |
---|
| 45 | |
---|
| 46 | int MPI_Abort(MPI_Comm comm, int errorcode); |
---|
| 47 | |
---|
| 48 | int MPI_Get_count(const MPI_Status *status, MPI_Datatype datatype, int *count); |
---|
| 49 | |
---|
| 50 | #ifdef _openmpi |
---|
| 51 | int MPI_Comm_create_endpoints(void* mpi_comm, int num_ep, MPI_Info info, MPI_Comm *& out_comm_hdls); // from MPI to create endpoints |
---|
| 52 | #elif _intelmpi |
---|
| 53 | int MPI_Comm_create_endpoints(int mpi_comm, int num_ep, MPI_Info info, MPI_Comm *& out_comm_hdls); // from MPI to create endpoints |
---|
| 54 | #endif |
---|
| 55 | |
---|
| 56 | int MPI_Comm_create_endpoints(MPI_Comm base_comm, int num_ep, MPI_Info info, MPI_Comm *& out_comm_hdls); // from EP to create endpoints |
---|
| 57 | |
---|
| 58 | int MPI_Send(void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm); |
---|
| 59 | int MPI_Ssend(void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm); |
---|
| 60 | int MPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request); |
---|
| 61 | int MPI_Issend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request); |
---|
| 62 | |
---|
| 63 | int tag_combine(int real_tag, int src, int dest); |
---|
| 64 | int get_ep_rank(MPI_Comm comm, int ep_rank_loc, int mpi_rank); |
---|
| 65 | int get_ep_rank_intercomm(MPI_Comm comm, int ep_rank_loc, int mpi_rank); |
---|
| 66 | |
---|
| 67 | int Message_Check(MPI_Comm comm); |
---|
| 68 | |
---|
| 69 | int MPI_Recv (void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Status *status); |
---|
| 70 | int MPI_Irecv (void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Request *request); |
---|
| 71 | int MPI_Mrecv (void *buf, int count, MPI_Datatype datatype, MPI_Message *message, MPI_Status *status); |
---|
| 72 | int MPI_Imrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message, MPI_Request *request); |
---|
| 73 | |
---|
| 74 | |
---|
| 75 | int MPI_Test(MPI_Request *request, int *flag, MPI_Status *status); |
---|
| 76 | int MPI_Testall(int count, MPI_Request *array_of_requests, int *flag, MPI_Status *array_of_statuses); |
---|
| 77 | |
---|
| 78 | int MPI_Wait(MPI_Request *request, MPI_Status *status); |
---|
| 79 | int MPI_Waitall(int count, MPI_Request *array_of_requests, MPI_Status *array_of_statuses); |
---|
| 80 | |
---|
| 81 | |
---|
| 82 | int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag, MPI_Status *status); |
---|
| 83 | int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, MPI_Message *message, MPI_Status *status); |
---|
| 84 | |
---|
| 85 | int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr); |
---|
| 86 | |
---|
| 87 | int MPI_Alloc_mem(unsigned long size, MPI_Info info, void *baseptr); |
---|
| 88 | |
---|
| 89 | |
---|
| 90 | void check_sum_send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, int type); |
---|
| 91 | void check_sum_recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, int type); |
---|
| 92 | } |
---|
| 93 | |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | #endif // EP_LIB_HPP_INCLUDED |
---|