queso-0.56.0
|
This class reads options one can pass to a QUESO environment through an input file. More...
#include <EnvironmentOptions.h>
Public Member Functions | |
Constructor/Destructor methods | |
EnvironmentOptions (const BaseEnvironment &env, const char *prefix) | |
Default constructor. More... | |
EnvironmentOptions (const BaseEnvironment &env, const char *prefix, const EnvOptionsValues &alternativeOptionsValues) | |
Constructor with alternative options values. More... | |
~EnvironmentOptions () | |
Destructor. More... | |
I/O methods | |
void | scanOptionsValues () |
Scans option values from input file. More... | |
void | print (std::ostream &os) const |
Print values of the options chosen. More... | |
Public Attributes | |
EnvOptionsValues | m_ov |
Instance of EnvOptionsValues, a class with default values for QUESO environment. More... | |
Private Member Functions | |
void | defineMyOptions (boost::program_options::options_description &optionsDesc) const |
Define my environment options as the default options. More... | |
void | getMyOptionValues (boost::program_options::options_description &optionsDesc) |
Gets the option values of the environment. More... | |
Private Attributes | |
const BaseEnvironment & | m_env |
Environment. More... | |
std::string | m_prefix |
Options prefix. More... | |
boost::program_options::options_description * | m_optionsDesc |
Environment options description. More... | |
std::string | m_option_help |
std::string | m_option_numSubEnvironments |
My number of sub-environments. More... | |
std::string | m_option_subDisplayFileName |
My output filename for sub-screen writing. More... | |
std::string | m_option_subDisplayAllowAll |
Allows (or not) all sub-environments to write to output file. More... | |
std::string | m_option_subDisplayAllowInter0 |
Allows (or not) all inter0 nodes to write to output file. More... | |
std::string | m_option_subDisplayAllowedSet |
Sub-environments that will write to output. More... | |
std::string | m_option_displayVerbosity |
Verbosity. More... | |
std::string | m_option_syncVerbosity |
Synchronized verbosity. More... | |
std::string | m_option_checkingLevel |
Checking level. More... | |
std::string | m_option_rngType |
Type of the random number generator. More... | |
std::string | m_option_seed |
Seed of the random number generator. More... | |
std::string | m_option_platformName |
Platform name. More... | |
std::string | m_option_identifyingString |
Identifying string. More... | |
This class reads options one can pass to a QUESO environment through an input file.
QUESO expects the user to provide an input file with environment options for the library variables. This class reads the input options for QUESO environment variables.
Definition at line 233 of file EnvironmentOptions.h.
QUESO::EnvironmentOptions::EnvironmentOptions | ( | const BaseEnvironment & | env, |
const char * | prefix | ||
) |
Default constructor.
Assigns the default suite of options to the environment.
Definition at line 271 of file EnvironmentOptions.C.
References m_env, QUESO::BaseEnvironment::optionsInputFileName(), queso_deprecated, and queso_require_not_equal_to_msg.
QUESO::EnvironmentOptions::EnvironmentOptions | ( | const BaseEnvironment & | env, |
const char * | prefix, | ||
const EnvOptionsValues & | alternativeOptionsValues | ||
) |
Constructor with alternative options values.
Definition at line 299 of file EnvironmentOptions.C.
References m_env, m_prefix, QUESO::BaseEnvironment::optionsInputFileName(), queso_deprecated, queso_require_equal_to_msg, and QUESO::BaseEnvironment::subDisplayFile().
QUESO::EnvironmentOptions::~EnvironmentOptions | ( | ) |
Destructor.
Definition at line 336 of file EnvironmentOptions.C.
References m_optionsDesc, and queso_deprecated.
|
private |
Define my environment options as the default options.
Definition at line 402 of file EnvironmentOptions.C.
References m_option_checkingLevel, m_option_displayVerbosity, m_option_help, m_option_identifyingString, m_option_numSubEnvironments, m_option_platformName, m_option_rngType, m_option_seed, m_option_subDisplayAllowAll, m_option_subDisplayAllowedSet, m_option_subDisplayAllowInter0, m_option_subDisplayFileName, m_option_syncVerbosity, queso_deprecated, UQ_ENV_CHECKING_LEVEL_ODV, UQ_ENV_DISPLAY_VERBOSITY_ODV, UQ_ENV_IDENTIFYING_STRING_ODV, UQ_ENV_NUM_SUB_ENVIRONMENTS_ODV, UQ_ENV_PLATFORM_NAME_ODV, UQ_ENV_RNG_TYPE_ODV, UQ_ENV_SEED_ODV, UQ_ENV_SUB_DISPLAY_ALLOW_ALL_ODV, UQ_ENV_SUB_DISPLAY_ALLOW_INTER0_ODV, UQ_ENV_SUB_DISPLAY_ALLOWED_SET_ODV, UQ_ENV_SUB_DISPLAY_FILE_NAME_ODV, and UQ_ENV_SYNC_VERBOSITY_ODV.
Referenced by scanOptionsValues().
|
private |
Gets the option values of the environment.
Definition at line 433 of file EnvironmentOptions.C.
References QUESO::BaseEnvironment::allOptionsMap(), QUESO::BaseEnvironment::fullComm(), QUESO::BaseEnvironment::fullRank(), QUESO::EnvOptionsValues::m_checkingLevel, QUESO::EnvOptionsValues::m_displayVerbosity, m_env, QUESO::EnvOptionsValues::m_identifyingString, QUESO::EnvOptionsValues::m_numSubEnvironments, m_option_checkingLevel, m_option_displayVerbosity, m_option_help, m_option_identifyingString, m_option_numSubEnvironments, m_option_platformName, m_option_rngType, m_option_seed, m_option_subDisplayAllowAll, m_option_subDisplayAllowedSet, m_option_subDisplayAllowInter0, m_option_subDisplayFileName, m_option_syncVerbosity, m_ov, QUESO::EnvOptionsValues::m_platformName, QUESO::EnvOptionsValues::m_rngType, QUESO::EnvOptionsValues::m_seed, QUESO::EnvOptionsValues::m_subDisplayAllowAll, QUESO::EnvOptionsValues::m_subDisplayAllowedSet, QUESO::EnvOptionsValues::m_subDisplayAllowInter0, QUESO::EnvOptionsValues::m_subDisplayFileName, QUESO::EnvOptionsValues::m_syncVerbosity, QUESO::MiscReadDoublesFromString(), QUESO::MpiComm::NumProc(), queso_deprecated, and queso_require_equal_to_msg.
Referenced by scanOptionsValues().
void QUESO::EnvironmentOptions::print | ( | std::ostream & | os | ) | const |
Print values of the options chosen.
Definition at line 375 of file EnvironmentOptions.C.
References QUESO::EnvOptionsValues::m_checkingLevel, QUESO::EnvOptionsValues::m_displayVerbosity, QUESO::EnvOptionsValues::m_identifyingString, QUESO::EnvOptionsValues::m_numSubEnvironments, m_option_checkingLevel, m_option_displayVerbosity, m_option_identifyingString, m_option_numSubEnvironments, m_option_platformName, m_option_rngType, m_option_seed, m_option_subDisplayAllowAll, m_option_subDisplayAllowedSet, m_option_subDisplayFileName, m_option_syncVerbosity, m_ov, QUESO::EnvOptionsValues::m_platformName, QUESO::EnvOptionsValues::m_rngType, QUESO::EnvOptionsValues::m_seed, QUESO::EnvOptionsValues::m_subDisplayAllowAll, QUESO::EnvOptionsValues::m_subDisplayAllowedSet, QUESO::EnvOptionsValues::m_subDisplayFileName, QUESO::EnvOptionsValues::m_syncVerbosity, and queso_deprecated.
Referenced by QUESO::operator<<().
void QUESO::EnvironmentOptions::scanOptionsValues | ( | ) |
Scans option values from input file.
Definition at line 347 of file EnvironmentOptions.C.
References defineMyOptions(), QUESO::BaseEnvironment::displayVerbosity(), QUESO::BaseEnvironment::fullRank(), getMyOptionValues(), m_env, m_optionsDesc, m_prefix, queso_deprecated, queso_require_msg, and QUESO::BaseEnvironment::scanInputFileForMyOptions().
|
private |
Environment.
Definition at line 272 of file EnvironmentOptions.h.
Referenced by EnvironmentOptions(), getMyOptionValues(), and scanOptionsValues().
|
private |
Checking level.
Definition at line 309 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Verbosity.
Definition at line 303 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Definition at line 285 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), and getMyOptionValues().
|
private |
Identifying string.
Definition at line 323 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
My number of sub-environments.
Definition at line 288 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Platform name.
Definition at line 320 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Type of the random number generator.
Definition at line 312 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Seed of the random number generator.
If env_seed = -z, with z>=1, then each processor sets the seed to value MPI_RANK + z. It is crucial that +env_seed+ takes a {negative} value, otherwise all chain samples are going to be the same.
Definition at line 317 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Allows (or not) all sub-environments to write to output file.
Definition at line 294 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Sub-environments that will write to output.
Definition at line 300 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Allows (or not) all inter0 nodes to write to output file.
Definition at line 297 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), and getMyOptionValues().
|
private |
My output filename for sub-screen writing.
Definition at line 291 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Synchronized verbosity.
Definition at line 306 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Environment options description.
Uses boost::program_options::options_description. A set of option descriptions. This provides convenient interface for adding new option method, and facilities to search for options by name.
Definition at line 282 of file EnvironmentOptions.h.
Referenced by scanOptionsValues(), and ~EnvironmentOptions().
EnvOptionsValues QUESO::EnvironmentOptions::m_ov |
Instance of EnvOptionsValues, a class with default values for QUESO environment.
Definition at line 260 of file EnvironmentOptions.h.
Referenced by getMyOptionValues(), and print().
|
private |
Options prefix.
Definition at line 275 of file EnvironmentOptions.h.
Referenced by EnvironmentOptions(), and scanOptionsValues().