Ignore:
Timestamp:
11/13/14 15:09:14 (10 years ago)
Author:
mhnguyen
Message:

Implementing buffer size auto-detection for mode client -server

+) Process xml tree in client side then send all the information to server
+) Only information enabled fields in enabled files are sent to server
+) Some important change in structure of code which must be refactored

Test
+) On Curie
+) Only mode client-server
+) Passed for all tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/grid.hpp

    r501 r509  
    1313 
    1414namespace xios { 
    15     
     15 
    1616   /// ////////////////////// Déclarations ////////////////////// /// 
    1717 
     
    4646           EVENT_ID_INDEX 
    4747         } ; 
    48           
     48 
    4949         /// Constructeurs /// 
    5050         CGrid(void); 
     
    5454 
    5555         /// Traitements /// 
    56          void solveReference(void); 
     56//         void solveReference(void); 
     57 
     58         void solveDomainAxisRef(bool areAttributesChecked); 
     59 
     60         void checkMaskIndex(bool doCalculateIndex); 
    5761 
    5862 //        virtual void toBinary  (StdOStream & os) const; 
     
    7478 
    7579         StdSize getDimension(void) const; 
    76           
     80 
    7781//         StdSize getLocalSize(void) const; 
    7882//         StdSize getGlobalSize(void) const; 
     
    8488         template <int n> 
    8589            void inputField(const CArray<double,n>& field, CArray<double,1>& stored) const; 
    86              
     90 
    8791         void inputFieldServer(const std::deque< CArray<double, 1>* > storedClient, 
    8892                               CArray<double, 1>&  storedServer) const; 
     
    9094         void outputField(int rank, const CArray<double,1>& stored,  CArray<double,3>& field)  ; 
    9195         void outputField(int rank, const CArray<double,1>& stored,  CArray<double,2>& field)  ; 
    92          void outputField(int rank, const CArray<double,1>& stored,  CArray<double,1>& field)  ;  
    93     
     96         void outputField(int rank, const CArray<double,1>& stored,  CArray<double,1>& field)  ; 
     97 
    9498         /// Destructeur /// 
    9599         virtual ~CGrid(void); 
     
    100104         static StdString GetName(void); 
    101105         static StdString GetDefName(void); 
    102           
     106 
    103107         static ENodeType GetType(void); 
    104108 
     
    115119         void computeIndexServer(void); 
    116120         void computeIndex(void); 
    117          void solveDomainRef(void); 
    118          void solveAxisRef(void); 
     121//         void solveDomainRef(void);  //TODO temporarily comment 
     122//         void solveAxisRef(void);   // TODO: temporarily comment 
     123 
     124         void solveDomainRef(bool checkAtt); 
     125         void solveAxisRef(bool checkAtt); 
    119126 
    120127         static bool dispatchEvent(CEventServer& event) ; 
     
    123130         void recvIndex(int rank, CBufferIn& buffer) ; 
    124131         void sendIndex(void) ; 
    125           
     132 
     133         void computeDomConServer(); 
     134         std::map<int, int> getDomConServerSide(); 
     135         std::map<int, StdSize> getConnectedServerDataSize(); 
    126136      public: 
    127137 
     
    129139         bool withAxis ; 
    130140         bool isChecked; 
     141         bool isDomainAxisChecked; 
    131142 
    132143         CAxis*   axis ; 
     
    137148         std::deque< CArray<int, 1>* > out_j_index ; 
    138149         std::deque< CArray<int, 1>* > out_l_index ; 
    139           
     150 
    140151        CArray<int, 1>  storeIndex_client ; 
    141152        CArray<int, 1>  out_i_client ; 
    142153        CArray<int, 1>  out_j_client ; 
    143154        CArray<int, 1>  out_l_client ; 
    144           
     155 
    145156         map<int, CArray<int, 1>* >  storeIndex_toSrv ; 
    146157         map<int,int> nbSenders ; 
     
    148159//         std::deque<ARRAY(int, 1)> out_j_toSrv ; 
    149160//         std::deque<ARRAY(int, 1)> out_l_toSrv ; 
    150           
     161 
    151162         map<int, CArray<int, 1>* > out_i_fromClient ; 
    152163         map<int, CArray<int, 1>* > out_j_fromClient ; 
    153164         map<int, CArray<int, 1>* > out_l_fromClient ; 
    154165         void checkMask(void) ; 
     166 
     167         std::map<int, int> domConnectedServerSide_; 
     168         bool isDomConServerComputed_; 
    155169   }; // class CGrid 
    156170 
Note: See TracChangeset for help on using the changeset viewer.