queso-0.51.1
Public Attributes | Private Member Functions | Private Attributes | List of all members
QUESO::EnvironmentOptions Class Reference

This class reads options one can pass to a QUESO environment through an input file. More...

#include <EnvironmentOptions.h>

Collaboration diagram for QUESO::EnvironmentOptions:
Collaboration graph
[legend]

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 BaseEnvironmentm_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...
 

Detailed Description

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.

Constructor & Destructor Documentation

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().

104  :
105  m_ov (),
106  m_env (env),
107  m_prefix ((std::string)(prefix) + "env_"),
108  m_optionsDesc (new po::options_description("Environment options")),
109  m_option_help (m_prefix + "help" ),
110  m_option_numSubEnvironments (m_prefix + "numSubEnvironments" ),
111  m_option_subDisplayFileName (m_prefix + "subDisplayFileName" ),
112  m_option_subDisplayAllowAll (m_prefix + "subDisplayAllowAll" ),
113  m_option_subDisplayAllowInter0(m_prefix + "subDisplayAllowInter0"),
114  m_option_subDisplayAllowedSet (m_prefix + "subDisplayAllowedSet" ),
115  m_option_displayVerbosity (m_prefix + "displayVerbosity" ),
116  m_option_syncVerbosity (m_prefix + "syncVerbosity" ),
117  m_option_checkingLevel (m_prefix + "checkingLevel" ),
118  m_option_rngType (m_prefix + "rngType" ),
119  m_option_seed (m_prefix + "seed" ),
120  m_option_platformName (m_prefix + "platformName" ),
121  m_option_identifyingString (m_prefix + "identifyingString" )
122 {
124  m_env.worldRank(),
125  "EnvironmentOptions::constructor(1)",
126  "this constructor is incompatible with the abscense of an options input file");
127 }
int worldRank() const
Returns the process world rank.
Definition: Environment.C:235
std::string m_option_rngType
Type of the random number generator.
const BaseEnvironment & m_env
Environment.
std::string m_option_subDisplayAllowedSet
Sub-environments that will write to output.
std::string m_prefix
Options prefix.
std::string optionsInputFileName() const
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the...
Definition: Environment.C:341
po::options_description * m_optionsDesc
Environment options description.
std::string m_option_numSubEnvironments
My number of sub-environments.
std::string m_option_checkingLevel
Checking level.
std::string m_option_platformName
Platform name.
std::string m_option_identifyingString
Identifying string.
std::string m_option_subDisplayFileName
My output filename for sub-screen writing.
std::string m_option_displayVerbosity
Verbosity.
std::string m_option_subDisplayAllowInter0
Allows (or not) all inter0 nodes to write to output file.
std::string m_option_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
std::string m_option_seed
Seed of the random number generator.
std::string m_option_syncVerbosity
Synchronized verbosity.
#define UQ_FATAL_TEST_MACRO(test, givenRank, where, what)
Definition: Defines.h:223
EnvOptionsValues m_ov
Instance of EnvOptionsValues, a class with default values for QUESO environment.
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().

