Ignore:
Timestamp:
10/06/17 13:41:57 (4 years ago)
Author:
oabramkina
Message:

Improvements for the secondary server: each grid is only sent to secondary-server pools that need it.

File:
1 edited

Legend:

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

    r1263 r1294  
    3636      , gridSrc_(), hasTransform_(false), isGenerated_(false), order_(), globalIndexOnServer_() 
    3737      , computedWrittenIndex_(false) 
     38      , clients() 
    3839   { 
    3940     setVirtualDomainGroup(CDomainGroup::create(getId() + "_virtual_domain_group")); 
     
    5556      , gridSrc_(), hasTransform_(false), isGenerated_(false), order_(), globalIndexOnServer_() 
    5657      , computedWrittenIndex_(false) 
     58      , clients() 
    5759   { 
    5860     setVirtualDomainGroup(CDomainGroup::create(getId() + "_virtual_domain_group")); 
     
    643645        }  
    644646      } 
    645  
    646647   } 
    647648 
     
    649650 
    650651   /* 
    651      Compute the global index and its local index on taking account of mask, data index. 
    652      These global index then will be used to compute the connection of this client to other clients in the different group 
     652     Compute the global index and its local index taking account mask and data index. 
     653     These global indexes will be used to compute the connection of this client (sender) to its servers (receivers) 
    653654     (via function computeConnectedClient) 
    654      These global index also corresponding to data sent to other clients (if any) 
     655     These global indexes also correspond to data sent to servers (if any) 
    655656   */ 
    656657   void CGrid::computeClientIndex() 
     
    13471348  { 
    13481349    CContext* context = CContext::getCurrent(); 
    1349     int nbSrvPools = (context->hasServer) ? (context->hasClient ? context->clientPrimServer.size() : 0) : 1; 
    13501350    storeIndex_toSrv.clear(); 
    1351  
    1352     for (int p = 0; p < nbSrvPools; ++p) 
    1353     { 
    1354       CContextClient* client = context->hasServer ? context->clientPrimServer[p] : context->client; 
     1351    std::set<CContextClient*>::iterator it; 
     1352 
     1353    for (it=clients.begin(); it!=clients.end(); ++it) 
     1354    { 
     1355      CContextClient* client = *it; 
    13551356      int receiverSize = client->serverSize; 
    13561357 
     
    14121413  { 
    14131414    CContext* context = CContext::getCurrent(); 
    1414     int nbSrvPools = (context->clientPrimServer.size() == 0) ? 1 : context->clientPrimServer.size(); 
    14151415    storeIndex_toSrv.clear(); 
    1416     for (int p = 0; p < nbSrvPools; ++p) 
    1417     { 
    1418       CContextClient* client = (context->clientPrimServer.size() == 0) ? context->client : context->clientPrimServer[p]; 
     1416    std::set<CContextClient*>::iterator it; 
     1417 
     1418    for (it=clients.begin(); it!=clients.end(); ++it) 
     1419    { 
     1420      CContextClient* client = *it; 
    14191421      int receiverSize = client->serverSize; 
    14201422 
     
    25022504  } 
    25032505 
     2506  void CGrid::setContextClient(CContextClient* contextClient) 
     2507  { 
     2508    clients.insert(contextClient); 
     2509  } 
     2510 
    25042511  /*! 
    25052512    Parse a grid, for now, it contains only domain, axis and scalar 
Note: See TracChangeset for help on using the changeset viewer.