Changeset 1500 for XIOS/dev/branch_openmp/extern/ep_dev/ep_lib.cpp
- Timestamp:
- 05/28/18 09:54:32 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/extern/ep_dev/ep_lib.cpp
r1499 r1500 14 14 namespace ep_lib 15 15 { 16 bool MPI_Comm::is_null()16 bool ep_comm::is_null() 17 17 { 18 18 if(!this->is_intercomm) 19 return this->mpi_comm == MPI_COMM_NULL .mpi_comm;19 return this->mpi_comm == MPI_COMM_NULL->mpi_comm; 20 20 else 21 return this->ep_comm_ptr->intercomm->mpi_inter_comm == MPI_COMM_NULL .mpi_comm;21 return this->ep_comm_ptr->intercomm->mpi_inter_comm == MPI_COMM_NULL->mpi_comm; 22 22 } 23 23 … … 33 33 int get_ep_rank(MPI_Comm comm, int ep_rank_loc, int mpi_rank) 34 34 { 35 for(int i=0; i<comm .rank_map->size(); i++)36 { 37 if( ( comm .rank_map->at(i).first == ep_rank_loc )38 && ( comm .rank_map->at(i).second == mpi_rank ) )35 for(int i=0; i<comm->rank_map->size(); i++) 36 { 37 if( ( comm->rank_map->at(i).first == ep_rank_loc ) 38 && ( comm->rank_map->at(i).second == mpi_rank ) ) 39 39 { 40 40 return i; … … 48 48 // intercomm 49 49 int inter_rank; 50 for(int i=0; i<comm .ep_comm_ptr->intercomm->intercomm_rank_map->size(); i++)51 { 52 if( ( comm .ep_comm_ptr->intercomm->intercomm_rank_map->at(i).first == ep_rank_loc )53 && ( comm .ep_comm_ptr->intercomm->intercomm_rank_map->at(i).second == mpi_rank ) )50 for(int i=0; i<comm->ep_comm_ptr->intercomm->intercomm_rank_map->size(); i++) 51 { 52 if( ( comm->ep_comm_ptr->intercomm->intercomm_rank_map->at(i).first == ep_rank_loc ) 53 && ( comm->ep_comm_ptr->intercomm->intercomm_rank_map->at(i).second == mpi_rank ) ) 54 54 { 55 55 inter_rank = i; … … 58 58 } 59 59 60 for(int i=0; i<comm .ep_comm_ptr->intercomm->remote_rank_map->size(); i++)61 { 62 if( comm .ep_comm_ptr->intercomm->remote_rank_map->at(i).first == inter_rank )60 for(int i=0; i<comm->ep_comm_ptr->intercomm->remote_rank_map->size(); i++) 61 { 62 if( comm->ep_comm_ptr->intercomm->remote_rank_map->at(i).first == inter_rank ) 63 63 { 64 64 //printf("get_ep_rank for intercomm, ep_rank_loc = %d, mpi_rank = %d => ep_src = %d\n", ep_rank_loc, mpi_rank, i); … … 258 258 } 259 259 260 MPI_Message* to_mpi_message_ptr(ep_lib::MPI_Message message) 261 { 262 return static_cast< MPI_Message* >(message->mpi_message); 263 } 264 260 265 MPI_Info to_mpi_info(ep_lib::MPI_Info info) 261 266 { 262 return *(static_cast< MPI_Info* >(info .mpi_info));267 return *(static_cast< MPI_Info* >(info->mpi_info)); 263 268 } 264 269 … … 273 278 } 274 279 275 276 280 MPI_Status* to_mpi_status_ptr(ep_lib::MPI_Status status) 281 { 282 return static_cast< MPI_Status* >(status.mpi_status); 283 } 284 285 MPI_Request* to_mpi_request_ptr(ep_lib::MPI_Request request) 286 { 287 return static_cast< MPI_Request* >(request->mpi_request); 288 } 289 290 291
Note: See TracChangeset
for help on using the changeset viewer.