133  :
134  m_ov (alternativeOptionsValues),
135  m_env (env),
136  m_prefix ((std::string)(prefix) + "env_"),
137  m_optionsDesc (NULL),
138  m_option_help (m_prefix + "help" ),
139  m_option_numSubEnvironments (m_prefix + "numSubEnvironments" ),
140  m_option_subDisplayFileName (m_prefix + "subDisplayFileName" ),
141  m_option_subDisplayAllowAll (m_prefix + "subDisplayAllowAll" ),
142  m_option_subDisplayAllowInter0(m_prefix + "subDisplayAllowInter0"),
143  m_option_subDisplayAllowedSet (m_prefix + "subDisplayAllowedSet" ),
144  m_option_displayVerbosity (m_prefix + "displayVerbosity" ),
145  m_option_syncVerbosity (m_prefix + "syncVerbosity" ),
146  m_option_checkingLevel (m_prefix + "checkingLevel" ),
147  m_option_rngType (m_prefix + "rngType" ),
148  m_option_seed (m_prefix + "seed" ),
149  m_option_platformName (m_prefix + "platformName" ),
150  m_option_identifyingString (m_prefix + "identifyingString" )
151 {
153  m_env.worldRank(),
154  "EnvironmentOptions::constructor(2)",
155  "this constructor is incompatible with the existence of an options input file");
156 
157  if (m_env.subDisplayFile() != NULL) {
158  *m_env.subDisplayFile() << "In EnvironmentOptions::constructor(2)"
159  << ": after setting values of options with prefix '" << m_prefix
160  << "', state of object is:"
161  << "\n" << *this
162  << std::endl;
163  }
164 }
int worldRank() const
Returns the process world rank.
Definition: Environment.C:235
std::string m_option_rngType
Type of the random number generator.
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:305
const BaseEnvironment & m_env
Environment.
std::string m_option_subDisplayAllowedSet
Sub-environments that will write to output.
std::string m_prefix
Options prefix.
std::string optionsInputFileName() const
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the...
Definition: Environment.C:341
po::options_description * m_optionsDesc
Environment options description.
std::string m_option_numSubEnvironments
My number of sub-environments.
std::string m_option_checkingLevel
Checking level.
std::string m_option_platformName
Platform name.
std::string m_option_identifyingString
Identifying string.
std::string m_option_subDisplayFileName
My output filename for sub-screen writing.
std::string m_option_displayVerbosity
Verbosity.
std::string m_option_subDisplayAllowInter0
Allows (or not) all inter0 nodes to write to output file.
std::string m_option_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
std::string m_option_seed
Seed of the random number generator.
std::string m_option_syncVerbosity
Synchronized verbosity.
#define UQ_FATAL_TEST_MACRO(test, givenRank, where, what)
Definition: Defines.h:223
EnvOptionsValues m_ov
Instance of EnvOptionsValues, a class with default values for QUESO environment.
QUESO::EnvironmentOptions::~EnvironmentOptions ( )

Destructor.

Definition at line 166 of file EnvironmentOptions.C.

References m_optionsDesc.

167 {
168  if (m_optionsDesc) delete m_optionsDesc;
169 }
po::options_description * m_optionsDesc
Environment options description.

Member Function Documentation

void QUESO::EnvironmentOptions::defineMyOptions ( po::options_description &  optionsDesc) const
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().

