Changeset 1398
- Timestamp:
- 01/10/18 16:16:44 (7 years ago)
- Location:
- XIOS/dev/branch_openmp/extern/ep_dev
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/extern/ep_dev/ep_accumulate.cpp
r1385 r1398 24 24 } 25 25 26 int MPI_Raccumulate(const 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_Op op, 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 ::MPI_Request mpi_request; 33 34 if(num_ep==1) 35 { 36 int return_value = ::MPI_Raccumulate(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_op(op), to_mpi_win(win.server_win[target_local_rank]), &mpi_request); 38 request->mpi_request = new ::MPI_Request(mpi_request); 39 40 request->ep_datatype = origin_datatype; 41 request->type = 1; 42 return return_value; 43 } 44 45 else 46 { 47 int return_value = ::MPI_Raccumulate(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_op(op), to_mpi_win(win.client_win), &mpi_request); 49 request->mpi_request = new ::MPI_Request(mpi_request); 50 51 request->ep_datatype = origin_datatype; 52 request->type = 1; 53 return return_value; 54 } 55 } 56 57 26 58 int MPI_Get_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, 27 59 int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, … … 39 71 } 40 72 73 int MPI_Rget_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, 74 int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, 75 int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request) 76 { 77 int target_mpi_rank = win.comm.rank_map->at(target_rank).second; 78 int target_local_rank = win.comm.rank_map->at(target_rank).first; 79 int num_ep = win.comm.ep_comm_ptr->size_rank_info[1].second; 80 ::MPI_Request mpi_request; 81 if(num_ep==1) 82 { 83 int return_value = ::MPI_Rget_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, 84 to_mpi_type(target_datatype), to_mpi_op(op), to_mpi_win(win.server_win[target_local_rank]), &mpi_request); 85 request->mpi_request = new ::MPI_Request(mpi_request); 86 87 request->ep_datatype = origin_datatype; 88 request->type = 1; 89 return return_value; 90 } 91 else 92 { 93 int return_value = ::MPI_Rget_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, 94 to_mpi_type(target_datatype), to_mpi_op(op), to_mpi_win(win.client_win), &mpi_request); 95 request->mpi_request = new ::MPI_Request(mpi_request); 96 97 request->ep_datatype = origin_datatype; 98 request->type = 1; 99 return return_value; 100 } 101 } 102 41 103 } -
XIOS/dev/branch_openmp/extern/ep_dev/ep_get.cpp
r1384 r1398 24 24 } 25 25 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 26 58 } -
XIOS/dev/branch_openmp/extern/ep_dev/ep_lib_win.hpp
r1395 r1398 12 12 int MPI_Win_free(MPI_Win *win); 13 13 int MPI_Win_fence(int assert, MPI_Win win); 14 14 15 int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, 15 16 int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win); 17 18 int MPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, 19 int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request *request); 20 16 21 int MPI_Get(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, 17 22 int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win); 18 23 24 int MPI_Rget(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, 25 int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request *request); 26 19 27 int MPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, 20 28 int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win); 29 30 int MPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, 31 int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request); 21 32 22 33 int MPI_Get_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, … … 24 35 int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win); 25 36 37 int MPI_Rget_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, 38 int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, 39 int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request); 40 26 41 int MPI_Win_allocate (MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *baseptr, MPI_Win *win); 27 42 -
XIOS/dev/branch_openmp/extern/ep_dev/ep_put.cpp
r1384 r1398 24 24 } 25 25 26 int MPI_Rput(const 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 35 if(num_ep==1) 36 { 37 int return_value = ::MPI_Rput(origin_addr, origin_count, to_mpi_type(origin_datatype), target_mpi_rank, to_mpi_aint(target_disp), target_count, to_mpi_type(target_datatype), 38 to_mpi_win(win.server_win[target_local_rank]), &mpi_request); 39 40 request->mpi_request = new ::MPI_Request(mpi_request); 41 42 request->ep_datatype = origin_datatype; 43 request->type = 1; 44 return return_value; 45 } 46 47 else 48 { 49 int return_value = ::MPI_Rput(origin_addr, origin_count, to_mpi_type(origin_datatype), target_mpi_rank, to_mpi_aint(target_disp), target_count, to_mpi_type(target_datatype), 50 to_mpi_win(win.client_win), &mpi_request); 51 52 request->mpi_request = new ::MPI_Request(mpi_request); 53 54 request->ep_datatype = origin_datatype; 55 request->type = 1; 56 return return_value; 57 } 58 } 59 26 60 }
Note: See TracChangeset
for help on using the changeset viewer.