Ignore:
Timestamp:
01/10/18 16:16:44 (6 years ago)
Author:
yushan
Message:

dev EP-RMA : MPI_Rput MPI_Rget MPI_Raccumulate MPI_Rget_accumulate (to be tested)

File:
1 edited

Legend:

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

    r1384 r1398  
    2424  } 
    2525 
     26  int MPI_Rget(void *origin_addr, int origin_count, MPI_Datatype origin_datatype,  
     27              int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request *request) 
     28  { 
     29    int target_mpi_rank   = win.comm.rank_map->at(target_rank).second; 
     30    int target_local_rank = win.comm.rank_map->at(target_rank).first; 
     31    int num_ep = win.comm.ep_comm_ptr->size_rank_info[1].second; 
     32 
     33    ::MPI_Request mpi_request; 
     34    if(num_ep==1) 
     35    { 
     36      int return_value = ::MPI_Rget(origin_addr, origin_count, to_mpi_type(origin_datatype), target_mpi_rank, to_mpi_aint(target_disp), target_count, to_mpi_type(target_datatype),  
     37                         to_mpi_win(win.server_win[target_local_rank]), &mpi_request); 
     38 
     39      request->mpi_request = new ::MPI_Request(mpi_request); 
     40 
     41      request->ep_datatype = origin_datatype; 
     42      request->type = 1; 
     43      return return_value; 
     44    } 
     45    else 
     46    { 
     47      int return_value = ::MPI_Rget(origin_addr, origin_count, to_mpi_type(origin_datatype), target_mpi_rank, to_mpi_aint(target_disp), target_count, to_mpi_type(target_datatype),  
     48                         to_mpi_win(win.client_win), &mpi_request); 
     49 
     50      request->mpi_request = new ::MPI_Request(mpi_request); 
     51 
     52      request->ep_datatype = origin_datatype; 
     53      request->type = 1; 
     54      return return_value; 
     55    } 
     56  } 
     57 
    2658} 
Note: See TracChangeset for help on using the changeset viewer.