Ignore:
Timestamp:
09/12/17 16:35:36 (7 years ago)
Author:
oabramkina
Message:

Modifications allowing to avoid recalculation of the grid distribution if receivers are of the same size.

File:
1 edited

Legend:

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

    r1250 r1263  
    205205         CArray<int, 1> storeIndex_client; 
    206206 
    207 /** Map containing indexes that will be sent in sendIndex(). In future: change the key to pair<distrType, serverSize> (?) */ 
     207/** Map containing indexes that will be sent in sendIndex(). */ 
    208208         std::map<CContextClient*, map<int, CArray<int, 1> > > storeIndex_toSrv; 
    209209 
     210/** Map storing the number of senders. Key = size of receiver's intracomm */ 
     211         std::map<int, std::map<int,int> > nbSenders; 
     212 
     213         std::map<CContextClient*, std::map<int,int> > nbReadSenders; 
     214 
    210215         map<int, CArray<int, 1> > storeIndex_fromSrv; // Support, for now, reading with level-1 server 
    211216 
    212  
    213          std::map<CContextClient*, std::map<int,int> > nbSenders, nbReadSenders; 
    214217 
    215218         map<int, CArray<size_t, 1> > outIndexFromClient, compressedOutIndexFromClient, outGlobalIndexFromClient; 
     
    271274        void setTransformationAlgorithms(); 
    272275        void computeIndexByElement(const std::vector<boost::unordered_map<size_t,std::vector<int> > >& indexServerOnElement, 
     276                                   const CContextClient* client, 
    273277                                   CClientServerMapping::GlobalIndexMap& globalIndexOnServer); 
    274278        int computeGridGlobalDimension(std::vector<int>& globalDim, 
     
    305309        int numberWrittenIndexes_, totalNumberWrittenIndexes_, offsetWrittenIndexes_; 
    306310 
    307 /** Map storing ranks of connected servers. In future: change the key to the server size (?) */ 
    308         std::map<CContextClient*, std::vector<int> > connectedServerRank_; 
    309  
    310 /** Map storing data size that will be sent to connected servers. In future: change the key to the server size (?) */ 
    311         std::map<CContextClient*, std::map<int,size_t> > connectedDataSize_; 
     311/** Map storing local ranks of connected receivers. Key = size of receiver's intracomm */ 
     312        std::map<int, std::vector<int> > connectedServerRank_; 
     313 
     314/** Map storing the size of data to be send. Key = size of receiver's intracomm */ 
     315        std::map<int, std::map<int,size_t> > connectedDataSize_; 
    312316 
    313317        bool isDataDistributed_;         
     
    324328        bool hasTransform_; 
    325329 
    326 /** Map storing data size that will be sent to connected servers. In future: change the key to the server size (?) */ 
    327         std::map<CContextClient*, CClientServerMapping::GlobalIndexMap> globalIndexOnServer_; 
     330/** Map storing global indexes of server-like (band-wise) distribution for sending to receivers. 
     331  * Key = size of receiver's intracomm. 
     332  */ 
     333//        std::map<CContextClient*, CClientServerMapping::GlobalIndexMap> globalIndexOnServer_; 
     334        std::map<int, CClientServerMapping::GlobalIndexMap> globalIndexOnServer_; 
     335 
    328336 
    329337/** List order of axis and domain in a grid, if there is a domain, it will take value 1 (true), axis 0 (false) */ 
Note: See TracChangeset for help on using the changeset viewer.