Ignore:
Timestamp:
09/11/17 17:02:48 (7 years ago)
Author:
ymipsl
Message:

Fix problem of axis distribution. When a grid is composed of a distributed axis and an non distributed axis on client side , on server side the first axis will be non distributed and second axis will be distributed. In this case, attributes (value, bounds, etc) was not sent in correct distribution.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/axis.cpp

    r1249 r1258  
    453453     if (context->hasClient) 
    454454     {         
    455        if ((orderPositionInGrid == CServerDistributionDescription::defaultDistributedDimension(globalDim.size(), distType)) 
    456          || (index.numElements() != n_glo)) 
    457           computeConnectedClients(globalDim, orderPositionInGrid, distType); 
     455       if (orderPositionInGrid == CServerDistributionDescription::defaultDistributedDimension(globalDim.size(), distType)) 
     456         computeConnectedClients(globalDim, orderPositionInGrid, distType); 
     457       else if (index.numElements() != n_glo) computeConnectedClients(globalDim, orderPositionInGrid,  CServerDistributionDescription::ROOT_DISTRIBUTION); 
    458458     } 
    459459 
     
    589589 
    590590      // Describe the distribution of server side 
    591       CServerDistributionDescription serverDescription(nGlobAxis, nbServer); 
     591 
     592      CServerDistributionDescription serverDescription(nGlobAxis, nbServer, distType); 
     593       
    592594      std::vector<int> serverZeroIndex; 
    593595      serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t,size_t>(indexBegin, indexEnd), 0);       
     
    606608 
    607609      indSrv_[client].swap(globalIndexAxisOnServer); 
     610 
     611      if (distType==CServerDistributionDescription::ROOT_DISTRIBUTION) 
     612      { 
     613        for(int i=1; i<nbServer; ++i) indSrv_[client].insert(pair<int, vector<size_t> >(i,indSrv_[client][0]) ) ; 
     614        serverZeroIndexLeader.clear() ; 
     615      } 
     616          
    608617      CClientServerMapping::GlobalIndexMap::const_iterator it  = indSrv_[client].begin(), 
    609618                                                           ite = indSrv_[client].end(); 
    610        
    611       for (it = indSrv_[client].begin(); it != ite; ++it) { 
    612         connectedServerRank_[client].push_back(it->first); 
    613       } 
     619 
     620      for (it = indSrv_[client].begin(); it != ite; ++it) connectedServerRank_[client].push_back(it->first); 
    614621 
    615622      for (std::list<int>::const_iterator it = serverZeroIndexLeader.begin(); it != serverZeroIndexLeader.end(); ++it) 
Note: See TracChangeset for help on using the changeset viewer.