Ignore:
Timestamp:
12/19/17 17:50:40 (3 years ago)
Author:
yushan
Message:

dev EP-RMA : MPI_Get_accumulate

File:
1 edited

Legend:

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

    r1384 r1385  
    2424  } 
    2525 
     26  int MPI_Get_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr,  
     27                         int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, 
     28                         int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) 
     29  { 
     30    int target_mpi_rank   = win.comm.rank_map->at(target_rank).second; 
     31    int target_local_rank = win.comm.rank_map->at(target_rank).first; 
     32    int num_ep = win.comm.ep_comm_ptr->size_rank_info[1].second; 
     33    if(num_ep==1) 
     34      return ::MPI_Get_accumulate(origin_addr, origin_count, to_mpi_type(origin_datatype), result_addr, result_count, to_mpi_type(result_datatype), target_mpi_rank, to_mpi_aint(target_disp), target_count, 
     35                                  to_mpi_type(target_datatype), to_mpi_op(op), to_mpi_win(win.server_win[target_local_rank])); 
     36    else 
     37      return ::MPI_Get_accumulate(origin_addr, origin_count, to_mpi_type(origin_datatype), result_addr, result_count, to_mpi_type(result_datatype), target_mpi_rank, to_mpi_aint(target_disp), target_count, 
     38                                  to_mpi_type(target_datatype), to_mpi_op(op), to_mpi_win(win.client_win)); 
     39  } 
     40 
    2641} 
Note: See TracChangeset for help on using the changeset viewer.