queso-0.53.0
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 (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 BaseEnvironmentm_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...
 

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 225 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 232 of file EnvironmentOptions.C.

References m_env, QUESO::BaseEnvironment::optionsInputFileName(), queso_deprecated, and queso_require_not_equal_to_msg.

235  :
236  m_ov (),
237  m_env (env),
238  m_prefix ((std::string)(prefix) + "env_"),
239  m_optionsDesc (new boost::program_options::options_description("Environment options")),
240  m_option_help (m_prefix + "help" ),
241  m_option_numSubEnvironments (m_prefix + "numSubEnvironments" ),
242  m_option_subDisplayFileName (m_prefix + "subDisplayFileName" ),
243  m_option_subDisplayAllowAll (m_prefix + "subDisplayAllowAll" ),
244  m_option_subDisplayAllowInter0(m_prefix + "subDisplayAllowInter0"),
245  m_option_subDisplayAllowedSet (m_prefix + "subDisplayAllowedSet" ),
246  m_option_displayVerbosity (m_prefix + "displayVerbosity" ),
247  m_option_syncVerbosity (m_prefix + "syncVerbosity" ),
248  m_option_checkingLevel (m_prefix + "checkingLevel" ),
249  m_option_rngType (m_prefix + "rngType" ),
250  m_option_seed (m_prefix + "seed" ),
251  m_option_platformName (m_prefix + "platformName" ),
252  m_option_identifyingString (m_prefix + "identifyingString" )
253 {
255  queso_require_not_equal_to_msg(m_env.optionsInputFileName(), "", "this constructor is incompatible with the abscense of an options input file");
256 }
boost::program_options::options_description * m_optionsDesc
Environment options description.
std::string m_option_subDisplayFileName
My output filename for sub-screen writing.
#define queso_require_not_equal_to_msg(expr1, expr2, msg)
Definition: asserts.h:86
std::string m_option_identifyingString
Identifying string.
std::string m_option_subDisplayAllowedSet
Sub-environments that will write to output.
std::string m_option_rngType
Type of the random number generator.
std::string optionsInputFileName() const
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the...
Definition: Environment.C:307
std::string m_option_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
std::string m_option_subDisplayAllowInter0
Allows (or not) all inter0 nodes to write to output file.
EnvOptionsValues m_ov
Instance of EnvOptionsValues, a class with default values for QUESO environment.
std::string m_option_syncVerbosity
Synchronized verbosity.
std::string m_option_numSubEnvironments
My number of sub-environments.
std::string m_option_checkingLevel
Checking level.
#define queso_deprecated()
Definition: Defines.h:120
std::string m_prefix
Options prefix.
std::string m_option_platformName
Platform name.
std::string m_option_seed
Seed of the random number generator.
const BaseEnvironment & m_env
Environment.
std::string m_option_displayVerbosity
Verbosity.
QUESO::EnvironmentOptions::EnvironmentOptions ( const BaseEnvironment env,
const char *  prefix,
const EnvOptionsValues alternativeOptionsValues 
)

Constructor with alternative options values.

Definition at line 258 of file EnvironmentOptions.C.

References m_env, m_prefix, QUESO::BaseEnvironment::optionsInputFileName(), queso_deprecated, queso_require_equal_to_msg, and QUESO::BaseEnvironment::subDisplayFile().

262  :
263  m_ov (alternativeOptionsValues),
264  m_env (env),
265  m_prefix ((std::string)(prefix) + "env_"),
266  m_optionsDesc (NULL),
267  m_option_help (m_prefix + "help" ),
268  m_option_numSubEnvironments (m_prefix + "numSubEnvironments" ),
269  m_option_subDisplayFileName (m_prefix + "subDisplayFileName" ),
270  m_option_subDisplayAllowAll (m_prefix + "subDisplayAllowAll" ),
271  m_option_subDisplayAllowInter0(m_prefix + "subDisplayAllowInter0"),
272  m_option_subDisplayAllowedSet (m_prefix + "subDisplayAllowedSet" ),
273  m_option_displayVerbosity (m_prefix + "displayVerbosity" ),
274  m_option_syncVerbosity (m_prefix + "syncVerbosity" ),
275  m_option_checkingLevel (m_prefix + "checkingLevel" ),
276  m_option_rngType (m_prefix + "rngType" ),
277  m_option_seed (m_prefix + "seed" ),
278  m_option_platformName (m_prefix + "platformName" ),
279  m_option_identifyingString (m_prefix + "identifyingString" )
280 {
282  queso_require_equal_to_msg(m_env.optionsInputFileName(), "", "this constructor is incompatible with the existence of an options input file");
283 
284  if (m_env.subDisplayFile() != NULL) {
285  *m_env.subDisplayFile() << "In EnvironmentOptions::constructor(2)"
286  << ": after setting values of options with prefix '" << m_prefix
287  << "', state of object is:"
288  << "\n" << *this
289  << std::endl;
290  }
291 }
boost::program_options::options_description * m_optionsDesc
Environment options description.
std::string m_option_subDisplayFileName
My output filename for sub-screen writing.
std::string m_option_identifyingString
Identifying string.
std::string m_option_subDisplayAllowedSet
Sub-environments that will write to output.
#define queso_require_equal_to_msg(expr1, expr2, msg)
Definition: asserts.h:85
std::string m_option_rngType
Type of the random number generator.
std::string optionsInputFileName() const
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the...
Definition: Environment.C:307
std::string m_option_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:274
std::string m_option_subDisplayAllowInter0
Allows (or not) all inter0 nodes to write to output file.
EnvOptionsValues m_ov
Instance of EnvOptionsValues, a class with default values for QUESO environment.
std::string m_option_syncVerbosity
Synchronized verbosity.
std::string m_option_numSubEnvironments
My number of sub-environments.
std::string m_option_checkingLevel
Checking level.
#define queso_deprecated()
Definition: Defines.h:120
std::string m_prefix
Options prefix.
std::string m_option_platformName
Platform name.
std::string m_option_seed
Seed of the random number generator.
const BaseEnvironment & m_env
Environment.
std::string m_option_displayVerbosity
Verbosity.
QUESO::EnvironmentOptions::~EnvironmentOptions ( )

Destructor.

Definition at line 293 of file EnvironmentOptions.C.

References m_optionsDesc, and queso_deprecated.

294 {
296 
297  if (m_optionsDesc) delete m_optionsDesc;
298 }
boost::program_options::options_description * m_optionsDesc
Environment options description.
#define queso_deprecated()
Definition: Defines.h:120

Member Function Documentation

void QUESO::EnvironmentOptions::defineMyOptions ( boost::program_options::options_description &  optionsDesc) const
private

Define my environment options as the default options.

Definition at line 352 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().

353 {
355 
356 #ifdef QUESO_MEMORY_DEBUGGING
357  std::cout << "In EnvOptions::defineMyOptions(), before add_options()" << std::endl;
358 #endif
359  optionsDesc.add_options()
360  (m_option_help.c_str(), "produce help message for environment" )
361  (m_option_numSubEnvironments.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_ENV_NUM_SUB_ENVIRONMENTS_ODV), "number of subEnvironments" )
362  (m_option_subDisplayFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_ENV_SUB_DISPLAY_FILE_NAME_ODV), "output filename for subscreen writing" )
363  (m_option_subDisplayAllowAll.c_str(), boost::program_options::value<bool >()->default_value(UQ_ENV_SUB_DISPLAY_ALLOW_ALL_ODV), "Allow all processors to write to output file" )
364  (m_option_subDisplayAllowInter0.c_str(), boost::program_options::value<bool >()->default_value(UQ_ENV_SUB_DISPLAY_ALLOW_INTER0_ODV), "Allow all inter0 nodes to write to output file")
365  (m_option_subDisplayAllowedSet.c_str(), boost::program_options::value<std::string >()->default_value(UQ_ENV_SUB_DISPLAY_ALLOWED_SET_ODV), "subEnvs that will write to output file" )
366  (m_option_displayVerbosity.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_ENV_DISPLAY_VERBOSITY_ODV), "set verbosity" )
367  (m_option_syncVerbosity.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_ENV_SYNC_VERBOSITY_ODV), "set sync verbosity" )
368  (m_option_checkingLevel.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_ENV_CHECKING_LEVEL_ODV), "set checking level" )
369  (m_option_rngType.c_str(), boost::program_options::value<std::string >()->default_value(UQ_ENV_RNG_TYPE_ODV), "set rngType" )
370  (m_option_seed.c_str(), boost::program_options::value<int >()->default_value(UQ_ENV_SEED_ODV), "set seed" )
371  (m_option_platformName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_ENV_PLATFORM_NAME_ODV), "platform name" )
372  (m_option_identifyingString.c_str(), boost::program_options::value<std::string >()->default_value(UQ_ENV_IDENTIFYING_STRING_ODV), "identifying string" )
373  //(m_option_numDebugParams.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_ENV_NUM_DEBUG_PARAMS_ODV), "set number of debug parameters" )
374  ;
375 #ifdef QUESO_MEMORY_DEBUGGING
376  std::cout << "In EnvOptions::defineMyOptions(), after add_options()" << std::endl;
377 #endif
378 
379  return;
380 }
#define UQ_ENV_SUB_DISPLAY_FILE_NAME_ODV
#define UQ_ENV_NUM_SUB_ENVIRONMENTS_ODV
#define UQ_ENV_SUB_DISPLAY_ALLOW_ALL_ODV
#define UQ_ENV_RNG_TYPE_ODV
std::string m_option_subDisplayFileName
My output filename for sub-screen writing.
#define UQ_ENV_CHECKING_LEVEL_ODV
#define UQ_ENV_PLATFORM_NAME_ODV
std::string m_option_identifyingString
Identifying string.
std::string m_option_subDisplayAllowedSet
Sub-environments that will write to output.
#define UQ_ENV_SUB_DISPLAY_ALLOWED_SET_ODV
#define UQ_ENV_SUB_DISPLAY_ALLOW_INTER0_ODV
std::string m_option_rngType
Type of the random number generator.
std::string m_option_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
#define UQ_ENV_DISPLAY_VERBOSITY_ODV
#define UQ_ENV_SYNC_VERBOSITY_ODV
std::string m_option_subDisplayAllowInter0
Allows (or not) all inter0 nodes to write to output file.
std::string m_option_syncVerbosity
Synchronized verbosity.
std::string m_option_numSubEnvironments
My number of sub-environments.
std::string m_option_checkingLevel
Checking level.
#define queso_deprecated()
Definition: Defines.h:120
std::string m_option_platformName
Platform name.
std::string m_option_seed
Seed of the random number generator.
#define UQ_ENV_IDENTIFYING_STRING_ODV
#define UQ_ENV_SEED_ODV
std::string m_option_displayVerbosity
Verbosity.
void QUESO::EnvironmentOptions::getMyOptionValues ( boost::program_options::options_description &  optionsDesc)
private

