Ignore:
Timestamp:
08/04/17 16:03:34 (7 years ago)
Author:
mhnguyen
Message:

Making some changes to allow pools with different number of server

+) Associate context client to each grid distribution (This should be changed in the future)
+) Correct some buffer size estimation
+) Clean some redundant code and add comments

File:
1 edited

Legend:

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

    r1235 r1236  
    143143       if (client->isServerLeader()) 
    144144       { 
    145           for (it = grid->storeIndex_toSrv.begin(); it != grid->storeIndex_toSrv.end(); it++) 
     145          for (it = grid->storeIndex_toSrv[client].begin(); it != grid->storeIndex_toSrv[client].end(); it++) 
    146146          { 
    147147            int rank = it->first; 
     
    163163    else 
    164164    { 
    165       for (it = grid->storeIndex_toSrv.begin(); it != grid->storeIndex_toSrv.end(); it++) 
     165      for (it = grid->storeIndex_toSrv[client].begin(); it != grid->storeIndex_toSrv[client].end(); it++) 
    166166      { 
    167167        int rank = it->first; 
     
    175175 
    176176        list_msg.back() << getId() << data_tmp; 
    177         event.push(rank, grid->nbSenders[0][rank], list_msg.back()); 
     177        event.push(rank, grid->nbSenders[client][rank], list_msg.back()); 
    178178      } 
    179179      client->sendEvent(event); 
     
    423423        } 
    424424 
    425         event.push(it->first, grid->nbReadSenders[0][it->first], msg); 
     425        event.push(it->first, grid->nbReadSenders[client][it->first], msg); 
    426426      } 
    427427      client->sendEvent(event); 
     
    860860   } 
    861861 
    862    std::map<int, StdSize> CField::getGridAttributesBufferSize() 
    863    { 
    864      return grid->getAttributesBufferSize(); 
    865    } 
    866  
    867    std::vector<std::map<int, StdSize> > CField::getGridDataBufferSize() 
    868    { 
    869      return grid->getDataBufferSize(getId()); 
     862   std::map<int, StdSize> CField::getGridAttributesBufferSize(CContextClient* client) 
     863   { 
     864     return grid->getAttributesBufferSize(client); 
     865   } 
     866 
     867   std::map<int, StdSize> CField::getGridDataBufferSize(CContextClient* client) 
     868   { 
     869     return grid->getDataBufferSize(client, getId()); 
    870870   } 
    871871 
Note: See TracChangeset for help on using the changeset viewer.