queso-0.52.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 (po::options_description &optionsDesc) const |
Define my environment options as the default options. More... | |
void | getMyOptionValues (po::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... | |
po::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 61 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 101 of file EnvironmentOptions.C.
References m_env, QUESO::BaseEnvironment::optionsInputFileName(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
QUESO::EnvironmentOptions::EnvironmentOptions | ( | const BaseEnvironment & | env, |
const char * | prefix, | ||
const EnvOptionsValues & | alternativeOptionsValues | ||
) |
Constructor with alternative options values.
Definition at line 129 of file EnvironmentOptions.C.
References m_env, m_prefix, QUESO::BaseEnvironment::optionsInputFileName(), QUESO::BaseEnvironment::subDisplayFile(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
QUESO::EnvironmentOptions::~EnvironmentOptions | ( | ) |
Destructor.
Definition at line 166 of file EnvironmentOptions.C.
References m_optionsDesc.
|
private |
Define my environment options as the default options.
Definition at line 222 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, 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 251 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(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
Referenced by scanOptionsValues().
void QUESO::EnvironmentOptions::print | ( | std::ostream & | os | ) | const |
Print values of the options chosen.
Definition at line 198 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, and QUESO::EnvOptionsValues::m_syncVerbosity.
Referenced by QUESO::operator<<().
void QUESO::EnvironmentOptions::scanOptionsValues | ( | ) |
Scans option values from input file.
Definition at line 173 of file EnvironmentOptions.C.
References defineMyOptions(), QUESO::BaseEnvironment::displayVerbosity(), QUESO::BaseEnvironment::fullRank(), getMyOptionValues(), m_env, m_optionsDesc, m_prefix, QUESO::BaseEnvironment::scanInputFileForMyOptions(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
Referenced by QUESO::FullEnvironment::FullEnvironment().
|
private |
Environment.
Definition at line 98 of file EnvironmentOptions.h.
Referenced by EnvironmentOptions(), getMyOptionValues(), and scanOptionsValues().
|
private |
Checking level.
Definition at line 133 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Verbosity.
Definition at line 127 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Definition at line 109 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), and getMyOptionValues().
|
private |
Identifying string.
Definition at line 147 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
My number of sub-environments.
Definition at line 112 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Platform name.
Definition at line 144 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Type of the random number generator.
Definition at line 136 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 141 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 118 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Sub-environments that will write to output.
Definition at line 124 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 121 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), and getMyOptionValues().
|
private |
My output filename for sub-screen writing.
Definition at line 115 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Synchronized verbosity.
Definition at line 130 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 107 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 88 of file EnvironmentOptions.h.
Referenced by QUESO::BaseEnvironment::checkingLevel(), QUESO::BaseEnvironment::displayVerbosity(), QUESO::FullEnvironment::FullEnvironment(), getMyOptionValues(), QUESO::BaseEnvironment::identifyingString(), QUESO::BaseEnvironment::numSubEnvironments(), QUESO::BaseEnvironment::platformName(), print(), QUESO::BaseEnvironment::subDisplayFileName(), and QUESO::BaseEnvironment::syncVerbosity().
|
private |
Options prefix.
Definition at line 101 of file EnvironmentOptions.h.
Referenced by EnvironmentOptions(), and scanOptionsValues().