223 {
224 #ifdef QUESO_MEMORY_DEBUGGING
225  std::cout << "In EnvOptions::defineMyOptions(), before add_options()" << std::endl;
226 #endif
227  optionsDesc.add_options()
228  (m_option_help.c_str(), "produce help message for environment" )
229  (m_option_numSubEnvironments.c_str(), po::value<unsigned int>()->default_value(UQ_ENV_NUM_SUB_ENVIRONMENTS_ODV), "number of subEnvironments" )
230  (m_option_subDisplayFileName.c_str(), po::value<std::string >()->default_value(UQ_ENV_SUB_DISPLAY_FILE_NAME_ODV), "output filename for subscreen writing" )
231  (m_option_subDisplayAllowAll.c_str(), po::value<bool >()->default_value(UQ_ENV_SUB_DISPLAY_ALLOW_ALL_ODV), "Allow all processors to write to output file" )
232  (m_option_subDisplayAllowInter0.c_str(), po::value<bool >()->default_value(UQ_ENV_SUB_DISPLAY_ALLOW_INTER0_ODV), "Allow all inter0 nodes to write to output file")
233  (m_option_subDisplayAllowedSet.c_str(), po::value<std::string >()->default_value(UQ_ENV_SUB_DISPLAY_ALLOWED_SET_ODV), "subEnvs that will write to output file" )
234  (m_option_displayVerbosity.c_str(), po::value<unsigned int>()->default_value(UQ_ENV_DISPLAY_VERBOSITY_ODV), "set verbosity" )
235  (m_option_syncVerbosity.c_str(), po::value<unsigned int>()->default_value(UQ_ENV_SYNC_VERBOSITY_ODV), "set sync verbosity" )
236  (m_option_checkingLevel.c_str(), po::value<unsigned int>()->default_value(UQ_ENV_CHECKING_LEVEL_ODV), "set checking level" )
237  (m_option_rngType.c_str(), po::value<std::string >()->default_value(UQ_ENV_RNG_TYPE_ODV), "set rngType" )
238  (m_option_seed.c_str(), po::value<int >()->default_value(UQ_ENV_SEED_ODV), "set seed" )
239  (m_option_platformName.c_str(), po::value<std::string >()->default_value(UQ_ENV_PLATFORM_NAME_ODV), "platform name" )
240  (m_option_identifyingString.c_str(), po::value<std::string >()->default_value(UQ_ENV_IDENTIFYING_STRING_ODV), "identifying string" )
241  //(m_option_numDebugParams.c_str(), po::value<unsigned int>()->default_value(UQ_ENV_NUM_DEBUG_PARAMS_ODV), "set number of debug parameters" )
242  ;
243 #ifdef QUESO_MEMORY_DEBUGGING
244  std::cout << "In EnvOptions::defineMyOptions(), after add_options()" << std::endl;
245 #endif
246 
247  return;
248 }
#define UQ_ENV_CHECKING_LEVEL_ODV
#define UQ_ENV_SUB_DISPLAY_ALLOW_ALL_ODV
#define UQ_ENV_PLATFORM_NAME_ODV
#define UQ_ENV_IDENTIFYING_STRING_ODV
std::string m_option_rngType
Type of the random number generator.
#define UQ_ENV_NUM_SUB_ENVIRONMENTS_ODV
std::string m_option_subDisplayAllowedSet
Sub-environments that will write to output.
std::string m_option_numSubEnvironments
My number of sub-environments.
std::string m_option_checkingLevel
Checking level.
std::string m_option_platformName
Platform name.
std::string m_option_identifyingString
Identifying string.
std::string m_option_subDisplayFileName
My output filename for sub-screen writing.
std::string m_option_displayVerbosity
Verbosity.
#define UQ_ENV_SUB_DISPLAY_ALLOWED_SET_ODV
std::string m_option_subDisplayAllowInter0
Allows (or not) all inter0 nodes to write to output file.
std::string m_option_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
#define UQ_ENV_RNG_TYPE_ODV
#define UQ_ENV_SYNC_VERBOSITY_ODV
std::string m_option_seed
Seed of the random number generator.
std::string m_option_syncVerbosity
Synchronized verbosity.
#define UQ_ENV_SUB_DISPLAY_ALLOW_INTER0_ODV
#define UQ_ENV_DISPLAY_VERBOSITY_ODV
#define UQ_ENV_SEED_ODV
#define UQ_ENV_SUB_DISPLAY_FILE_NAME_ODV
void QUESO::EnvironmentOptions::getMyOptionValues ( po::options_description &  optionsDesc)
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().