Gets the option values of the environment.

Definition at line 383 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().

384 {
386 
387 #ifdef QUESO_MEMORY_DEBUGGING
388  std::cout << "Entering EnvOptions::getMyOptionsValues()" << std::endl;
389 #endif
390  if (m_env.allOptionsMap().count(m_option_help.c_str())) {
391  // 'm_subDisplayOutputFile' is still not available at this moment. Use 'std::cout'
392  if (m_env.fullRank() == 0) std::cout << optionsDesc
393  << std::endl;
394  }
395 
396  if (m_env.allOptionsMap().count(m_option_numSubEnvironments.c_str())) {
398  }
400  std::cerr << "In BaseEnvironment::getMyOptionValues()"
401  << ": m_env.fullComm().NumProc() = " << m_env.fullComm().NumProc()
402  << ", m_numSubEnvironments = " << m_ov.m_numSubEnvironments
403  << std::endl;
404  }
405  queso_require_equal_to_msg((m_env.fullComm().NumProc()%m_ov.m_numSubEnvironments), 0, "total number of processors in environment must be multiple of the specified number of subEnvironments");
406 
407  if (m_env.allOptionsMap().count(m_option_subDisplayFileName.c_str())) {
409  }
410 
411  if (m_env.allOptionsMap().count(m_option_subDisplayAllowAll.c_str())) {
413  }
414 
415  if (m_env.allOptionsMap().count(m_option_subDisplayAllowInter0.c_str())) {
417  }
418 
421  // The line below is commented because 'm_subId' is not set at this point yet
422  //m_subDisplayAllowedSet.insert((unsigned int) m_subId);
423  }
424  else if (m_ov.m_subDisplayAllowInter0) {
426  }
427  else if (m_env.allOptionsMap().count(m_option_subDisplayAllowedSet.c_str())) {
429  std::vector<double> tmpAllow(0,0.);
430  std::string inputString = m_env.allOptionsMap()[m_option_subDisplayAllowedSet].as<std::string>();
431  MiscReadDoublesFromString(inputString,tmpAllow);
432  //if (m_subDisplayOutputFile) {
433  // *m_subDisplayOutputFile << "In EnvironmentOptions::getMyOptionValues(): allow = ";
434  // for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
435  // *m_subDisplayOutputFile << " " << tmpAllow[i];
436  // }
437  // *m_subDisplayOutputFile << std::endl;
438  //}
439 
440  if (tmpAllow.size() > 0) {
441  for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
442  m_ov.m_subDisplayAllowedSet.insert((unsigned int) tmpAllow[i]);
443  }
444  }
445  }
446 
447  if (m_env.allOptionsMap().count(m_option_displayVerbosity.c_str())) {
449  }
450 
451  if (m_env.allOptionsMap().count(m_option_syncVerbosity.c_str())) {
453  }
454 
455  if (m_env.allOptionsMap().count(m_option_checkingLevel.c_str())) {
457  }
458 
459  if (m_env.allOptionsMap().count(m_option_rngType.c_str())) {
460  m_ov.m_rngType = m_env.allOptionsMap()[m_option_rngType].as<std::string>();
461  }
462 
463  if (m_env.allOptionsMap().count(m_option_seed.c_str())) {
465  }
466 
467  if (m_env.allOptionsMap().count(m_option_platformName.c_str())) {
469  }
470 
471  if (m_env.allOptionsMap().count(m_option_identifyingString.c_str())) {
473  }
474 
475  //if (m_env.allOptionsMap().count(m_option_numDebugParams.c_str())) {
476  // m_numDebugParams = m_env.allOptionsMap()[m_option_numDebugParams].as<unsigned int>();
477  //}
478 
479 #ifdef QUESO_MEMORY_DEBUGGING
480  std::cout << "Leaving EnvOptions::getMyOptionsValues()" << std::endl;
481 #endif
482 
483  return;
484 }
int NumProc() const
Returns total number of processes.
Definition: MpiComm.C:103
std::string m_option_subDisplayFileName
My output filename for sub-screen writing.
int fullRank() const
Returns the process full rank.
Definition: Environment.C:222
unsigned int m_checkingLevel
Checking level.
int m_seed
Seed of the random number generator.
std::string m_option_identifyingString
Identifying string.
const MpiComm & fullComm() const
Access function for MpiComm full communicator.
Definition: Environment.C:228
unsigned int m_syncVerbosity
Synchronized verbosity.
unsigned int m_displayVerbosity
Verbosity.
boost::program_options::variables_map & allOptionsMap() const
Definition: Environment.C:336
std::string m_subDisplayFileName
Output filename for sub-screen writing.
std::string m_option_subDisplayAllowedSet
Sub-environments that will write to output.
#define queso_require_equal_to_msg(expr1, expr2, msg)
Definition: asserts.h:85
std::string m_option_rngType
Type of the random number generator.
std::string m_option_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
std::string m_option_subDisplayAllowInter0
Allows (or not) all inter0 nodes to write to output file.
bool m_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
EnvOptionsValues m_ov
Instance of EnvOptionsValues, a class with default values for QUESO environment.
std::set< unsigned int > m_subDisplayAllowedSet
Sub-environments that will write to output.
std::string m_option_syncVerbosity
Synchronized verbosity.
std::string m_option_numSubEnvironments
My number of sub-environments.
std::string m_option_checkingLevel
Checking level.
void MiscReadDoublesFromString(const std::string &inputString, std::vector< double > &outputDoubles)
Definition: Miscellaneous.C:40
#define queso_deprecated()
Definition: Defines.h:120
std::string m_rngType
Type of the random number generator.
std::string m_platformName
Platform name.
std::string m_identifyingString
Identifying string.
std::string m_option_platformName
Platform name.
std::string m_option_seed
Seed of the random number generator.
bool m_subDisplayAllowInter0
Allows (or not) all inter0 nodes to write to output file.
const BaseEnvironment & m_env
Environment.
std::string m_option_displayVerbosity
Verbosity.
void QUESO::EnvironmentOptions::print ( std::ostream &  os) const

