Changeset 1539 for XIOS/dev/branch_openmp/extern/src_ep_dev/ep_gather.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_gather.cpp
r1520 r1539 35 35 for(int i=0; i<num_ep; i++) 36 36 memcpy(recvbuf + datasize * i * count, comm->my_buffer->void_buffer[i], datasize * count); 37 38 //printf("local_recvbuf = %d %d \n", static_cast<int*>(recvbuf)[0], static_cast<int*>(recvbuf)[1] );39 37 } 40 38 … … 44 42 int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) 45 43 { 46 if(!comm->is_ep) 47 { 48 return ::MPI_Gather(const_cast<void*>(sendbuf), sendcount, to_mpi_type(sendtype), recvbuf, recvcount, to_mpi_type(recvtype), 49 root, to_mpi_comm(comm->mpi_comm)); 50 } 44 if(!comm->is_ep) return ::MPI_Gather(const_cast<void*>(sendbuf), sendcount, to_mpi_type(sendtype), recvbuf, recvcount, to_mpi_type(recvtype), 45 root, to_mpi_comm(comm->mpi_comm)); 46 if(comm->is_intercomm) return MPI_Gather_intercomm(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm); 51 47 52 48 assert(sendcount == recvcount && sendtype == recvtype); … … 103 99 if(is_root) 104 100 { 105 // printf("tmp_recvbuf = %d %d %d %d %d %d %d %d\n", static_cast<int*>(tmp_recvbuf)[0], static_cast<int*>(tmp_recvbuf)[1],106 // static_cast<int*>(tmp_recvbuf)[2], static_cast<int*>(tmp_recvbuf)[3],107 // static_cast<int*>(tmp_recvbuf)[4], static_cast<int*>(tmp_recvbuf)[5],108 // static_cast<int*>(tmp_recvbuf)[6], static_cast<int*>(tmp_recvbuf)[7] );109 110 101 int offset; 111 102 for(int i=0; i<ep_size; i++) … … 128 119 } 129 120 121 122 int MPI_Gather_intercomm(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) 123 { 124 printf("MPI_Gather_intercomm not yet implemented\n"); 125 MPI_Abort(comm, 0); 126 } 130 127 }
Note: See TracChangeset
for help on using the changeset viewer.