#include <AlpsParams.h>
Public Types | |
enum | boolParams { checkMemory, deleteDeadNode, interClusterBalance, intraClusterBalance, printSolution, endOfBoolParams } |
Character parameters. More... | |
enum | intParams { bufSpare, clockType, eliteSize, hubInitNodeNum, hubMsgLevel, hubNum, largeSize, logFileLevel, masterInitNodeNum, masterReportInterval, hubWorkClusterSizeLimit, mediumSize, msgLevel, nodeLimit, nodeLogInterval, printSystemStatus, processNum, staticBalanceScheme, searchStrategy, searchStrategyRampUp, smallSize, solLimit, unitWorkNodes, workerMsgLevel, endOfIntParams } |
Integer paramters. More... | |
enum | dblParams { changeWorkThreshold, donorThreshold, hubReportPeriod, masterBalancePeriod, needWorkThreshold, receiverThreshold, timeLimit, tolerance, unitWorkTime, zeroLoad, endOfDblParams } |
Double parameters. More... | |
enum | strParams { instance, logFile, endOfStrParams } |
String parameters. More... | |
enum | strArrayParams { strArrayDummy, endOfStrArrayParams } |
There are no string array parameters. More... | |
Public Member Functions | |
virtual | ~AlpsParams () |
AlpsParams & | operator= (const AlpsParams &x) |
virtual void | createKeywordList () |
Method for creating the list of keyword looked for in the parameter file. | |
virtual void | setDefaultEntries () |
Method for setting the default values for the parameters. | |
void | setEntry (const boolParams key, const char *val) |
char* is true(1) or false(0), not used | |
void | setEntry (const boolParams key, const char val) |
char is true(1) or false(0), not used | |
void | setEntry (const boolParams key, const bool val) |
This method is the one that ever been used. | |
void | setEntry (const intParams key, const char *val) |
void | setEntry (const intParams key, const int val) |
void | setEntry (const dblParams key, const char *val) |
void | setEntry (const dblParams key, const double val) |
void | setEntry (const strParams key, const char *val) |
void | setEntry (const strArrayParams key, const char *val) |
Constructors. | |
AlpsParams () | |
The default constructor creates a parameter set with from the template argument structure. | |
Query methods | |
For user's application: Copy following code exactly (till the end of this class) and do NOT change anything. The reason can not put following functions in base class
| |
bool | entry (const boolParams key) const |
int | entry (const intParams key) const |
double | entry (const dblParams key) const |
const std::string & | entry (const strParams key) const |
const std::vector< std::string > & | entry (const strArrayParams key) const |
Packing/unpacking methods | |
void | pack (AlpsEncoded &buf) |
Pack the parameter set into buf. | |
void | unpack (AlpsEncoded &buf) |
Unpack the parameter set from buf. |
Definition at line 36 of file AlpsParams.h.
Character parameters.
All of these variable are used as booleans (ture = 1, false = 0).
Definition at line 40 of file AlpsParams.h.
Integer paramters.
bufSpare |
The size of extra memory allocated to a message buffer. Default: 256 byte |
clockType |
Type of clock when timing rampup, rampdown, etc. CPU or Wallclock. default: wallclock |
eliteSize |
Number of the "elite" nodes that are used in determining workload. Default: 1 |
hubInitNodeNum |
The number of nodes initially generated by each hub. Default: 2 |
hubMsgLevel |
Message level of the hub specific messages. (0: no print to screen; 1: summary; 2: moderate; 3: verbose) Default: 0 |
hubNum |
The number of hubs. Default: 1 |
largeSize |
The size of memory allocated for large size message. Default: 10485760 |
logFileLevel |
The level of log file. (0: no log file; 1: summary; 2: moderate; 3: verbose) Default: 0 |
masterInitNodeNum |
The number of nodes initially generated by the master. Default: 2 |
masterReportInterval |
The interval between master report system status. Default: 10 |
hubWorkClusterSizeLimit |
If the number of processes in a cluster is less than it, the hub also work as a worker. Default: 0 (Hub does NOT work) |
mediumSize |
The size of memory allocated for medium size message. Default: 4096 |
msgLevel |
The level of printing messages on screen. Used to control master and general messages. (0: no print to screen; 1: summary; 2: moderate; 3: verbose) Default: 2 |
nodeLimit |
The max number of nodes can be processed. Default: ALPS_INT_MAX |
nodeLogInterval |
Node log interval. Default: 100 |
printSystemStatus |
Print system status: 0: do not print, 1: print. Default: 1; |
processNum |
The total number of processes that are launched for parallel code. Default: 2 Not used since can get actual number of processes from MPI. |
staticBalanceScheme |
Static load balancing scheme -- root initialization (0) -- spiral (1). |
searchStrategy |
Search strategy -- best-first (0) -- best-first-estimate (1) -- breadth-first (2) -- depth-first (3) -- hybrid (4) Default: hybrid. |
searchStrategyRampUp | |
smallSize |
The size of memory allocated for small size message. Default: 1024 |
solLimit |
The max num of solution can be stored in a solution pool. Default: ALPS_INT_MAX |
unitWorkNodes |
The size/number of nodes of a unit work. Default: 50 |
workerMsgLevel |
Message level of the worker specific messages. (0: no print to screen; 1: summary; 2: moderate; 3: verbose) Default: 0 |
endOfIntParams |
Definition at line 63 of file AlpsParams.h.
Double parameters.
Definition at line 158 of file AlpsParams.h.
String parameters.
instance |
The instance to be solved. Default: "NONE" |
logFile |
The name of log file. Default: "Alps.log " |
endOfStrParams |
Definition at line 199 of file AlpsParams.h.
There are no string array parameters.
Definition at line 212 of file AlpsParams.h.
AlpsParams::AlpsParams | ( | ) | [inline] |
The default constructor creates a parameter set with from the template argument structure.
The keyword list is created and the defaults are set.
Definition at line 227 of file AlpsParams.h.
References createKeywordList(), and setDefaultEntries().
virtual AlpsParams::~AlpsParams | ( | ) | [inline, virtual] |
Definition at line 241 of file AlpsParams.h.
AlpsParams& AlpsParams::operator= | ( | const AlpsParams & | x | ) | [inline] |
Definition at line 244 of file AlpsParams.h.
References AlpsParameterSet::bpar_, AlpsParameterSet::dpar_, endOfBoolParams, endOfDblParams, endOfIntParams, endOfStrArrayParams, endOfStrParams, AlpsParameterSet::ipar_, AlpsParameterSet::sapar_, and AlpsParameterSet::spar_.
virtual void AlpsParams::createKeywordList | ( | ) | [virtual] |
Method for creating the list of keyword looked for in the parameter file.
Implements AlpsParameterSet.
Referenced by AlpsParams().
virtual void AlpsParams::setDefaultEntries | ( | ) | [virtual] |
Method for setting the default values for the parameters.
Implements AlpsParameterSet.
Referenced by AlpsParams().
bool AlpsParams::entry | ( | const boolParams | key | ) | const [inline] |
Definition at line 293 of file AlpsParams.h.
References AlpsParameterSet::bpar_.
Referenced by KnapModel::readParameters().
int AlpsParams::entry | ( | const intParams | key | ) | const [inline] |
Definition at line 295 of file AlpsParams.h.
References AlpsParameterSet::ipar_.
double AlpsParams::entry | ( | const dblParams | key | ) | const [inline] |
Definition at line 297 of file AlpsParams.h.
References AlpsParameterSet::dpar_.
const std::string& AlpsParams::entry | ( | const strParams | key | ) | const [inline] |
Definition at line 300 of file AlpsParams.h.
References AlpsParameterSet::spar_.
const std::vector<std::string>& AlpsParams::entry | ( | const strArrayParams | key | ) | const [inline] |
Definition at line 303 of file AlpsParams.h.
References AlpsParameterSet::sapar_.
void AlpsParams::setEntry | ( | const boolParams | key, | |
const char * | val | |||
) | [inline] |
char* is true(1) or false(0), not used
Definition at line 309 of file AlpsParams.h.
References AlpsParameterSet::bpar_.
void AlpsParams::setEntry | ( | const boolParams | key, | |
const char | val | |||
) | [inline] |
char is true(1) or false(0), not used
Definition at line 312 of file AlpsParams.h.
References AlpsParameterSet::bpar_.
void AlpsParams::setEntry | ( | const boolParams | key, | |
const bool | val | |||
) | [inline] |
This method is the one that ever been used.
Definition at line 315 of file AlpsParams.h.
References AlpsParameterSet::bpar_.
void AlpsParams::setEntry | ( | const intParams | key, | |
const char * | val | |||
) | [inline] |
Definition at line 318 of file AlpsParams.h.
References AlpsParameterSet::ipar_.
void AlpsParams::setEntry | ( | const intParams | key, | |
const int | val | |||
) | [inline] |
Definition at line 321 of file AlpsParams.h.
References AlpsParameterSet::ipar_.
void AlpsParams::setEntry | ( | const dblParams | key, | |
const char * | val | |||
) | [inline] |
Definition at line 324 of file AlpsParams.h.
References AlpsParameterSet::dpar_.
void AlpsParams::setEntry | ( | const dblParams | key, | |
const double | val | |||
) | [inline] |
Definition at line 327 of file AlpsParams.h.
References AlpsParameterSet::dpar_.
void AlpsParams::setEntry | ( | const strParams | key, | |
const char * | val | |||
) | [inline] |
Definition at line 330 of file AlpsParams.h.
References AlpsParameterSet::spar_.
void AlpsParams::setEntry | ( | const strArrayParams | key, | |
const char * | val | |||
) | [inline] |
Definition at line 333 of file AlpsParams.h.
References AlpsParameterSet::sapar_.
void AlpsParams::pack | ( | AlpsEncoded & | buf | ) | [inline, virtual] |
Pack the parameter set into buf.
Reimplemented from AlpsParameterSet.
Definition at line 341 of file AlpsParams.h.
References AlpsParameterSet::bpar_, AlpsParameterSet::dpar_, endOfBoolParams, endOfDblParams, endOfIntParams, endOfStrArrayParams, endOfStrParams, AlpsParameterSet::ipar_, AlpsParameterSet::sapar_, AlpsParameterSet::spar_, and AlpsEncoded::writeRep().
void AlpsParams::unpack | ( | AlpsEncoded & | buf | ) | [inline, virtual] |
Unpack the parameter set from buf.
Reimplemented from AlpsParameterSet.
Definition at line 355 of file AlpsParams.h.
References AlpsParameterSet::bpar_, AlpsParameterSet::dpar_, endOfBoolParams, endOfDblParams, endOfIntParams, endOfStrArrayParams, endOfStrParams, AlpsParameterSet::ipar_, AlpsEncoded::readRep(), AlpsParameterSet::sapar_, and AlpsParameterSet::spar_.