Changeset 1355 for XIOS/dev/branch_openmp/extern/src_ep_dev/ep_type.hpp
- Timestamp:
- 12/05/17 16:24:42 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/extern/src_ep_dev/ep_type.hpp
r1354 r1355 57 57 public: 58 58 59 #ifdef _intelmpi60 59 int ep_datatype; 61 #elif _openmpi62 void * ep_datatype;63 #endif64 65 60 int ep_src; 66 61 int ep_tag; 67 68 69 62 void* mpi_status; 70 63 }; … … 74 67 public: 75 68 76 #ifdef _intelmpi77 69 int mpi_message; 78 #elif _openmpi79 void * mpi_message;80 #endif81 82 70 int ep_src; 83 71 int ep_tag; 84 85 72 void* mpi_status; 86 73 87 74 MPI_Message() {} 88 89 #ifdef _intelmpi90 75 MPI_Message(int message): mpi_message(message) {} 91 #elif _openmpi92 MPI_Message(void* message): mpi_message(message) {}93 #endif94 76 }; 95 77 … … 152 134 public: 153 135 154 155 // #ifdef _intelmpi 156 // int mpi_inter_comm; 157 // #elif _openmpi 158 // void * mpi_inter_comm; 159 // #endif 160 161 void * mpi_inter_comm; 136 int *mpi_inter_comm; 162 137 163 138 RANK_MAP *intercomm_rank_map; … … 172 147 int intercomm_tag; 173 148 174 ep_intercomm() 175 { 176 intercomm_rank_map = NULL; 177 local_rank_map = NULL; 178 remote_rank_map = NULL; 179 } 180 181 182 bool operator == (ep_intercomm right) 183 { 184 bool a = intercomm_rank_map == right.intercomm_rank_map; 185 bool b = local_rank_map == right.local_rank_map; 186 bool c = remote_rank_map == right.remote_rank_map; 187 bool d = mpi_inter_comm == right.mpi_inter_comm; 188 bool e = size_rank_info == right.size_rank_info; 189 bool f = intercomm_tag == right.intercomm_tag; 190 return a&&b&&c&&d&&e&&f; 191 } 192 193 bool operator != (ep_intercomm right) 194 { 195 bool a = intercomm_rank_map != right.intercomm_rank_map; 196 bool b = local_rank_map != right.local_rank_map; 197 bool c = remote_rank_map != right.remote_rank_map; 198 bool d = mpi_inter_comm != right.mpi_inter_comm; 199 bool e = size_rank_info != right.size_rank_info; 200 bool f = intercomm_tag != right.intercomm_tag; 201 return a||b||c||d||e||f; 202 } 149 ep_intercomm(); 150 bool operator == (ep_intercomm right); 151 bool operator != (ep_intercomm right); 152 203 153 204 154 … … 224 174 ep_intercomm *intercomm; 225 175 226 ep_communicator() 227 { 228 comm_list = NULL; 229 message_queue = NULL; 230 intercomm = NULL; 231 } 232 233 bool operator == (ep_communicator right) 234 { 235 bool a = size_rank_info == right.size_rank_info; 236 bool b = comm_label == right.comm_label; 237 bool c = intercomm == right.intercomm; 238 return a&&b&&c; 239 } 240 241 bool operator != (ep_communicator right) 242 { 243 bool a = size_rank_info != right.size_rank_info; 244 bool b = comm_label != right.comm_label; 245 bool c = intercomm != right.intercomm; 246 return a||b||c; 247 } 248 176 ep_communicator(); 177 bool operator == (ep_communicator right); 178 bool operator != (ep_communicator right); 179 249 180 }; 250 181 … … 259 190 { 260 191 public: 261 262 // #ifdef _intelmpi263 // int mpi_comm;264 // #elif _openmpi265 // void * mpi_comm;266 // #endif267 268 void * mpi_comm;269 192 270 193 bool is_ep; … … 274 197 OMPbarrier *ep_barrier; 275 198 RANK_MAP *rank_map; 276 199 int* mpi_comm; 277 200 EP_Comm ep_comm_ptr; 278 279 201 MPI_Comm *mem_bridge; 280 281 282 // #ifdef _intelmpi 283 // int mpi_bridge; 284 // #elif _openmpi 285 // void * mpi_bridge; 286 // #endif 287 288 void * mpi_bridge; 289 290 MPI_Comm() 291 { 292 is_ep = true; 293 is_intercomm = false; 294 my_buffer = NULL; 295 ep_barrier = NULL; 296 rank_map = NULL; 297 ep_comm_ptr = NULL; 298 mem_bridge = NULL; 299 mpi_bridge = NULL; 300 } 301 302 // #ifdef _intelmpi 303 // MPI_Comm(int comm) 304 // { 305 // is_ep = false; 306 // is_intercomm = false; 307 // my_buffer = NULL; 308 // ep_barrier = NULL; 309 // rank_map = NULL; 310 // ep_comm_ptr = NULL; 311 // mem_bridge = NULL; 312 // mpi_bridge = NULL; 313 // mpi_comm = comm; 314 // } 315 316 // #elif _openmpi 317 318 // MPI_Comm(void* comm) 319 // { 320 // is_ep = false; 321 // is_intercomm = false; 322 // my_buffer = NULL; 323 // ep_barrier = NULL; 324 // rank_map = NULL; 325 // ep_comm_ptr = NULL; 326 // mem_bridge = NULL; 327 // mpi_bridge = NULL; 328 // mpi_comm = comm; 329 // } 330 // #endif 331 332 MPI_Comm(void* comm) 333 { 334 is_ep = false; 335 is_intercomm = false; 336 my_buffer = NULL; 337 ep_barrier = NULL; 338 rank_map = NULL; 339 ep_comm_ptr = NULL; 340 mem_bridge = NULL; 341 mpi_bridge = NULL; 342 mpi_comm = comm; 343 } 344 345 bool operator == (MPI_Comm right) 346 { 347 bool a = is_ep == right.is_ep; 348 bool b = is_intercomm == right.is_intercomm; 349 bool c = mpi_comm == right.mpi_comm; 350 bool d = is_ep ? ep_comm_ptr == right.ep_comm_ptr : true; 351 return a&&b&&c&&d; 352 } 353 354 bool operator != (MPI_Comm right) 355 { 356 bool a = is_ep != right.is_ep; 357 bool b = is_intercomm != right.is_intercomm; 358 bool c = mpi_comm != right.mpi_comm; 359 bool d = is_ep ? ep_comm_ptr != right.ep_comm_ptr : true; 360 361 return a||b||c||d; 362 } 363 202 int* mpi_bridge; 203 204 MPI_Comm(); 205 //MPI_Comm(const MPI_Comm &comm); 206 MPI_Comm(int* comm); 207 208 209 bool operator == (MPI_Comm right); 210 bool operator != (MPI_Comm right); 364 211 bool is_null(); 365 212 … … 371 218 public: 372 219 373 #ifdef _intelmpi374 220 int mpi_info; 375 #elif _openmpi376 void * mpi_info;377 #endif378 221 379 222 MPI_Info(){ } 380 381 #ifdef _intelmpi382 223 MPI_Info(int info): mpi_info(info) {} 383 #elif _openmpi384 MPI_Info(void* info): mpi_info(info) {}385 #endif386 224 }; 387 225 … … 391 229 public: 392 230 393 #ifdef _intelmpi394 231 int mpi_request; 395 #elif _openmpi396 void * mpi_request;397 #endif398 232 399 233 int type; //! type of the non-blocking communication. 1: Isend; 2:Irecv; 3:Imrecv; 4:Issend … … 402 236 int ep_src; 403 237 int ep_tag; 404 #ifdef _intelmpi405 238 int ep_datatype; 406 #elif _openmpi407 void * ep_datatype;408 #endif409 239 410 240 MPI_Comm comm; //! EP communicator related to the communication 411 241 412 242 MPI_Request() {} 413 414 #ifdef _intelmpi415 243 MPI_Request(int request): mpi_request(request) {} 416 #elif _openmpi 417 MPI_Request(void* request): mpi_request(request) {} 418 #endif 419 420 421 bool operator == (MPI_Request right) 422 { 423 //bool a = mpi_request == right.mpi_request; 424 bool b = type == right.type; 425 bool c = buf == right.buf; 426 bool d = ep_src == right.ep_src; 427 bool e = ep_tag == right.ep_tag; 428 bool f = ep_datatype == right.ep_datatype; 429 return b&&c&&d&&e&&f; 430 } 244 bool operator == (MPI_Request right); 245 431 246 }; 432 247
Note: See TracChangeset
for help on using the changeset viewer.