252 {
253 #ifdef QUESO_MEMORY_DEBUGGING
254  std::cout << "Entering EnvOptions::getMyOptionsValues()" << std::endl;
255 #endif
256  if (m_env.allOptionsMap().count(m_option_help.c_str())) {
257  // 'm_subDisplayOutputFile' is still not available at this moment. Use 'std::cout'
258  if (m_env.fullRank() == 0) std::cout << optionsDesc
259  << std::endl;
260  }
261 
262  if (m_env.allOptionsMap().count(m_option_numSubEnvironments.c_str())) {
264  }
266  std::cerr << "In BaseEnvironment::getMyOptionValues()"
267  << ": m_env.fullComm().NumProc() = " << m_env.fullComm().NumProc()
268  << ", m_numSubEnvironments = " << m_ov.m_numSubEnvironments
269  << std::endl;
270  }
272  m_env.worldRank(),
273  "BaseEnvironment::getMyOptionValues()",
274  "total number of processors in environment must be multiple of the specified number of subEnvironments");
275 
276  if (m_env.allOptionsMap().count(m_option_subDisplayFileName.c_str())) {
278  }
279 
280  if (m_env.allOptionsMap().count(m_option_subDisplayAllowAll.c_str())) {
282  }
283 
284  if (m_env.allOptionsMap().count(m_option_subDisplayAllowInter0.c_str())) {
286  }
287 
290  // The line below is commented because 'm_subId' is not set at this point yet
291  //m_subDisplayAllowedSet.insert((unsigned int) m_subId);
292  }
293  else if (m_ov.m_subDisplayAllowInter0) {
295  }
296  else if (m_env.allOptionsMap().count(m_option_subDisplayAllowedSet.c_str())) {
298  std::vector<double> tmpAllow(0,0.);
299  std::string inputString = m_env.allOptionsMap()[m_option_subDisplayAllowedSet].as<std::string>();
300  MiscReadDoublesFromString(inputString,tmpAllow);
301  //if (m_subDisplayOutputFile) {
302  // *m_subDisplayOutputFile << "In EnvironmentOptions::getMyOptionValues(): allow = ";
303  // for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
304  // *m_subDisplayOutputFile << " " << tmpAllow[i];
305  // }
306  // *m_subDisplayOutputFile << std::endl;
307  //}
308 
309  if (tmpAllow.size() > 0) {
310  for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
311  m_ov.m_subDisplayAllowedSet.insert((unsigned int) tmpAllow[i]);
312  }
313  }
314  }
315 
316  if (m_env.allOptionsMap().count(m_option_displayVerbosity.c_str())) {
318  }
319 
320  if (m_env.allOptionsMap().count(m_option_syncVerbosity.c_str())) {
322  }
323 
324  if (m_env.allOptionsMap().count(m_option_checkingLevel.c_str())) {
326  }
327 
328  if (m_env.allOptionsMap().count(m_option_rngType.c_str())) {
329  m_ov.m_rngType = m_env.allOptionsMap()[m_option_rngType].as<std::string>();
330  }
331 
332  if (m_env.allOptionsMap().count(m_option_seed.c_str())) {
334  }
335 
336  if (m_env.allOptionsMap().count(m_option_platformName.c_str())) {
338  }
339 
340  if (m_env.allOptionsMap().count(m_option_identifyingString.c_str())) {
342  }
343 
344  //if (m_env.allOptionsMap().count(m_option_numDebugParams.c_str())) {
345  // m_numDebugParams = m_env.allOptionsMap()[m_option_numDebugParams].as<unsigned int>();
346  //}
347 
348 #ifdef QUESO_MEMORY_DEBUGGING
349  std::cout << "Leaving EnvOptions::getMyOptionsValues()" << std::endl;
350 #endif
351 
352  return;
353 }
std::string m_platformName
Platform name.
Definition: Defines.h:160
int worldRank() const
Returns the process world rank.
Definition: Environment.C:235
std::string m_option_rngType
Type of the random number generator.
int NumProc() const
Returns total number of processes.
Definition: MpiComm.C:121
const MpiComm & fullComm() const
Access function for MpiComm full communicator.
Definition: Environment.C:247
po::variables_map & allOptionsMap() const
Definition: Environment.C:368
const BaseEnvironment & m_env
Environment.
std::string m_option_subDisplayAllowedSet
Sub-environments that will write to output.
bool m_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
Definition: Defines.h:134
bool m_subDisplayAllowInter0
Allows (or not) all inter0 nodes to write to output file.
Definition: Defines.h:137
void MiscReadDoublesFromString(const std::string &inputString, std::vector< double > &outputDoubles)
Definition: Miscellaneous.C:39
unsigned int m_numSubEnvironments
Number of sub-environments.
Definition: Defines.h:128
std::string m_option_numSubEnvironments
My number of sub-environments.
std::string m_option_checkingLevel
Checking level.
int m_seed
Seed of the random number generator.
Definition: Defines.h:157
std::string m_option_platformName
Platform name.
std::string m_option_identifyingString
Identifying string.
unsigned int m_syncVerbosity
Synchronized verbosity.
Definition: Defines.h:146
std::string m_option_subDisplayFileName
My output filename for sub-screen writing.
std::string m_option_displayVerbosity
Verbosity.
int fullRank() const
Returns the process full rank.
Definition: Environment.C:241
std::string m_option_subDisplayAllowInter0
Allows (or not) all inter0 nodes to write to output file.
std::string m_option_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
std::set< unsigned int > m_subDisplayAllowedSet
Sub-environments that will write to output.
Definition: Defines.h:140
std::string m_option_seed
Seed of the random number generator.
unsigned int m_checkingLevel
Checking level.
Definition: Defines.h:149
std::string m_option_syncVerbosity
Synchronized verbosity.
#define UQ_FATAL_TEST_MACRO(test, givenRank, where, what)
Definition: Defines.h:223
std::string m_rngType
Type of the random number generator.
Definition: Defines.h:152
unsigned int m_displayVerbosity
Verbosity.
Definition: Defines.h:143
std::string m_subDisplayFileName
Output filename for sub-screen writing.
Definition: Defines.h:131
std::string m_identifyingString
Identifying string.
Definition: Defines.h:163
EnvOptionsValues m_ov
Instance of EnvOptionsValues, a class with default values for QUESO environment.
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<<().

