queso-0.57.1
|
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... | |
ScopedPtr < boost::program_options::options_description > ::Type | 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 236 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 270 of file EnvironmentOptions.C.
References m_env, QUESO::BaseEnvironment::optionsInputFileName(), and QUESO::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 298 of file EnvironmentOptions.C.
References m_env, m_prefix, QUESO::BaseEnvironment::optionsInputFileName(), QUESO::queso_require_equal_to_msg, and QUESO::BaseEnvironment::subDisplayFile().
QUESO::EnvironmentOptions::~EnvironmentOptions | ( | ) |
Destructor.
Definition at line 335 of file EnvironmentOptions.C.
|
private |
Define my environment options as the default options.
Definition at line 397 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, and m_option_syncVerbosity.
Referenced by scanOptionsValues().
|
private |
Gets the option values of the environment.
Definition at line 428 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(), and QUESO::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 370 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 342 of file EnvironmentOptions.C.
References defineMyOptions(), QUESO::BaseEnvironment::displayVerbosity(), QUESO::BaseEnvironment::fullRank(), getMyOptionValues(), m_env, m_optionsDesc, m_prefix, and QUESO::BaseEnvironment::scanInputFileForMyOptions().
|
private |
Environment.
Definition at line 275 of file EnvironmentOptions.h.
Referenced by EnvironmentOptions(), getMyOptionValues(), and scanOptionsValues().
|
private |
Checking level.
Definition at line 312 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Verbosity.
Definition at line 306 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Definition at line 288 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), and getMyOptionValues().
|
private |
Identifying string.
Definition at line 326 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
My number of sub-environments.
Definition at line 291 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Platform name.
Definition at line 323 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Type of the random number generator.
Definition at line 315 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 320 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 297 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Sub-environments that will write to output.
Definition at line 303 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 300 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), and getMyOptionValues().
|
private |
My output filename for sub-screen writing.
Definition at line 294 of file EnvironmentOptions.h.
Referenced by defineMyOptions(), getMyOptionValues(), and print().
|
private |
Synchronized verbosity.
Definition at line 309 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 285 of file EnvironmentOptions.h.
Referenced by scanOptionsValues().
EnvOptionsValues QUESO::EnvironmentOptions::m_ov |
Instance of EnvOptionsValues, a class with default values for QUESO environment.
Definition at line 263 of file EnvironmentOptions.h.
Referenced by getMyOptionValues(), and print().
|
private |
Options prefix.
Definition at line 278 of file EnvironmentOptions.h.
Referenced by EnvironmentOptions(), and scanOptionsValues().