source: XIOS/trunk/extern/src_ep/ep_type.cpp @ 1034

Last change on this file since 1034 was 1034, checked in by yushan, 4 years ago

adding src_ep into extern folder

File size: 2.2 KB
Line 
1#include "ep_lib.hpp"
2#include <mpi.h>
3
4
5using namespace std;
6
7::MPI_Comm MPI_COMM_WORLD_STD = MPI_COMM_WORLD;
8//#undef MPI_COMM_WORLD
9
10
11::MPI_Comm MPI_COMM_NULL_STD = MPI_COMM_NULL;
12//#undef MPI_COMM_NULL
13
14
15::MPI_Datatype MPI_INT_STD = MPI_INT;
16::MPI_Datatype MPI_FLOAT_STD = MPI_FLOAT;
17::MPI_Datatype MPI_DOUBLE_STD = MPI_DOUBLE;
18::MPI_Datatype MPI_LONG_STD = MPI_LONG;
19::MPI_Datatype MPI_CHAR_STD = MPI_CHAR;
20::MPI_Datatype MPI_UNSIGNED_LONG_STD = MPI_UNSIGNED_LONG;
21::MPI_Datatype MPI_UNSIGNED_CHAR_STD = MPI_UNSIGNED_CHAR;
22
23#undef MPI_INT
24#undef MPI_FLOAT
25#undef MPI_DOUBLE
26#undef MPI_LONG
27#undef MPI_CHAR
28#undef MPI_UNSIGNED_LONG
29#undef MPI_UNSIGNED_CHAR
30
31
32//ep_lib::MPI_Datatype MPI_INT = MPI_INT_STD;
33//ep_lib::MPI_Datatype MPI_FLOAT = MPI_FLOAT_STD;
34//ep_lib::MPI_Datatype MPI_DOUBLE = MPI_DOUBLE_STD;
35//ep_lib::MPI_Datatype MPI_LONG = MPI_LONG_STD;
36//ep_lib::MPI_Datatype MPI_CHAR = MPI_CHAR_STD;
37//ep_lib::MPI_Datatype MPI_UNSIGNED_LONG = MPI_UNSIGNED_LONG_STD;
38
39
40
41
42::MPI_Op MPI_SUM_STD = MPI_SUM;
43::MPI_Op MPI_MAX_STD = MPI_MAX;
44::MPI_Op MPI_MIN_STD = MPI_MIN;
45
46#undef MPI_SUM
47#undef MPI_MAX
48#undef MPI_MIN
49
50//ep_lib::MPI_Op MPI_SUM = MPI_SUM_STD;
51//ep_lib::MPI_Op MPI_MAX = MPI_MAX_STD;
52//ep_lib::MPI_Op MPI_MIN = MPI_MIN_STD;
53
54//  ep_lib::MPI_Comm::MPI_Comm(const MPI_Comm & comm)
55//  {
56//    printf("calling MPI_Comm copy constructor\n");
57//    is_ep = comm.is_ep;
58//    is_intercomm = comm.is_intercomm;
59
60//    int my_rank = comm.ep_comm_ptr->size_rank_info[1].first;
61//    int num_ep  = comm.ep_comm_ptr->size_rank_info[1].second;
62
63
64//    if(0 == my_rank)
65//    {
66//      MPI_Info info;
67//      MPI_Comm *out_comm;
68//      ::MPI_Comm mpi_dup;
69
70//      ::MPI_Comm in_comm = static_cast< ::MPI_Comm>(comm.mpi_comm);
71
72//      ::MPI_Comm_dup(in_comm, &mpi_dup);
73
74//      MPI_Comm_create_endpoints(mpi_dup, num_ep, info, out_comm);
75//      comm.ep_comm_ptr->comm_list->mem_bridge = out_comm;
76//    }
77
78//    MPI_Barrier(comm);
79
80//    *this = (comm.ep_comm_ptr->comm_list->mem_bridge[my_rank]);
81// //       // my_buffer = NULL;
82// //       // ep_barrier = NULL;
83// //       // rank_map = NULL;
84// //       // ep_comm_ptr = NULL;
85// //       // mem_bridge = NULL;
86// //       // mpi_bridge = NULL;
87// //       // mpi_comm = comm;
88// }
89
90
91
92
93
94
95
96
97
98
Note: See TracBrowser for help on using the repository browser.