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

    r2395 r2397  
    21132113  
    21142114 
    2115   void CDomain::distributeToServer(CContextClient* client, map<int, CArray<size_t,1>>& globalIndexOut, std::map<int, CArray<size_t,1>>& globalIndexIn, 
     2115  void CDomain::distributeToServer(CContextClient* client, bool inOut, map<int, CArray<size_t,1>>& globalIndexOut, std::map<int, CArray<size_t,1>>& globalIndexIn, 
    21162116                                   shared_ptr<CScattererConnector> &scattererConnector, const string& domainId) 
    21172117  TRY 
     
    21752175    // phase 3 : compute connector to receive from server 
    21762176    //////////// 
     2177    if (inOut) 
    21772178    { 
    21782179      auto scatteredElement = make_shared<CDistributedElement>(ni_glo*nj_glo, globalIndexIn) ; 
     
    22782279    serverFromClientConnector_ = make_shared<CGathererConnector>(elementFrom_->getView(CElementView::FULL), localElement_->getView(CElementView::WORKFLOW)) ; 
    22792280    serverFromClientConnector_->computeConnector() ; 
     2281    elementFrom_.reset() ; 
    22802282       
    2281     serverToClientConnector_ = make_shared<CScattererConnector>(localElement_->getView(CElementView::WORKFLOW), elementTo_->getView(CElementView::FULL), 
     2283    if (elementTo_) 
     2284    { 
     2285      serverToClientConnector_ = make_shared<CScattererConnector>(localElement_->getView(CElementView::WORKFLOW), elementTo_->getView(CElementView::FULL), 
    22822286                                                                context->getIntraComm(), client->getRemoteSize()) ; 
    2283     serverToClientConnector_->computeConnector() ; 
     2287      serverToClientConnector_->computeConnector() ; 
     2288      elementTo_.reset() ; 
     2289    } 
     2290 
    22842291  } 
    22852292  CATCH_DUMP_ATTR 
Note: See TracChangeset for help on using the changeset viewer.