Print values of the options chosen.

Definition at line 326 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<<().

327 {
329 
333  //<< "\n" << m_option_subDisplayAllowInter0 << " = " << m_ov.m_subDisplayAllowInter0
334  << "\n" << m_option_subDisplayAllowedSet << " = ";
335  for (std::set<unsigned int>::iterator setIt = m_ov.m_subDisplayAllowedSet.begin(); setIt != m_ov.m_subDisplayAllowedSet.end(); ++setIt) {
336  os << *setIt << " ";
337  }
338  os << "\n" << m_option_displayVerbosity << " = " << m_ov.m_displayVerbosity
339  << "\n" << m_option_syncVerbosity << " = " << m_ov.m_syncVerbosity
340  << "\n" << m_option_checkingLevel << " = " << m_ov.m_checkingLevel
341  << "\n" << m_option_rngType << " = " << m_ov.m_rngType
342  << "\n" << m_option_seed << " = " << m_ov.m_seed
343  << "\n" << m_option_platformName << " = " << m_ov.m_platformName
345  //<< "\n" << m_option_numDebugParams << " = " << m_ov.m_numDebugParams
346  << std::endl;
347  return;
348 }
std::string m_option_subDisplayFileName
My output filename for sub-screen writing.
unsigned int m_checkingLevel
Checking level.
int m_seed
Seed of the random number generator.
std::string m_option_identifyingString
Identifying string.
unsigned int m_syncVerbosity
Synchronized verbosity.
unsigned int m_displayVerbosity
Verbosity.
std::string m_subDisplayFileName
Output filename for sub-screen writing.
std::string m_option_subDisplayAllowedSet
Sub-environments that will write to output.
std::string m_option_rngType
Type of the random number generator.
std::string m_option_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
bool m_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
EnvOptionsValues m_ov
Instance of EnvOptionsValues, a class with default values for QUESO environment.
std::set< unsigned int > m_subDisplayAllowedSet
Sub-environments that will write to output.
std::string m_option_syncVerbosity
Synchronized verbosity.
std::string m_option_numSubEnvironments
My number of sub-environments.
std::string m_option_checkingLevel
Checking level.
#define queso_deprecated()
Definition: Defines.h:120
std::string m_rngType
Type of the random number generator.
std::string m_platformName
Platform name.
std::string m_identifyingString
Identifying string.
std::string m_option_platformName
Platform name.
std::string m_option_seed
Seed of the random number generator.
std::string m_option_displayVerbosity
Verbosity.
void QUESO::EnvironmentOptions::scanOptionsValues ( )

