Changeset 1500 for XIOS/dev/branch_openmp/extern/ep_dev/ep_allgather.cpp
- Timestamp:
- 05/28/18 09:54:32 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/extern/ep_dev/ep_allgather.cpp
r1381 r1500 20 20 { 21 21 22 if(!comm .is_ep && comm.mpi_comm)22 if(!comm->is_ep && comm->mpi_comm) 23 23 { 24 return ::MPI_Allgather(const_cast<void*>(sendbuf), sendcount, to_mpi_type(sendtype), recvbuf, recvcount, to_mpi_type(recvtype), to_mpi_comm(comm .mpi_comm));24 return ::MPI_Allgather(const_cast<void*>(sendbuf), sendcount, to_mpi_type(sendtype), recvbuf, recvcount, to_mpi_type(recvtype), to_mpi_comm(comm->mpi_comm)); 25 25 } 26 26 … … 37 37 38 38 39 int ep_rank = comm .ep_comm_ptr->size_rank_info[0].first;40 int ep_rank_loc = comm .ep_comm_ptr->size_rank_info[1].first;41 int mpi_rank = comm .ep_comm_ptr->size_rank_info[2].first;42 int ep_size = comm .ep_comm_ptr->size_rank_info[0].second;43 int num_ep = comm .ep_comm_ptr->size_rank_info[1].second;44 int mpi_size = comm .ep_comm_ptr->size_rank_info[2].second;39 int ep_rank = comm->ep_comm_ptr->size_rank_info[0].first; 40 int ep_rank_loc = comm->ep_comm_ptr->size_rank_info[1].first; 41 int mpi_rank = comm->ep_comm_ptr->size_rank_info[2].first; 42 int ep_size = comm->ep_comm_ptr->size_rank_info[0].second; 43 int num_ep = comm->ep_comm_ptr->size_rank_info[1].second; 44 int mpi_size = comm->ep_comm_ptr->size_rank_info[2].second; 45 45 46 46 bool is_master = ep_rank_loc==0; … … 70 70 int local_sendcount = num_ep * count; 71 71 72 ::MPI_Allgather(&local_sendcount, 1, to_mpi_type(MPI_INT), mpi_recvcounts, 1, to_mpi_type(MPI_INT), to_mpi_comm(comm .mpi_comm));72 ::MPI_Allgather(&local_sendcount, 1, to_mpi_type(MPI_INT), mpi_recvcounts, 1, to_mpi_type(MPI_INT), to_mpi_comm(comm->mpi_comm)); 73 73 74 74 mpi_displs[0] = 0; … … 79 79 80 80 81 ::MPI_Allgatherv(local_recvbuf, num_ep * count, to_mpi_type(datatype), tmp_recvbuf, mpi_recvcounts, mpi_displs, to_mpi_type(datatype), to_mpi_comm(comm .mpi_comm));81 ::MPI_Allgatherv(local_recvbuf, num_ep * count, to_mpi_type(datatype), tmp_recvbuf, mpi_recvcounts, mpi_displs, to_mpi_type(datatype), to_mpi_comm(comm->mpi_comm)); 82 82 83 83 … … 86 86 for(int i=0; i<ep_size; i++) 87 87 { 88 offset = mpi_displs[comm .rank_map->at(i).second] + comm.rank_map->at(i).first * sendcount;88 offset = mpi_displs[comm->rank_map->at(i).second] + comm->rank_map->at(i).first * sendcount; 89 89 memcpy(recvbuf + i*sendcount*datasize, tmp_recvbuf+offset*datasize, sendcount*datasize); 90 90 }
Note: See TracChangeset
for help on using the changeset viewer.