source: XIOS/dev/dev_trunk_omp/extern/src_ep_dev2/ep_lib.hpp @ 1776

Last change on this file since 1776 was 1651, checked in by yushan, 5 years ago

dev on EP for tracing with itac. Tested on ADA with test_omp

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