199 {
203  //<< "\n" << m_option_subDisplayAllowInter0 << " = " << m_ov.m_subDisplayAllowInter0
204  << "\n" << m_option_subDisplayAllowedSet << " = ";
205  for (std::set<unsigned int>::iterator setIt = m_ov.m_subDisplayAllowedSet.begin(); setIt != m_ov.m_subDisplayAllowedSet.end(); ++setIt) {
206  os << *setIt << " ";
207  }
208  os << "\n" << m_option_displayVerbosity << " = " << m_ov.m_displayVerbosity
209  << "\n" << m_option_syncVerbosity << " = " << m_ov.m_syncVerbosity
210  << "\n" << m_option_checkingLevel << " = " << m_ov.m_checkingLevel
211  << "\n" << m_option_rngType << " = " << m_ov.m_rngType
212  << "\n" << m_option_seed << " = " << m_ov.m_seed
213  << "\n" << m_option_platformName << " = " << m_ov.m_platformName
215  //<< "\n" << m_option_numDebugParams << " = " << m_ov.m_numDebugParams
216  << std::endl;
217  return;
218 }
std::string m_platformName
Platform name.
Definition: Defines.h:160
std::string m_option_rngType
Type of the random number generator.
std::string m_option_subDisplayAllowedSet
Sub-environments that will write to output.
bool m_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
Definition: Defines.h:134
unsigned int m_numSubEnvironments
Number of sub-environments.
Definition: Defines.h:128
std::string m_option_numSubEnvironments
My number of sub-environments.
std::string m_option_checkingLevel
Checking level.
int m_seed
Seed of the random number generator.
Definition: Defines.h:157
std::string m_option_platformName
Platform name.
std::string m_option_identifyingString
Identifying string.
unsigned int m_syncVerbosity
Synchronized verbosity.
Definition: Defines.h:146
std::string m_option_subDisplayFileName
My output filename for sub-screen writing.
std::string m_option_displayVerbosity
Verbosity.
std::string m_option_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
std::set< unsigned int > m_subDisplayAllowedSet
Sub-environments that will write to output.
Definition: Defines.h:140
std::string m_option_seed
Seed of the random number generator.
unsigned int m_checkingLevel
Checking level.
Definition: Defines.h:149
std::string m_option_syncVerbosity
Synchronized verbosity.
std::string m_rngType
Type of the random number generator.
Definition: Defines.h:152
unsigned int m_displayVerbosity
Verbosity.
Definition: Defines.h:143
std::string m_subDisplayFileName
Output filename for sub-screen writing.
Definition: Defines.h:131
std::string m_identifyingString
Identifying string.
Definition: Defines.h:163
EnvOptionsValues m_ov
Instance of EnvOptionsValues, a class with default values for QUESO environment.
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().

