Ignore:
Timestamp:
03/07/22 16:41:48 (2 years ago)
Author:
ymipsl
Message:

Fix problem in remote connector for read variable : supress redondance optimisation on remote connector in read case.
YM

Location:
XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_client_server_remote_connector.cpp

    r2267 r2304  
    1616 
    1717 
    18   void CGridClientServerRemoteConnector::computeConnector(void) 
     18  void CGridClientServerRemoteConnector::computeConnector(bool eliminateRedondant) 
    1919  { 
    20     auto workflowRemoteConnector=make_shared<CGridRemoteConnector>(srcWorkflowView_,dstView_,localComm_,remoteSize_) ; 
    21     workflowRemoteConnector->computeConnector() ; 
    22     computeViewDistribution() ; 
     20    if (eliminateRedondant) 
     21    { 
     22      auto workflowRemoteConnector=make_shared<CGridRemoteConnector>(srcWorkflowView_,dstView_,localComm_,remoteSize_) ; 
     23      workflowRemoteConnector->computeConnector() ; 
     24      computeViewDistribution() ; 
    2325     
    24     for(int i=0;i<srcView_.size();i++) isSrcViewDistributed_[i] =  isSrcViewDistributed_[i] || workflowRemoteConnector->getIsSrcViewDistributed()[i]  ; 
    25     computeConnectorMethods() ; 
    26     computeRedondantRanks() ; 
     26      for(int i=0;i<srcView_.size();i++) isSrcViewDistributed_[i] =  isSrcViewDistributed_[i] || workflowRemoteConnector->getIsSrcViewDistributed()[i]  ; 
     27      computeConnectorMethods() ; 
     28      computeRedondantRanks() ; 
    2729 
    28     for(auto& rank : rankToRemove_) 
    29       if (workflowRemoteConnector->getRankToRemove().count(rank)!=0) 
    30         for(auto& element : elements_) element.erase(rank) ; 
     30      for(auto& rank : rankToRemove_) 
     31        if (workflowRemoteConnector->getRankToRemove().count(rank)!=0) 
     32          for(auto& element : elements_) element.erase(rank) ; 
     33    } 
     34    else  
     35    { 
     36      computeViewDistribution() ; 
     37      computeConnectorRedundant() ; 
     38    } 
    3139  } 
    3240 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_client_server_remote_connector.hpp

    r2267 r2304  
    1313 
    1414      CGridClientServerRemoteConnector(vector<shared_ptr<CLocalView>>& srcView, vector<shared_ptr<CLocalView>>& worflowSrcView, vector<shared_ptr<CDistributedView>>& dstView, MPI_Comm localComm, int remoteSize) ; 
    15       void computeConnector(void) ; 
     15      void computeConnector(bool eliminateRedondant=true) ; 
    1616      vector<shared_ptr<CLocalView>> srcWorkflowView_ ;    
    1717  } ; 
Note: See TracChangeset for help on using the changeset viewer.