Changeset 1295 for XIOS/dev/branch_openmp/extern/src_ep_dev/ep_recv.cpp
- Timestamp:
- 10/06/17 13:56:33 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/extern/src_ep_dev/ep_recv.cpp
r1287 r1295 10 10 #include <mpi.h> 11 11 #include "ep_declaration.hpp" 12 #include "ep_mpi.hpp" 12 13 13 14 using namespace std; … … 22 23 int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Status *status) 23 24 { 24 int dest_rank;25 MPI_Comm_rank(comm, &dest_rank);26 25 27 26 if(!comm.is_ep) 28 27 { 29 ::MPI_Comm mpi_comm = static_cast< ::MPI_Comm >(comm.mpi_comm);30 28 ::MPI_Status mpi_status; 31 ::MPI_Recv(buf, count, static_cast< ::MPI_Datatype >(datatype), src<0? MPI_ANY_SOURCE : src, tag<0? MPI_ANY_TAG: tag, mpi_comm, &mpi_status);29 ::MPI_Recv(buf, count, to_mpi_type(datatype), src<0? MPI_ANY_SOURCE : src, tag<0? MPI_ANY_TAG: tag, to_mpi_comm(comm.mpi_comm), &mpi_status); 32 30 33 31 status->ep_src = src; … … 61 59 { 62 60 ::MPI_Request mpi_request; 63 ::MPI_Comm mpi_comm = static_cast< ::MPI_Comm > (comm.mpi_comm); 64 ::MPI_Irecv(buf, count, static_cast< ::MPI_Datatype> (datatype), src<0? MPI_ANY_SOURCE : src, tag<0? MPI_ANY_TAG: tag, mpi_comm, &mpi_request); 61 ::MPI_Irecv(buf, count, to_mpi_type(datatype), src<0? MPI_ANY_SOURCE : src, tag<0? MPI_ANY_TAG: tag, to_mpi_comm(comm.mpi_comm), &mpi_request); 65 62 66 63 request->mpi_request = mpi_request; … … 106 103 ::MPI_Message mpi_message = static_cast< ::MPI_Message >(message->mpi_message); 107 104 108 ::MPI_Imrecv(buf, count, static_cast< ::MPI_Datatype>(datatype), &mpi_message, &mpi_request);105 ::MPI_Imrecv(buf, count, to_mpi_type(datatype), &mpi_message, &mpi_request); 109 106 110 107 request->mpi_request = mpi_request; … … 124 121 ::MPI_Message mpi_message = static_cast< ::MPI_Message >(message->mpi_message); 125 122 126 ::MPI_Mrecv(buf, count, static_cast< ::MPI_Datatype>(datatype), &mpi_message, &mpi_status);123 ::MPI_Mrecv(buf, count, to_mpi_type(datatype), &mpi_message, &mpi_status); 127 124 128 125 status->mpi_status = new ::MPI_Status(mpi_status);
Note: See TracChangeset
for help on using the changeset viewer.