Ignore:
Timestamp:
08/31/22 17:23:56 (22 months ago)
Author:
ymipsl
Message:
  • Optimize remote connector computation in case of read (reverse way).
  • don't compute anymore clientFromServerConnector (and all intermediate computation) for non reading case.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/trunk/src/node/axis.cpp

    r2389 r2397  
    982982  } 
    983983  
    984   void CAxis::distributeToServer(CContextClient* client, std::map<int, CArray<size_t,1>>& globalIndexOut, std::map<int, CArray<size_t,1>>& globalIndexIn,  
     984  void CAxis::distributeToServer(CContextClient* client, bool inOut, std::map<int, CArray<size_t,1>>& globalIndexOut, std::map<int, CArray<size_t,1>>& globalIndexIn,  
    985985                                 shared_ptr<CScattererConnector> &scattererConnector, const string& axisId) 
    986986  { 
     
    10421042    // phase 3 : compute connector to receive from server 
    10431043    //////////// 
     1044    if (inOut) 
    10441045    { 
    10451046      auto scatteredElement = make_shared<CDistributedElement>(n_glo, globalIndexIn) ; 
     
    11281129//      gathererConnector_ -> computeConnector() ; 
    11291130    } 
    1130     else if (phasis==3) 
     1131    else if (phasis==3) // only for server -> client 
    11311132    { 
    11321133      elementTo_ = make_shared<CDistributedElement>(event) ; 
     
    11451146    serverFromClientConnector_ = make_shared<CGathererConnector>(elementFrom_->getView(CElementView::FULL), localElement_->getView(CElementView::WORKFLOW)) ; 
    11461147    serverFromClientConnector_->computeConnector() ; 
    1147        
    1148     serverToClientConnector_ = make_shared<CScattererConnector>(localElement_->getView(CElementView::WORKFLOW), elementTo_->getView(CElementView::FULL), 
     1148    elementFrom_.reset() ; 
     1149 
     1150    if (elementTo_) 
     1151    { 
     1152      serverToClientConnector_ = make_shared<CScattererConnector>(localElement_->getView(CElementView::WORKFLOW), elementTo_->getView(CElementView::FULL), 
    11491153                                                                context->getIntraComm(), client->getRemoteSize()) ; 
    1150     serverToClientConnector_->computeConnector() ; 
     1154      serverToClientConnector_->computeConnector() ; 
     1155      elementTo_.reset() ; 
     1156    } 
    11511157  } 
    11521158  CATCH_DUMP_ATTR 
Note: See TracChangeset for help on using the changeset viewer.