Ignore:
Timestamp:
01/25/23 16:59:46 (17 months ago)
Author:
ymipsl
Message:

Merge XIOS_FILE_SERVICE dev branch into trunk

YM

Location:
XIOS3/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/trunk

  • XIOS3/trunk/src/node/context.hpp

    r2407 r2458  
    103103          
    104104         void initServer(MPI_Comm intraComm, int serviceType ); 
    105          void createClientInterComm(MPI_Comm interCommClient, MPI_Comm interCommServer)  ; 
    106   
    107          void createServerInterComm(void)  ; 
    108          void createServerInterComm_old(void)  ; 
    109          void createServerInterComm(const string& poolId, const string& serverId, vector<pair<string, pair<CContextClient*,CContextServer*>>>& clientServers ) ; 
    110   
    111  
     105          
    112106         bool isInitialized(void); 
    113107 
     
    123117 
    124118         bool isFinalized(void); 
    125  
    126119         void closeDefinition(void); 
    127120 
     
    159152 
    160153         // Distribute files (in write mode) among secondary-server pools according to the estimated data flux 
    161          void distributeFiles(const std::vector<CFile*>& files); 
    162          void distributeFileOverOne(const vector<CFile*>& files) ; //!< Distribute files over one single server (no distribution) 
    163          void distributeFileOverBandwith(const std::vector<CFile*>& files) ; //!< Distribute files overs servers to balance the I/O bandwith 
    164          void distributeFileOverMemoryBandwith(const std::vector<CFile*>& files) ; //!< Distribute files overs servers to minimize the memory consumption 
     154         void distributeFiles(const vector<CFile*>& files) ; 
     155         void distributeFilesOnSameService(const vector<CFile*>& files, const string& poolId, const string& serviceId) ; 
     156         void distributeFileOverOne(const vector<CFile*>& files, const string& poolId, const string& serviceId) ; //!< Distribute files over one single server (no distribution) 
     157         void distributeFileOverBandwith(const std::vector<CFile*>& files, const string& poolId, const string& serviceId) ; //!< Distribute files overs servers to balance the I/O bandwith 
     158         void distributeFileOverMemoryBandwith(const std::vector<CFile*>& files, const string& poolId, const string& serviceId) ; //!< Distribute files overs servers to minimize the memory consumption 
    165159          
    166160       public: 
     
    271265         bool setProcessingEvent(void) {isProcessingEvent_=true ;} 
    272266         bool unsetProcessingEvent(void) {isProcessingEvent_=false ;} 
    273          MPI_Comm getIntraComm(void) {return intraComm_ ;} 
    274          int getIntraCommRank(void) {return intraCommRank_;} 
    275          int getIntraCommSize(void) {return intraCommSize_;} 
    276  
     267          
    277268         void addCouplingChanel(const std::string& contextId, bool out) ; 
    278269 
     
    310301 
    311302      private: 
    312         std::string defaultReaderId ; 
    313         std::string defaultWriterId ; 
    314         std::string defaultGathererId ; 
     303        std::string defaultPoolWriterId_ ; 
     304        std::string defaultPoolReaderId_ ; 
     305        std::string defaultPoolGathererId_ ; 
     306        std::string defaultWriterId_ ; 
     307        std::string defaultReaderId_ ; 
     308        std::string defaultGathererId_ ; 
     309        bool defaultUsingServer2_ ; 
     310        void setDefaultServices(void) ; 
     311 
     312 
     313        std::map<std::pair<string,string>,std::vector<pair<CContextClient*,CContextServer*>>> serversMap_ ; 
    315314 
    316315        std::vector<CContextClient*> writerClientOut_ ; 
     
    342341        std::map<std::string, CContextServer*> couplerInServer_ ; 
    343342      public: 
     343         void createClientInterComm(MPI_Comm interCommClient, MPI_Comm interCommServer)  ; 
     344         void createServerInterComm(void)  ; // obsolete 
     345         void createServerInterComm_old(void)  ; 
     346         void createServerInterComm(const string& poolId, const string& serverId, vector<pair<string, pair<CContextClient*,CContextServer*>>>& clientServers ) ; 
     347         void getServerInterComm(const string& poolId, const string& serviceId,  vector<pair<CContextClient*,CContextServer*>>& clientServers) ; 
     348         vector<CContextClient*> getContextClient(const string& poolId, const string& serviceId) ; 
    344349         CContextClient* getCouplerInClient(const string& contextId) { return couplerInClient_[contextId] ;} 
    345350         CContextServer* getCouplerInServer(const string& contextId) { return couplerInServer_[contextId] ;} 
    346351         CContextClient* getCouplerOutClient(const string& contextId) { return couplerOutClient_[contextId] ;} 
    347352         CContextServer* getCouplerOutServer(const string& contextId) { return couplerOutServer_[contextId] ;} 
    348  
    349          CRegistry* registryIn=nullptr ;    //!< input registry which is read from file 
    350          CRegistry* registryOut=nullptr ;   //!< output registry which will be written into file at the finalize 
     353        
     354       public: // must be privatize using accessors 
     355         
     356        CRegistry* registryIn=nullptr ;    //!< input registry which is read from file 
     357        CRegistry* registryOut=nullptr ;   //!< output registry which will be written into file at the finalize 
    351358 
    352359 
     
    354361        int intraCommRank_ ; //! context intra communicator rank 
    355362        int intraCommSize_ ; //! context intra communicator size 
    356          
     363       public:  
     364        MPI_Comm getIntraComm(void) {return intraComm_ ;} 
     365        int getIntraCommRank(void) {return intraCommRank_;} 
     366        int getIntraCommSize(void) {return intraCommSize_;} 
    357367      private: 
    358368         shared_ptr<CEventScheduler> eventScheduler_ ; //! The local event scheduler for context 
Note: See TracChangeset for help on using the changeset viewer.