Matrix Science header

ms_clusterparams.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_clusterparams.hpp                                                 #
00004 # 'msparser' toolkit                                                         #
00005 # Encapsulates "mascot.dat"-file that describes most important parameters    #
00006 ##############################################################################
00007 # COPYRIGHT NOTICE                                                           #
00008 # Copyright 1998-2003 Matrix Science Limited  All Rights Reserved.           #
00009 #                                                                            #
00010 ##############################################################################
00011 #    $Archive:: /Mowse/ms_mascotresfile/include/ms_clusterparams.hpp       $ #
00012 #     $Author: villek@matrixscience.com $ #
00013 #       $Date: 2018-07-30 16:23:53 +0100 $ #
00014 #   $Revision: 1b450440f9c97e1e41d0fc6016a27d68951d4532 | MSPARSER_REL_2_8_1-0-gea32989045 $ #
00015 # $NoKeywords::                                                            $ #
00016 ##############################################################################
00017 */
00018 
00019 #ifndef MS_CLUSTERPARAMS_HPP
00020 #define MS_CLUSTERPARAMS_HPP
00021 
00022 
00023 #include <string>
00024 
00025 
00026 namespace matrix_science {
00040     enum OPERATING_SYS
00041     {
00042         _OS_UNKNOWN           = 0,   
00043         _OS_WINDOWS_NT        = 1,   
00044         _OS_LINUX             = 2,   
00045         _OS_NUM_OPERATING_SYS = 3    
00046     };
00047 
00049 
00071     class MS_MASCOTRESFILE_API ms_clusterparams: public ms_customproperty
00072     {
00073         friend class ms_datfile;
00074     public:
00076 
00083         enum {
00084             NUM_PROCESSORS_AUTO_DETECT = -1 
00085         };
00086 
00088         ms_clusterparams();
00089 
00091         ms_clusterparams(const ms_clusterparams& src);
00092 
00094         ~ms_clusterparams();
00095 
00097         void defaultValues();
00098 
00100         void copyFrom(const ms_clusterparams* right);
00101 
00102 #ifndef SWIG
00103 
00104         ms_clusterparams& operator=(const ms_clusterparams& right);
00105 #endif
00106 
00107         bool isSectionAvailable() const;
00108 
00110         void setSectionAvailable(const bool value);
00111 
00113         bool isEnabled() const;
00114 
00116         void setEnabled(const bool flag);
00117 
00119         const ms_computeraddress* getMasterComputer() const;
00120 
00122         void setMasterComputer(const ms_computeraddress* value);
00123 
00125         OPERATING_SYS getDefaultNodeOS() const;
00126 
00128         void setDefaultNodeOS(const OPERATING_SYS value);
00129 
00131         std::string getDefaultNodeHomeDir() const;
00132 
00134         void setDefaultNodeHomeDir(const char* str);
00135 
00137         int getDefaultPort() const;
00138 
00140         void setDefaultPort(const int value);
00141 
00143         std::string getDefaultNodeHomeDirFromMaster() const;
00144 
00146         void setDefaultNodeHomeDirFromMaster(const char* str);
00147 
00149         std::string getMascotNodeScript() const;
00150 
00152         void setMascotNodeScript(const char* str);
00153 
00155         std::string getMascotNodeRebootScript() const;
00156 
00158         void setMascotNodeRebootScript(const char* str);
00159 
00161         int getNumberOfSubClusters() const;
00162 
00164         void clearSubClusters();
00165 
00167         int getSubClusterID(const int index) const;
00168 
00170         int getSubClusterMaxCPU(const int index) const;
00171 
00173         void appendSubCluster(const int id, const int maxCPUs);
00174 
00175         // internal usage only
00176         int getThisSubClusterID() const;
00177 
00178         // internal usage only
00179         void setThisSubClusterID(const int id);
00180 
00182         int getIPCTimeout() const;
00183 
00185         void setIPCTimeout(const int value);
00186 
00188         int getIPCLogging() const;
00189 
00191         void setIPCLogging(const int value);
00192 
00194         std::string getIPCLogfile() const;
00195 
00197         void setIPCLogfile(const char* str);
00198 
00200         int getCheckNodesAliveFreq() const;
00201 
00203         void setCheckNodesAliveFreq(const int value);
00204 
00206         int getSecsToWaitForNodeAtStartup() const;
00207 
00209         void setSecsToWaitForNodeAtStartup(const int value);
00210 
00212         std::string getNodeSequenceDatabaseDir() const;
00213 
00215         void setNodeSequenceDatabaseDir(const char* str);
00216 
00217 #ifdef SUPPRESS_MS_CUSTOMPROPERTY_INHERITANCE
00218 #include "suppress_ms_customproperty.hpp"
00219 #endif
00220 
00221     private:
00222         bool            sectionAvailable_;
00223         bool            enabled_;
00224 
00225         ms_computeraddress masterComputer_;
00226 
00227         OPERATING_SYS   defaultNodeOS_;
00228         std::string     szDefaultNodeHomeDir_;
00229         int             defaultPort_;
00230         std::string     szDefaultNodeHomeDirFromMaster_;
00231         std::string     szMascotNodeScript_;
00232         std::string     szMascotNodeRebootScript_;
00233 
00234         std::vector<int> subClusterIDs_;
00235         std::vector<int> maxCpusPerSubCluster_;
00236         bool             anySubCluster_;
00237 
00238         int             thisSubCluster_;
00239 
00240         int             IPCTimeout_;
00241         int             IPCLogging_;
00242         std::string     IPCLogfile_;
00243         int             checkNodesAliveFreq_;
00244         int             secsToWaitForNodeAtStartup_;
00245 
00246         std::string     szNodeSequenceDatabaseDir_;
00247     }; // class ms_clusterparams // end of config_group
00249 } // namespace matrix_science
00250 
00251 #endif // MS_CLUSTERPARAMS_HPP
00252 
00253 /*------------------------------- End of File -------------------------------*/

Copyright © 2022 Matrix Science Ltd.  All Rights Reserved. Generated on Thu Mar 31 2022 01:12:29