Ignore:
Timestamp:
10/06/17 13:56:33 (7 years ago)
Author:
yushan
Message:

EP update all

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/extern/src_ep_dev/ep_recv.cpp

    r1287 r1295  
    1010#include <mpi.h> 
    1111#include "ep_declaration.hpp" 
     12#include "ep_mpi.hpp" 
    1213 
    1314using namespace std; 
     
    2223  int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Status *status) 
    2324  { 
    24     int dest_rank; 
    25     MPI_Comm_rank(comm, &dest_rank); 
    2625 
    2726    if(!comm.is_ep) 
    2827    { 
    29       ::MPI_Comm mpi_comm = static_cast< ::MPI_Comm >(comm.mpi_comm); 
    3028      ::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); 
    3230 
    3331      status->ep_src = src; 
     
    6159    { 
    6260      ::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); 
    6562 
    6663      request->mpi_request = mpi_request; 
     
    106103    ::MPI_Message mpi_message = static_cast< ::MPI_Message >(message->mpi_message); 
    107104                 
    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); 
    109106 
    110107    request->mpi_request = mpi_request; 
     
    124121    ::MPI_Message mpi_message = static_cast< ::MPI_Message >(message->mpi_message); 
    125122     
    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); 
    127124 
    128125    status->mpi_status = new ::MPI_Status(mpi_status); 
Note: See TracChangeset for help on using the changeset viewer.