An instance of this class represents all the parameters specified in the Cluster section of mascot.dat
.
More...
#include <ms_clusterparams.hpp>
Public Types | |
enum | { NUM_PROCESSORS_AUTO_DETECT = -1 } |
Value used to indicate that the number of processors in the first SubClusterSet should be automatically determined at runtime. More... | |
Public Member Functions | |
ms_clusterparams () | |
Default constructor. | |
ms_clusterparams (const ms_clusterparams &src) | |
Copying constructor. | |
~ms_clusterparams () | |
Destructor. | |
void | appendSubCluster (const int id, const int maxCPUs) |
Add a new SubClusterSet entry. | |
void | clearSubClusters () |
Erases information about all sub clusters. | |
void | copyFrom (const ms_clusterparams *right) |
Can be used to create a copy of another object. | |
void | defaultValues () |
Initialises the instance with default values. | |
int | getCheckNodesAliveFreq () const |
Returns the value of CheckNodesAliveFreq. | |
std::string | getDefaultNodeHomeDir () const |
Returns the value of DefaultNodeHomeDir. | |
std::string | getDefaultNodeHomeDirFromMaster () const |
Returns the value of DefaultNodeHomeDirFromMaster. | |
OPERATING_SYS | getDefaultNodeOS () const |
Returns value of DefaultNodeOS as one of the enumeration members. | |
int | getDefaultPort () const |
Returns the value of DefaultPort. | |
std::string | getIPCLogfile () const |
Returns the value of IPCLogfile. | |
int | getIPCLogging () const |
Returns value of IPCLogging. | |
int | getIPCTimeout () const |
Returns the value of IPCTimeout. | |
std::string | getMascotNodeRebootScript () const |
Returns the value of MascotNodeRebootScript. | |
std::string | getMascotNodeScript () const |
Returns the value of MascotNodeScript. | |
const ms_computeraddress * | getMasterComputer () const |
Returns an instance of ms_computeraddress created for MasterComputerName. | |
std::string | getNodeSequenceDatabaseDir () const |
Returns the value of NodeSequenceDatabaseDir. | |
int | getNumberOfSubClusters () const |
Returns the number of SubClusterSet parameter entries, which is a total number of sub-clusters. | |
std::string | getPreceedingComments () const |
Returns any comments preceeding the section. | |
int | getSecsToWaitForNodeAtStartup () const |
Returns the value of SecsToWaitForNodeAtStartup. | |
int | getSubClusterID (const int index) const |
Returns sub-cluster ID by its index. | |
int | getSubClusterMaxCPU (const int index) const |
Returns the Y part of SubClusterSet. | |
bool | isEnabled () const |
Returns TRUE if Enabled parameter is set to 1 and FALSE otherwise. | |
bool | isSectionAvailable () const |
Check whether the section has been actually read from the file. | |
ms_clusterparams & | operator= (const ms_clusterparams &right) |
Assignment operator for C++ client applications. | |
void | setCheckNodesAliveFreq (const int value) |
Change CheckNodesAliveFreq. | |
void | setDefaultNodeHomeDir (const char *str) |
Change DefaultNodeHomeDir. | |
void | setDefaultNodeHomeDirFromMaster (const char *str) |
Change DefaultNodeHomeDirFromMaster. | |
void | setDefaultNodeOS (const OPERATING_SYS value) |
Change DefaultNodeOS. | |
void | setDefaultPort (const int value) |
Change DefaultPort. | |
void | setEnabled (const bool flag) |
Change Enabled. | |
void | setIPCLogfile (const char *str) |
Change IPCLogfile. | |
void | setIPCLogging (const int value) |
Change IPCLogging. | |
void | setIPCTimeout (const int value) |
Change IPCTimeout. | |
void | setMascotNodeRebootScript (const char *str) |
Change MascotNodeRebootScript. | |
void | setMascotNodeScript (const char *str) |
Change MascotNodeScript. | |
void | setMasterComputer (const ms_computeraddress *value) |
Change MasterComputerName. | |
void | setNodeSequenceDatabaseDir (const char *str) |
Change NodeSequenceDatabaseDir. | |
void | setPreceedingComments (const std::string &comments) |
Sets any comments preceeding the section. | |
void | setSecsToWaitForNodeAtStartup (const int value) |
Change SecsToWaitForNodeAtStartup. | |
void | setSectionAvailable (const bool value) |
Change availability of the section, i.e. if it should be saved in a file. |
An instance of this class represents all the parameters specified in the Cluster section of mascot.dat
.
An instance of this class is created and polulated in ms_datfile. It can also be created separately and initialized with default values. One can create an instance of the class or copy from another instance in order to pass it then as an parameters-containing object. For detailed information on any of the options please consult Mascot manual.
Also get yourselves acquainted with the base class ms_customproperty. It facilitates the following tasks:
More functionality is described in the documentation for ms_customproperty.
anonymous enum |
Value used to indicate that the number of processors in the first SubClusterSet should be automatically determined at runtime.
The value assigned will be identical to the number of 'processors' licensed.
(Defined as an enum rather than static const int to support VC6)
void appendSubCluster | ( | const int | id, |
const int | maxCPUs | ||
) |
Add a new SubClusterSet entry.
See getNumberOfSubClusters() for more information.
id | unique ID identifying a sub-cluster (from 0 to 49) to set number of CPUs for. |
maxCPUs | maximum number of CPUs for the specified sub-cluster (from 0 to 1024*64). |
void clearSubClusters | ( | ) |
Erases information about all sub clusters.
One entry (0,0) for "this subcluster" stays in the list forever.
int getCheckNodesAliveFreq | ( | ) | const |
Returns the value of CheckNodesAliveFreq.
The CheckNodesAliveFreq parameter specifies the interval in seconds between 'health checks' on the nodes. Default value is 30 sec.
std::string getDefaultNodeHomeDir | ( | ) | const |
Returns the value of DefaultNodeHomeDir.
If no specific home directory is specified for a particular node in nodelist.txt
, then the value of the DefaultNodeHomeDir parameter is used. To override this setting for a particular node, enter the directory on the node line in nodelist.txt
.
Default is the /MascotNode
folder.
std::string getDefaultNodeHomeDirFromMaster | ( | ) | const |
Returns the value of DefaultNodeHomeDirFromMaster.
This is the directory on the node as seen from the master. For a Windows cluster, this must be present and specified as a UNC name. For a Unix cluster, this parameter must be commented out.
Default is
\\<host_name>\c$\mascotnode
OPERATING_SYS getDefaultNodeOS | ( | ) | const |
Returns value of DefaultNodeOS as one of the enumeration members.
If no OS is defined for a particular node, then this parameter value is assumed as the OS. See OPERATING_SYS for a list of possible values.
Default is _OS_WINDOWS_NT (2).
int getDefaultPort | ( | ) | const |
Returns the value of DefaultPort.
If no port number is specified for a node in nodelist.txt
, then this port number will be used.
Default is 5001.
std::string getIPCLogfile | ( | ) | const |
Returns the value of IPCLogfile.
The IPCLogfile parameter specifies a relative path to the inter-process communication log file.
Default is ../logs/IPC.log
.
int getIPCLogging | ( | ) | const |
Returns value of IPCLogging.
IPCLogging specifies logging level for inter-process communications. It has the followings possible values:
Default is 0.
int getIPCTimeout | ( | ) | const |
Returns the value of IPCTimeout.
The IPCTimeout parameter is the timeout in seconds for inter-process communication.
Default is 10 seconds.
std::string getMascotNodeRebootScript | ( | ) | const |
Returns the value of MascotNodeRebootScript.
MascotNodeRebootScript is the name of an optional script to re-boot a cluster node. If this parameter is defined, then there will be a link at the bottom of each Mascot Cluster Node status page. When this link is clicked, ms-monitor
will run the defined script on the master. The host name of the specified node will be passed to the script as a parameter.
By default this is empty.
std::string getMascotNodeScript | ( | ) | const |
Returns the value of MascotNodeScript.
The MascotNodeScript parameter specifies a script name which is run for each node with different parameters described in Mascot manual.
By default this is empty.
const ms_computeraddress * getMasterComputer | ( | ) | const |
Returns an instance of ms_computeraddress created for MasterComputerName.
The MasterComputerName parameter contains a host name for the master computer and, optionally, the IP address separated by a comma. See ms_computeraddress for information about its parameters and default values.
std::string getNodeSequenceDatabaseDir | ( | ) | const |
Returns the value of NodeSequenceDatabaseDir.
Specify the sequence database directory to be used by to all cluster nodes. This can be a relative path to the node bin directory or an absolute path. Default is the ../sequence
sub folder.
int getNumberOfSubClusters | ( | ) | const |
Returns the number of SubClusterSet parameter entries, which is a total number of sub-clusters.
Large clusters can be divided into sub-clusters. There might be several SubClusterSet parameter entries on separate lines in the configuration file. Each parameter line has the following format:
SubClusterSet X Y
X
is a unique integer value (0-based) used to identify the sub-cluster (from 0 to 49 inclusively).
Y
is the maximum number of processors in the sub-cluster.
A single cluster must have a single entry with X
set to 0. If no such entries are present in the file, one subcluster is assumed - default entry (0,0). Therefore, default value returned by this function is 1.
Use getSubClusterID() and getSubClusterMaxCPU() to retrieve the entries.
std::string getPreceedingComments | ( | ) | const [inherited] |
Returns any comments preceeding the section.
Sections in the mascot.dat file may have comments preceeding them. In most cases, these comments need to stay 'attached' to the section.
Multiple line comments are supported by having a single string with newline characters
int getSecsToWaitForNodeAtStartup | ( | ) | const |
Returns the value of SecsToWaitForNodeAtStartup.
The SecsToWaitForNodeAtStartup parameter specifies a timeout. At startup, if a node is not available within this time, the system will continue to startup without that node. If the value is set to 0, then the system will wait indefinitely.
This timeout is also used if a node fails while the system is running. The system will wait for this number of seconds before re-initialising ms-monitor.exe
. This means that a short-lived interruption in network communication doesn't create a major service interruption.
Default is 60 sec.
int getSubClusterID | ( | const int | index ) | const |
Returns sub-cluster ID by its index.
index | a number between 0 and (getNumberOfSubClusters()-1). |
int getSubClusterMaxCPU | ( | const int | index ) | const |
Returns the Y
part of SubClusterSet.
See getNumberOfSubClusters() for more detailed explanations.
index | a number in the list (from 0 to (getNumberOfSubClusters()-1)). |
bool isSectionAvailable | ( | ) | const |
Check whether the section has been actually read from the file.
By default the Options
section is unavailable until it has been set to a different state.
void setCheckNodesAliveFreq | ( | const int | value ) |
Change CheckNodesAliveFreq.
See getCheckNodesAliveFreq() for more information.
value | Frequency to check if nodes are alive |
void setDefaultNodeHomeDir | ( | const char * | str ) |
Change DefaultNodeHomeDir.
See getDefaultNodeHomeDir() for more information.
str | default node home directory |
void setDefaultNodeHomeDirFromMaster | ( | const char * | str ) |
Change DefaultNodeHomeDirFromMaster.
See getDefaultNodeHomeDirFromMaster() for more information.
str | default mode home directory from master |
void setDefaultNodeOS | ( | const OPERATING_SYS | value ) |
void setDefaultPort | ( | const int | value ) |
void setEnabled | ( | const bool | flag ) |
void setIPCLogfile | ( | const char * | str ) |
void setIPCLogging | ( | const int | value ) |
void setIPCTimeout | ( | const int | value ) |
void setMascotNodeRebootScript | ( | const char * | str ) |
Change MascotNodeRebootScript.
See getMascotNodeRebootScript() for more information.
str | mascot mode reboot script |
void setMascotNodeScript | ( | const char * | str ) |
Change MascotNodeScript.
See getMascotNodeScript() for more information.
str | Mascot node script |
void setMasterComputer | ( | const ms_computeraddress * | value ) |
Change MasterComputerName.
See getMasterComputer() for more information.
value | Pointer to a valid ms_computeraddress object |
void setNodeSequenceDatabaseDir | ( | const char * | str ) |
Change NodeSequenceDatabaseDir.
See getNodeSequenceDatabaseDir() for more information.
str | node sequence database directory |
void setPreceedingComments | ( | const std::string & | comments ) | [inherited] |
Sets any comments preceeding the section.
Sections in the mascot.dat file may have comments preceeding them. In most cases, these comments need to stay 'attached' to the section.
Multiple line comments are supported by having a single string with newline characters
comments | any comments preceeding the section |
void setSecsToWaitForNodeAtStartup | ( | const int | value ) |
Change SecsToWaitForNodeAtStartup.
See getSecsToWaitForNodeAtStartup() for more information.
value | seconds to wait for node at startup |
void setSectionAvailable | ( | const bool | value ) |
Change availability of the section, i.e. if it should be saved in a file.
Value of 1 is to enable cluster mode, whereas 0 is to enable single server mode.
Default is 0.
value | Boolean whether the section is available |
Copyright © 2022 Matrix Science Ltd. All Rights Reserved. Generated on Thu Mar 31 2022 01:12:31 |