Last change
on this file since 2120 was
1646,
checked in by yushan, 6 years ago
|
branch merged with trunk @1645. arch file (ep&mpi) added for ADA
|
File size:
924 bytes
|
Rev | Line | |
---|
[1646] | 1 | #ifdef _usingEP |
---|
[1603] | 2 | #include "ep_lib.hpp" |
---|
| 3 | #include <mpi.h> |
---|
| 4 | #include "ep_declaration.hpp" |
---|
| 5 | #include "ep_mpi.hpp" |
---|
| 6 | |
---|
| 7 | using namespace std; |
---|
| 8 | |
---|
| 9 | namespace ep_lib |
---|
| 10 | { |
---|
| 11 | |
---|
| 12 | int MPI_Fetch_and_op(const void *origin_addr, void *result_addr, MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Op op, MPI_Win win) |
---|
| 13 | { |
---|
| 14 | int target_mpi_rank = win->comm->ep_rank_map->at(target_rank).second; |
---|
| 15 | int target_local_rank = win->comm->ep_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_Fetch_and_op(origin_addr, result_addr, to_mpi_type(datatype), target_mpi_rank, to_mpi_aint(target_disp), to_mpi_op(op), to_mpi_win(win->server_win[target_local_rank])); |
---|
| 19 | |
---|
| 20 | else |
---|
| 21 | return ::MPI_Fetch_and_op(origin_addr, result_addr, to_mpi_type(datatype), target_mpi_rank, to_mpi_aint(target_disp), to_mpi_op(op), to_mpi_win(win->client_win)); |
---|
| 22 | } |
---|
| 23 | |
---|
| 24 | } |
---|
[1646] | 25 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.