- Timestamp:
- 05/31/17 19:42:49 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan_merged/extern/src_ep_dev/ep_gatherv.cpp
r1147 r1151 348 348 mpi_size = comm.ep_comm_ptr->size_rank_info[2].second; 349 349 350 351 350 352 if(ep_size == mpi_size) 351 353 return ::MPI_Gatherv(sendbuf, sendcount, static_cast< ::MPI_Datatype>(datatype), recvbuf, recvcounts, displs, 352 354 static_cast< ::MPI_Datatype>(datatype), root, static_cast< ::MPI_Comm>(comm.mpi_comm)); 355 356 if(ep_rank != root) 357 { 358 recvcounts = new int[ep_size]; 359 displs = new int[ep_size]; 360 } 361 362 MPI_Bcast(const_cast< int* >(displs), ep_size, MPI_INT, root, comm); 363 MPI_Bcast(const_cast< int* >(recvcounts), ep_size, MPI_INT, root, comm); 364 353 365 354 366 int recv_plus_displs[ep_size]; … … 365 377 assert(recv_plus_displs[ep_rank-ep_rank_loc+num_ep-1] >= displs[ep_rank-ep_rank_loc+num_ep-2]); 366 378 } 367 368 if(ep_rank != root)369 {370 recvcounts = new int[ep_size];371 displs = new int[ep_size];372 }373 374 MPI_Bcast(const_cast< int* >(recvcounts), ep_size, MPI_INT, root, comm);375 MPI_Bcast(const_cast< int* >(displs), ep_size, MPI_INT, root, comm);376 379 377 380
Note: See TracChangeset
for help on using the changeset viewer.