Ignore:
Timestamp:
05/11/17 18:25:20 (7 years ago)
Author:
mhnguyen
Message:

Updating two-level server.
Each client now can play the role of server: It can forward data to other clients or write data like a server.
Each client must combine all data received from other client(s) before forward them or write them on files

+) Correct some bugs of exchange data_index in domain and axis
+) Reorder some functions in context.cpp to make sure that all necessary attributes are available before computing index
+) Add the mapping index for client to write data.

Test
+) On Curie
+) test_client and test_complete
+) Mode:

  • Only one level: Correct
  • Two levels: Work if using ddt (bug)

+) Only zoom is tested but other transformations should work
+) No reading test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/node/domain.hpp

    r1099 r1129  
    5151           EVENT_ID_INDEX, EVENT_ID_LON, EVENT_ID_LAT,  
    5252           EVENT_ID_AREA, EVENT_ID_MASK, 
    53            EVENT_ID_DATA_INDEX, EVENT_ID_SERVER_ATTRIBUT 
     53           EVENT_ID_DATA_INDEX, EVENT_ID_SERVER_ATTRIBUT, 
     54           EVENT_ID_INDEX_ZOOM 
    5455         } ; 
    5556 
     
    106107 
    107108         std::map<int, StdSize> getAttributesBufferSize(); 
     109         CArray<size_t,1> localIndexToWriteOnServer; 
    108110 
    109111         bool isEmpty(void) const; 
     
    127129         void completeLonLatClient(void);          
    128130         void computeConnectedClients(); 
     131         void computeWrittenIndex(); 
    129132 
    130133         void AllgatherRectilinearLonLat(CArray<double,1>& lon, CArray<double,1>& lat, 
     
    138141         static void recvDistributionAttributes(CEventServer& event); 
    139142         static void recvIndex(CEventServer& event); 
     143         static void recvIndexZoom(CEventServer& event); 
    140144         static void recvMask(CEventServer& event); 
    141145         static void recvZoom(CEventServer& event); 
     
    144148         static void recvArea(CEventServer& event); 
    145149         static void recvDataIndex(CEventServer& event); 
    146          void recvDistributionAttributes(CBufferIn& buffer);          
    147          void recvZoom(std::vector<int>& rank, std::vector<CBufferIn*>& buffers); 
     150         void recvDistributionAttributes(CBufferIn& buffer);                   
    148151         void recvIndex(std::map<int, CBufferIn*>& rankBuffers); 
     152         void recvIndexZoom(std::map<int, CBufferIn*>& rankBuffers); 
    149153         void recvMask(std::map<int, CBufferIn*>& rankBuffers); 
    150154         void recvLon(std::map<int, CBufferIn*>& rankBuffers); 
     
    192196         void sendArea(); 
    193197         void sendLonLat(); 
    194          void sendZoom(); 
     198         void sendIndexZoom(); 
    195199         void sendDataIndex(); 
     200 
     201         void convertLonLatValue(); 
    196202 
    197203       private:          
     
    202208 
    203209         bool doZoomByIndex_; 
    204          bool isChecked; 
     210         bool isChecked, computedWrittenIndex_; 
    205211         std::set<StdString> relFiles, relFilesCompressed; 
    206212         bool isClientChecked; // Verify whether all attributes of domain on the client side are good 
    207213         bool isClientAfterTransformationChecked; 
    208          std::map<int, CArray<int,1> > indiSrv, indjSrv, indGlob_; 
     214         std::map<int, CArray<int,1> > indiSrv, indjSrv, indGlob_, indGlobZoom_; 
    209215         std::map<int,int> nbConnectedClients_, nbConnectedClientsZoom_; // Mapping of number of communicating client to a server 
    210216 
     
    213219         std::map<int, vector<int> > indWrittenSrv_; // Global written index of each client sent to server 
    214220         std::vector<int> indexesToWrite; 
    215          std::vector<int> recvClientRanks_; 
     221         std::vector<int> recvClientRanks_, recvClientZoomRanks_; 
    216222         int numberWrittenIndexes_, totalNumberWrittenIndexes_, offsetWrittenIndexes_; 
    217          std::vector<int> connectedServerRank_; 
     223         std::vector<int> connectedServerRank_, connectedServerZoomRank_; 
    218224         bool isDistributed_; 
    219225         //! True if and only if the data defined on the domain can be outputted in a compressed way 
     
    222228         TransMapTypes transformationMap_;          
    223229         bool isUnstructed_; 
    224          boost::unordered_map<size_t,size_t> globalLocalIndexMap_; 
     230         boost::unordered_map<size_t,size_t> globalLocalIndexMap_, globalLocalIndexZoomMap_; 
    225231        
    226232       private: 
Note: See TracChangeset for help on using the changeset viewer.