174 {
176  m_env.worldRank(),
177  "EnvironmentOptions::scanOptionsValues()",
178  "m_optionsDesc variable is NULL");
182 
183  // 'm_subDisplayOutputFile' is still not available at this moment. Use 'std::cout'
184  //if (m_env.subScreenFile() != NULL) {
185  // *m_env.subScreenFile()
186  if ((m_env.fullRank() == 0) && (m_env.displayVerbosity() >= 3)) {
187  std::cout << "In EnvironmentOptions::scanOptionsValues()"
188  << ": after reading values of options with prefix '" << m_prefix
189  << "', state of object is:"
190  << "\n" << *this
191  << std::endl;
192  }
193 
194  return;
195 }
int worldRank() const
Returns the process world rank.
Definition: Environment.C:235
void defineMyOptions(po::options_description &optionsDesc) const
Define my environment options as the default options.
const BaseEnvironment & m_env
Environment.
std::string m_prefix
Options prefix.
po::options_description * m_optionsDesc
Environment options description.
int fullRank() const
Returns the process full rank.
Definition: Environment.C:241
void getMyOptionValues(po::options_description &optionsDesc)
Gets the option values of the environment.
unsigned int displayVerbosity() const
Definition: Environment.C:436
#define UQ_FATAL_TEST_MACRO(test, givenRank, where, what)
Definition: Defines.h:223
void scanInputFileForMyOptions(const po::options_description &optionsDesc) const
This method scans the input file provided by the user to QUESO.
Definition: Environment.C:378

Member Data Documentation

const BaseEnvironment& QUESO::EnvironmentOptions::m_env
private

Environment.

Definition at line 98 of file EnvironmentOptions.h.

Referenced by EnvironmentOptions(), getMyOptionValues(), and scanOptionsValues().

std::string QUESO::EnvironmentOptions::m_option_checkingLevel
private

Checking level.

Definition at line 133 of file EnvironmentOptions.h.

Referenced by defineMyOptions(), getMyOptionValues(), and print().

std::string QUESO::EnvironmentOptions::m_option_displayVerbosity
private

Verbosity.

Definition at line 127 of file EnvironmentOptions.h.

Referenced by defineMyOptions(), getMyOptionValues(), and print().

std::string QUESO::EnvironmentOptions::m_option_help
private

Definition at line 109 of file EnvironmentOptions.h.

Referenced by defineMyOptions(), and getMyOptionValues().

std::string QUESO::EnvironmentOptions::m_option_identifyingString
private

Identifying string.

Definition at line 147 of file EnvironmentOptions.h.

Referenced by defineMyOptions(), getMyOptionValues(), and print().

std::string QUESO::EnvironmentOptions::m_option_numSubEnvironments
private

My number of sub-environments.

Definition at line 112 of file EnvironmentOptions.h.

Referenced by defineMyOptions(), getMyOptionValues(), and print().

std::string QUESO::EnvironmentOptions::m_option_platformName
private

Platform name.

Definition at line 144 of file EnvironmentOptions.h.

Referenced by defineMyOptions(), getMyOptionValues(), and print().

std::string QUESO::EnvironmentOptions::m_option_rngType
private

Type of the random number generator.

Definition at line 136 of file EnvironmentOptions.h.

Referenced by defineMyOptions(), getMyOptionValues(), and print().

std::string QUESO::EnvironmentOptions::m_option_seed
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().

std::string QUESO::EnvironmentOptions::m_option_subDisplayAllowAll
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().

std::string QUESO::EnvironmentOptions::m_option_subDisplayAllowedSet
private

Sub-environments that will write to output.

Definition at line 124 of file EnvironmentOptions.h.

Referenced by defineMyOptions(), getMyOptionValues(), and print().

std::string QUESO::EnvironmentOptions::m_option_subDisplayAllowInter0
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().

std::string QUESO::EnvironmentOptions::m_option_subDisplayFileName
private

My output filename for sub-screen writing.

Definition at line 115 of file EnvironmentOptions.h.

Referenced by defineMyOptions(), getMyOptionValues(), and print().

std::string QUESO::EnvironmentOptions::m_option_syncVerbosity
private

Synchronized verbosity.

Definition at line 130 of file EnvironmentOptions.h.

Referenced by defineMyOptions(), getMyOptionValues(), and print().

po::options_description* QUESO::EnvironmentOptions::m_optionsDesc
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
std::string QUESO::EnvironmentOptions::m_prefix
private

Options prefix.

Definition at line 101 of file EnvironmentOptions.h.

Referenced by EnvironmentOptions(), and scanOptionsValues().


The documentation for this class was generated from the following files:

Generated on Thu Apr 23 2015 19:26:16 for queso-0.51.1 by  doxygen 1.8.5