source: XIOS/dev/branch_openmp/extern/src_ep_dev/ep_comm.hpp @ 1539

Last change on this file since 1539 was 1539, checked in by yushan, 6 years ago

update intercomm_merge and remove redundant files

File size: 1.2 KB
Line 
1#ifndef EP_COMM_HPP_INCLUDED
2#define EP_COMM_HPP_INCLUDED
3
4#include "ep_message.hpp"
5#include "ep_barrier.hpp"
6#include "ep_buffer.hpp"
7
8typedef std::pair< int, int > SIZE_RANK_INFO; // < rank, size>
9typedef std::vector< std::pair<int, int> > RANK_MAP;  // at(ep_rank) = <ep_rank_local, mpi_rank>
10typedef std::map<int, std::pair<int, int> > EP_RANK_MAP;  // key(ep_rank) = <ep_rank_local, mpi_rank>
11typedef std::list<ep_lib::MPI_Message > Message_list;
12typedef std::map<int, int > INTER_RANK_MAP;
13
14namespace ep_lib
15{
16
17  class ep_comm;
18 
19  class ep_communicator
20  {
21    public:
22
23    SIZE_RANK_INFO size_rank_info[3]; // 0: ep_rank,     ep_size
24                                      // 1: ep_rank_loc, num_ep
25                                      // 2: mpi_rank,    mpi_size
26
27    ep_comm **comm_list;
28
29    Message_list *message_queue;
30
31  };
32 
33
34  class ep_comm
35  {
36    public:
37
38    bool is_ep;
39    bool is_intercomm;
40
41    BUFFER     *my_buffer;
42   
43    ep_barrier *ep_barrier;
44
45    EP_RANK_MAP   *ep_rank_map;
46   
47    INTER_RANK_MAP *inter_rank_map;
48
49    void* mpi_comm;
50    ep_communicator *ep_comm_ptr;
51    ep_comm    **mem_bridge;
52    void* mpi_bridge;
53
54    ep_comm(){}; 
55    ep_comm(void* comm);
56
57  };
58 
59  typedef ep_comm*  MPI_Comm;
60
61
62}
63
64
65
66#endif // EP_COMM_HPP_INCLUDED
67
Note: See TracBrowser for help on using the repository browser.