Scans option values from input file.

Definition at line 302 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().

303 {
305  queso_require_msg(m_optionsDesc, "m_optionsDesc variable is NULL");
306 
310 
311  // 'm_subDisplayOutputFile' is still not available at this moment. Use 'std::cout'
312  //if (m_env.subScreenFile() != NULL) {
313  // *m_env.subScreenFile()
314  if ((m_env.fullRank() == 0) && (m_env.displayVerbosity() >= 3)) {
315  std::cout << "In EnvironmentOptions::scanOptionsValues()"
316  << ": after reading values of options with prefix '" << m_prefix
317  << "', state of object is:"
318  << "\n" << *this
319  << std::endl;
320  }
321 
322  return;
323 }
unsigned int displayVerbosity() const
Definition: Environment.C:396
boost::program_options::options_description * m_optionsDesc
Environment options description.
void defineMyOptions(boost::program_options::options_description &optionsDesc) const
Define my environment options as the default options.
void scanInputFileForMyOptions(const boost::program_options::options_description &optionsDesc) const
This method scans the input file provided by the user to QUESO.
Definition: Environment.C:345
int fullRank() const
Returns the process full rank.
Definition: Environment.C:222
void getMyOptionValues(boost::program_options::options_description &optionsDesc)
Gets the option values of the environment.
#define queso_require_msg(asserted, msg)
Definition: asserts.h:69
#define queso_deprecated()
Definition: Defines.h:120
std::string m_prefix
Options prefix.
const BaseEnvironment & m_env
Environment.

Member Data Documentation

const BaseEnvironment& QUESO::EnvironmentOptions::m_env
private

Environment.

Definition at line 262 of file EnvironmentOptions.h.

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

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

Checking level.

Definition at line 297 of file EnvironmentOptions.h.

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

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

Verbosity.

Definition at line 291 of file EnvironmentOptions.h.

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

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

Definition at line 273 of file EnvironmentOptions.h.

Referenced by defineMyOptions(), and getMyOptionValues().

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

Identifying string.

Definition at line 311 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 276 of file EnvironmentOptions.h.

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

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

Platform name.

Definition at line 308 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 300 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 305 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 282 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 288 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 285 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 279 of file EnvironmentOptions.h.

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

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

Synchronized verbosity.

Definition at line 294 of file EnvironmentOptions.h.

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

boost::program_options::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 271 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 252 of file EnvironmentOptions.h.

Referenced by getMyOptionValues(), and print().

std::string QUESO::EnvironmentOptions::m_prefix
private

Options prefix.

Definition at line 265 of file EnvironmentOptions.h.

Referenced by EnvironmentOptions(), and scanOptionsValues().


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

Generated on Thu Jun 11 2015 13:52:34 for queso-0.53.0 by  doxygen 1.8.5