Ignore:
Timestamp:
09/10/20 13:51:02 (4 years ago)
Author:
ymipsl
Message:

Big update on on going work related to data distribution and transfer between clients and servers.
Revisite of the source and store filter using "connectors".

YM

File:
1 edited

Legend:

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

    r1918 r1930  
    1818#include "grid_local_connector.hpp" 
    1919#include "grid_elements.hpp" 
     20#include "grid_scatterer_connector.hpp" 
     21#include "grid_gatherer_connector.hpp" 
     22 
    2023 
    2124namespace xios { 
     
    5255         typedef CGridAttributes SuperClassAttribute; 
    5356 
     57      private: 
     58         
     59        // define a structure to store elements (CDomain, CAxis, CScalar) using a void* and a type to cast the pointer 
     60         enum EElementType { TYPE_SCALAR, TYPE_AXIS, TYPE_DOMAIN } ; 
     61         struct SElement {void* ptr ; EElementType type ; CScalar* scalar ;  CAxis* axis ; CDomain* domain ; } ; 
     62         vector<SElement> elements_ ; 
     63         bool elementsComputed_ = false ;  
     64         /** retrieve the vector of elements as a structure containing a void* and the type of pointer */ 
     65         vector<SElement>& getElements(void) { if (!elementsComputed_) computeElements() ; return elements_ ; }  
     66         void computeElements(void) ; 
     67         /** List order of axis and domain in a grid, if there is a domain, it will take value 2, axis 1, scalar 0 */ 
     68         std::vector<int> order_; 
     69 
    5470      public: 
    5571 
     
    7288 
    7389         void checkEligibilityForCompressedOutput(); 
    74  
     90          
    7591 
    7692 
     
    504520        std::map<int, CClientServerMapping::GlobalIndexMap> globalIndexOnServer_; 
    505521 
    506  
    507 /** List order of axis and domain in a grid, if there is a domain, it will take value 2, axis 1, scalar 0 */ 
    508         std::vector<int> order_; 
     522       
     523 
     524     ////////////////////////////////////////////////////////////////////////////////////// 
     525     //  this part is related to distribution, element definition, views and connectors  // 
     526     ////////////////////////////////////////////////////////////////////////////////////// 
     527 
    509528 
    510529      private:   
     
    519538        void computeModelToWorkflowConnector(void) ; 
    520539        CGridLocalConnector* getModelToWorkflowConnector(void) { if (modelToWorkflowConnector_==nullptr) computeModelToWorkflowConnector() ; return modelToWorkflowConnector_;} 
     540 
     541      private: 
     542        CGridLocalConnector* workflowToModelConnector_ ; 
     543      public: 
     544        void computeWorkflowToModelConnector(void) ; 
     545        CGridLocalConnector* getWorkflowToModelConnector(void) { if (workflowToModelConnector_==nullptr) computeWorkflowToModelConnector() ; return workflowToModelConnector_;} 
     546 
     547      public: //?  
     548        void distributeGridToFileServer(CContextClient* client); 
     549       
     550      private: 
     551         map<CContextClient*, CGridScattererConnector*> clientToServerConnector_ ; 
     552      public: 
     553         CGridScattererConnector* getClientToServerConnector(CContextClient* client) { return clientToServerConnector_[client] ;} // make some test to see if connector exits for the given client 
     554          
     555      private: 
     556         CGridGathererConnector* serverFromClientConnector_ = nullptr ; 
     557      public: 
     558         CGridGathererConnector* getServerFromClientConnector(void) { if (serverFromClientConnector_==nullptr) computeServerFromClientConnector() ; return serverFromClientConnector_;} 
     559         void computeServerFromClientConnector(void) ; 
     560          
     561      private: 
     562        CGridLocalConnector* workflowToFullConnector_ = nullptr; 
     563      public: 
     564        void computeWorkflowToFullConnector(void) ; 
     565        CGridLocalConnector* getWorkflowToFullConnector(void) { if (workflowToFullConnector_==nullptr) computeWorkflowToFullConnector() ; return workflowToFullConnector_;} 
     566 
     567      private: 
     568        CGridLocalConnector* fullToWorkflowConnector_ = nullptr; 
     569      public: 
     570        void computeFullToWorkflowConnector(void) ; 
     571        CGridLocalConnector* getFullToWorkflowConnector(void) { if (fullToWorkflowConnector_==nullptr) computeFullToWorkflowConnector() ; return fullToWorkflowConnector_;} 
     572 
     573      private: 
     574         CGridGathererConnector* clientFromClientConnector_ = nullptr ; 
     575      public: 
     576         CGridGathererConnector* getClientFromClientConnector(void) { if (clientFromClientConnector_==nullptr) computeClientFromClientConnector() ; return clientFromClientConnector_;} 
     577         void computeClientFromClientConnector(void) ; 
     578 
     579      private: 
     580         map<CContextClient*, CGridScattererConnector*> clientToClientConnector_ ; 
     581      public: 
     582         CGridScattererConnector* getClientToClientConnector(CContextClient* client) { return clientToClientConnector_[client] ;} // make some test to see if connector exits for the given client 
     583   
     584 
     585      private: 
     586         CGridGathererConnector* clientFromServerConnector_ = nullptr ; 
     587      public: 
     588         CGridGathererConnector* getClientFromServerConnector(void) { if (clientFromServerConnector_==nullptr) computeClientFromServerConnector() ; return clientFromServerConnector_;} 
     589         void computeClientFromServerConnector(void) ; 
    521590 
    522591   }; // class CGrid 
Note: See TracChangeset for help on using the changeset viewer.