Ignore:
Timestamp:
12/05/17 16:24:42 (7 years ago)
Author:
yushan
Message:

unify MPI_Comm type

Location:
XIOS/dev/branch_openmp/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/src/buffer_client.cpp

    r1342 r1355  
    1515  size_t CClientBuffer::maxRequestSize = 0; 
    1616 
    17   CClientBuffer::CClientBuffer(MPI_Comm interComm, int serverRank, StdSize bufferSize, StdSize estimatedMaxEventSize, StdSize maxBufferedEvents) 
    18     : interComm(interComm) 
    19     , serverRank(serverRank) 
     17  CClientBuffer::CClientBuffer(MPI_Comm in_interComm, int serverRank, StdSize bufferSize, StdSize estimatedMaxEventSize, StdSize maxBufferedEvents):  
     18    //interComm(interComm) 
     19    serverRank(serverRank) 
    2020    , bufferSize(bufferSize) 
    2121    , estimatedMaxEventSize(estimatedMaxEventSize) 
     
    2727    , pending(false) 
    2828  { 
     29    interComm = in_interComm; 
     30    *(interComm.mpi_comm) = *(in_interComm.mpi_comm); 
     31    *(interComm.ep_comm_ptr->intercomm->mpi_inter_comm) = *(in_interComm.ep_comm_ptr->intercomm->mpi_inter_comm); 
    2932    buffer[0] = new char[bufferSize]; // transform it with MPI_ALLOC_MEM later 
    3033    buffer[1] = new char[bufferSize]; 
  • XIOS/dev/branch_openmp/src/buffer_client.hpp

    r1331 r1355  
    4040 
    4141      CBufferOut* retBuffer; 
    42       const ep_lib::MPI_Comm interComm; 
     42      ep_lib::MPI_Comm interComm; 
    4343  }; 
    4444} 
  • XIOS/dev/branch_openmp/src/context_client.cpp

    r1338 r1355  
    2727      intraComm = intraComm_; 
    2828      interComm = interComm_; 
     29      *(intraComm.mpi_comm) = *(intraComm_.mpi_comm); 
     30      *(interComm.mpi_comm) = *(interComm_.mpi_comm); 
     31      *(interComm.ep_comm_ptr->intercomm->mpi_inter_comm) = *(interComm_.ep_comm_ptr->intercomm->mpi_inter_comm); 
     32      //MPI_Comm_dup(intraComm_, &intraComm); 
     33      //MPI_Comm_dup(interComm_, &interComm); 
    2934      MPI_Comm_rank(intraComm, &clientRank); 
    3035      MPI_Comm_size(intraComm, &clientSize); 
  • XIOS/dev/branch_openmp/src/cxios.cpp

    r1342 r1355  
    9393    { 
    9494      MPI_Comm *ep_comm; 
    95       MPI_Comm_create_endpoints(MPI_COMM_WORLD, num_ep, info, ep_comm);  // servers should reach here too. 
     95      MPI_Comm_create_endpoints(MPI_COMM_WORLD.mpi_comm, num_ep, info, ep_comm);  // servers should reach here too. 
    9696      passage = ep_comm;   
    9797    } 
  • XIOS/dev/branch_openmp/src/io/inetcdf4.cpp

    r1328 r1355  
    2323    // even if Parallel NetCDF ends up being used. 
    2424    if (mpi) 
    25       //CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, *comm, info_null, this->ncidp); 
    26       CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, static_cast<MPI_Comm>(comm->mpi_comm), info_null.mpi_info, this->ncidp); 
     25      CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, static_cast<MPI_Comm>(*(comm->mpi_comm)), info_null.mpi_info, this->ncidp); 
     26      //CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, *(static_cast<MPI_Comm*>(comm->mpi_comm)), info_null.mpi_info, this->ncidp); 
    2727    else 
    2828      CNetCdfInterface::open(filename, NC_NOWRITE, this->ncidp); 
  • XIOS/dev/branch_openmp/src/io/onetcdf4.cpp

    r1328 r1355  
    5858            CTimer::get("Files : create").resume(); 
    5959            if (wmpi) 
    60                CNetCdfInterface::createPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), info_null.mpi_info, this->ncidp); 
     60               CNetCdfInterface::createPar(filename, mode, static_cast<MPI_Comm>(*(comm->mpi_comm)), info_null.mpi_info, this->ncidp); 
     61               //CNetCdfInterface::createPar(filename, mode, *(static_cast<MPI_Comm*>(comm->mpi_comm)), info_null.mpi_info, this->ncidp); 
    6162            else 
    6263               CNetCdfInterface::create(filename, mode, this->ncidp); 
     
    7071            CTimer::get("Files : open").resume(); 
    7172            if (wmpi) 
    72                CNetCdfInterface::openPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), info_null.mpi_info, this->ncidp); 
     73               CNetCdfInterface::openPar(filename, mode, static_cast<MPI_Comm>(*(comm->mpi_comm)), info_null.mpi_info, this->ncidp); 
     74               //CNetCdfInterface::openPar(filename, mode, *(static_cast<MPI_Comm*>(comm->mpi_comm)), info_null.mpi_info, this->ncidp); 
    7375            else 
    7476               CNetCdfInterface::open(filename, mode, this->ncidp); 
Note: See TracChangeset for help on using the changeset viewer.