Ignore:
Timestamp:
05/28/18 09:54:32 (6 years ago)
Author:
yushan
Message:

save dev

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/extern/ep_dev/ep_lib.cpp

    r1499 r1500  
    1414namespace ep_lib 
    1515{  
    16   bool MPI_Comm::is_null() 
     16  bool ep_comm::is_null() 
    1717  { 
    1818    if(!this->is_intercomm) 
    19       return this->mpi_comm == MPI_COMM_NULL.mpi_comm; 
     19      return this->mpi_comm == MPI_COMM_NULL->mpi_comm; 
    2020    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; 
    2222  } 
    2323 
     
    3333  int get_ep_rank(MPI_Comm comm, int ep_rank_loc, int mpi_rank) 
    3434  { 
    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 ) ) 
    3939      { 
    4040        return i; 
     
    4848    // intercomm 
    4949    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 ) ) 
    5454      { 
    5555        inter_rank =  i; 
     
    5858    } 
    5959 
    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  ) 
    6363      { 
    6464        //printf("get_ep_rank for intercomm, ep_rank_loc = %d, mpi_rank = %d => ep_src = %d\n", ep_rank_loc, mpi_rank, i); 
     
    258258} 
    259259 
     260MPI_Message* to_mpi_message_ptr(ep_lib::MPI_Message message) 
     261{ 
     262  return static_cast< MPI_Message* >(message->mpi_message); 
     263} 
     264 
    260265MPI_Info to_mpi_info(ep_lib::MPI_Info info) 
    261266{ 
    262   return *(static_cast< MPI_Info* >(info.mpi_info)); 
     267  return *(static_cast< MPI_Info* >(info->mpi_info)); 
    263268} 
    264269 
     
    273278} 
    274279 
    275  
    276  
     280MPI_Status* to_mpi_status_ptr(ep_lib::MPI_Status status) 
     281{ 
     282  return static_cast< MPI_Status* >(status.mpi_status); 
     283} 
     284 
     285MPI_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.