Changeset 1539 for XIOS/dev/branch_openmp/extern/src_ep_dev/ep_exscan.cpp
- Timestamp:
- 06/12/18 11:54:13 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/extern/src_ep_dev/ep_exscan.cpp
r1520 r1539 228 228 int MPI_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) 229 229 { 230 if(!comm->is_ep) 231 { 232 return ::MPI_Scan(sendbuf, recvbuf, count, to_mpi_type(datatype), to_mpi_op(op), to_mpi_comm(comm->mpi_comm)); 233 } 230 if(!comm->is_ep) return ::MPI_Exscan(sendbuf, recvbuf, count, to_mpi_type(datatype), to_mpi_op(op), to_mpi_comm(comm->mpi_comm)); 231 if(comm->is_intercomm) return MPI_Exscan_intercomm(sendbuf, recvbuf, count, datatype, op, comm); 234 232 235 233 valid_type(datatype); … … 291 289 292 290 if(ep_rank_loc == 0) 291 { 293 292 ::MPI_Exscan(MPI_IN_PLACE, tmp_recvbuf, count, to_mpi_type(datatype), to_mpi_op(op), to_mpi_comm(comm->mpi_comm)); 294 295 // printf(" ID=%d : %d %d \n", ep_rank, static_cast<int*>(tmp_recvbuf)[0], static_cast<int*>(tmp_recvbuf)[1]); 293 } 296 294 297 295 MPI_Exscan_local(tmp_sendbuf, tmp_recvbuf, count, datatype, op, comm); 298 299 // printf(" ID=%d : after local tmp_sendbuf = %d %d ; tmp_recvbuf = %d %d \n", ep_rank, static_cast<int*>(tmp_sendbuf)[0], static_cast<int*>(tmp_sendbuf)[1], static_cast<int*>(tmp_recvbuf)[0], static_cast<int*>(tmp_recvbuf)[1]);300 301 296 302 297 … … 314 309 315 310 else memcpy(recvbuf, tmp_recvbuf, datasize*count); 316 317 318 319 311 320 312 delete[] tmp_sendbuf; … … 323 315 } 324 316 317 318 int MPI_Exscan_intercomm(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) 319 { 320 printf("MPI_Exscan_intercomm not yet implemented\n"); 321 MPI_Abort(comm, 0); 322 } 323 325 324 }
Note: See TracChangeset
for help on using the changeset viewer.