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/scalar.cpp

    r2343 r2397  
    420420  } 
    421421  
    422   void CScalar::distributeToServer(CContextClient* client, std::map<int, CArray<size_t,1>>& globalIndexOut,  std::map<int, CArray<size_t,1>>& globalIndexIn,  
     422  void CScalar::distributeToServer(CContextClient* client, bool inOut, std::map<int, CArray<size_t,1>>& globalIndexOut,  std::map<int, CArray<size_t,1>>& globalIndexIn,  
    423423                                   shared_ptr<CScattererConnector> &scattererConnector, const string& scalarId) 
    424424  { 
     
    480480    // phase 3 : compute connector to receive from server 
    481481    //////////// 
     482    if (inOut) 
    482483    { 
    483484      auto scatteredElement = make_shared<CDistributedElement>(1, globalIndexIn) ; 
     
    567568    serverFromClientConnector_ = make_shared<CGathererConnector>(elementFrom_->getView(CElementView::FULL), localElement_->getView(CElementView::WORKFLOW)) ; 
    568569    serverFromClientConnector_->computeConnector() ; 
     570    elementFrom_.reset() ; 
    569571       
    570     serverToClientConnector_ = make_shared<CScattererConnector>(localElement_->getView(CElementView::WORKFLOW), elementTo_->getView(CElementView::FULL), 
     572    if (elementTo_) 
     573    { 
     574      serverToClientConnector_ = make_shared<CScattererConnector>(localElement_->getView(CElementView::WORKFLOW), elementTo_->getView(CElementView::FULL), 
    571575                                                                context->getIntraComm(), client->getRemoteSize()) ; 
    572     serverToClientConnector_->computeConnector() ; 
     576      serverToClientConnector_->computeConnector() ; 
     577      elementTo_.reset() ; 
     578    } 
    573579  } 
    574580  CATCH_DUMP_ATTR 
Note: See TracChangeset for help on using the changeset viewer.