Rev | Line | |
---|
[1384] | 1 | #include "ep_lib.hpp" |
---|
| 2 | #include <mpi.h> |
---|
| 3 | #include "ep_declaration.hpp" |
---|
| 4 | #include "ep_mpi.hpp" |
---|
| 5 | |
---|
| 6 | using namespace std; |
---|
| 7 | |
---|
| 8 | namespace ep_lib |
---|
| 9 | { |
---|
| 10 | |
---|
| 11 | int MPI_Get(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, |
---|
| 12 | int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win) |
---|
| 13 | { |
---|
| 14 | int target_mpi_rank = win.comm.rank_map->at(target_rank).second; |
---|
| 15 | int target_local_rank = win.comm.rank_map->at(target_rank).first; |
---|
| 16 | int num_ep = win.comm.ep_comm_ptr->size_rank_info[1].second; |
---|
| 17 | if(num_ep==1) |
---|
| 18 | return ::MPI_Get(origin_addr, origin_count, to_mpi_type(origin_datatype), target_mpi_rank, to_mpi_aint(target_disp), target_count, to_mpi_type(target_datatype), |
---|
| 19 | to_mpi_win(win.server_win[target_local_rank])); |
---|
| 20 | |
---|
| 21 | else |
---|
| 22 | return ::MPI_Get(origin_addr, origin_count, to_mpi_type(origin_datatype), target_mpi_rank, to_mpi_aint(target_disp), target_count, to_mpi_type(target_datatype), |
---|
| 23 | to_mpi_win(win.client_win)); |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.