Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_clusterparams.hpp
1/*
2##############################################################################
3# file: ms_clusterparams.hpp #
4# 'msparser' toolkit #
5# Encapsulates "mascot.dat"-file that describes most important parameters #
6##############################################################################
7# COPYRIGHT NOTICE #
8# Copyright 1998-2003 Matrix Science Limited All Rights Reserved. #
9# #
10##############################################################################
11# $Archive:: /Mowse/ms_mascotresfile/include/ms_clusterparams.hpp $ #
12# $Author: villek@matrixscience.com $ #
13# $Date: 2018-07-30 16:23:53 +0100 $ #
14# $Revision: 1b450440f9c97e1e41d0fc6016a27d68951d4532 | MSPARSER_REL_3_0_0-2024-09-24-0-g93ebaeb4f4 $ #
15# $NoKeywords:: $ #
16##############################################################################
17*/
18
19#ifndef MS_CLUSTERPARAMS_HPP
20#define MS_CLUSTERPARAMS_HPP
21
22
23#include <string>
24
25
26namespace matrix_science {
41 {
46 };
47
49
71 class MS_MASCOTRESFILE_API ms_clusterparams: public ms_customproperty
72 {
73 friend class ms_datfile;
74 public:
76
83 enum {
84 NUM_PROCESSORS_AUTO_DETECT = -1
85 };
86
89
92
95
97 void defaultValues();
98
100 void copyFrom(const ms_clusterparams* right);
101
102#ifndef SWIG
104 ms_clusterparams& operator=(const ms_clusterparams& right);
105#endif
107 bool isSectionAvailable() const;
108
110 void setSectionAvailable(const bool value);
111
113 bool isEnabled() const;
114
116 void setEnabled(const bool flag);
117
119 const ms_computeraddress* getMasterComputer() const;
120
122 void setMasterComputer(const ms_computeraddress* value);
123
125 OPERATING_SYS getDefaultNodeOS() const;
126
128 void setDefaultNodeOS(const OPERATING_SYS value);
129
131 std::string getDefaultNodeHomeDir() const;
132
134 void setDefaultNodeHomeDir(const char* str);
135
137 int getDefaultPort() const;
138
140 void setDefaultPort(const int value);
141
143 std::string getDefaultNodeHomeDirFromMaster() const;
144
146 void setDefaultNodeHomeDirFromMaster(const char* str);
147
149 std::string getMascotNodeScript() const;
150
152 void setMascotNodeScript(const char* str);
153
155 std::string getMascotNodeRebootScript() const;
156
158 void setMascotNodeRebootScript(const char* str);
159
161 int getNumberOfSubClusters() const;
162
164 void clearSubClusters();
165
167 int getSubClusterID(const int index) const;
168
170 int getSubClusterMaxCPU(const int index) const;
171
173 void appendSubCluster(const int id, const int maxCPUs);
174
175 // internal usage only
176 int getThisSubClusterID() const;
177
178 // internal usage only
179 void setThisSubClusterID(const int id);
180
182 int getIPCTimeout() const;
183
185 void setIPCTimeout(const int value);
186
188 int getIPCLogging() const;
189
191 void setIPCLogging(const int value);
192
194 std::string getIPCLogfile() const;
195
197 void setIPCLogfile(const char* str);
198
200 int getCheckNodesAliveFreq() const;
201
203 void setCheckNodesAliveFreq(const int value);
204
206 int getSecsToWaitForNodeAtStartup() const;
207
209 void setSecsToWaitForNodeAtStartup(const int value);
210
212 std::string getNodeSequenceDatabaseDir() const;
213
215 void setNodeSequenceDatabaseDir(const char* str);
216
217#ifdef SUPPRESS_MS_CUSTOMPROPERTY_INHERITANCE
218#include "suppress_ms_customproperty.hpp"
219#endif
220
221 private:
222 bool sectionAvailable_;
223 bool enabled_;
224
225 ms_computeraddress masterComputer_;
226
227 OPERATING_SYS defaultNodeOS_;
228 std::string szDefaultNodeHomeDir_;
229 int defaultPort_;
230 std::string szDefaultNodeHomeDirFromMaster_;
231 std::string szMascotNodeScript_;
232 std::string szMascotNodeRebootScript_;
233
234 std::vector<int> subClusterIDs_;
235 std::vector<int> maxCpusPerSubCluster_;
236 bool anySubCluster_;
237
238 int thisSubCluster_;
239
240 int IPCTimeout_;
241 int IPCLogging_;
242 std::string IPCLogfile_;
243 int checkNodesAliveFreq_;
244 int secsToWaitForNodeAtStartup_;
245
246 std::string szNodeSequenceDatabaseDir_;
247 }; // class ms_clusterparams // end of config_group
249} // namespace matrix_science
250
251#endif // MS_CLUSTERPARAMS_HPP
252
253/*------------------------------- End of File -------------------------------*/
An instance of this class represents all the parameters specified in the Cluster section of mascot....
Definition: ms_clusterparams.hpp:72
The class serves as a container for computer address parameters for cluster mode.
Definition: ms_computeraddress.hpp:34
The class is used as a base for property-containing classes, such as ms_mascotoptions.
Definition: ms_customproperty.hpp:91
Encapsulates the mascot.dat file that contains the most important parameters.
Definition: ms_datfile.hpp:47
OPERATING_SYS
Definition: ms_clusterparams.hpp:41
@ _OS_NUM_OPERATING_SYS
Placeholder.
Definition: ms_clusterparams.hpp:45
@ _OS_WINDOWS_NT
WindowsXXX.
Definition: ms_clusterparams.hpp:43
@ _OS_LINUX
Linux.
Definition: ms_clusterparams.hpp:44
@ _OS_UNKNOWN
Unknown OS.
Definition: ms_clusterparams.hpp:42