queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
QUESO::EnvironmentOptions Class Reference

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

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 236 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 270 of file EnvironmentOptions.C.

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

273  :
274  m_ov (),
275  m_env (env),
276  m_prefix ((std::string)(prefix) + "env_"),
277 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
278  m_optionsDesc (new boost::program_options::options_description("Environment options")),
279 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
280  m_option_help (m_prefix + "help" ),
281  m_option_numSubEnvironments (m_prefix + "numSubEnvironments" ),
282  m_option_subDisplayFileName (m_prefix + "subDisplayFileName" ),
283  m_option_subDisplayAllowAll (m_prefix + "subDisplayAllowAll" ),
284  m_option_subDisplayAllowInter0(m_prefix + "subDisplayAllowInter0"),
285  m_option_subDisplayAllowedSet (m_prefix + "subDisplayAllowedSet" ),
286  m_option_displayVerbosity (m_prefix + "displayVerbosity" ),
287  m_option_syncVerbosity (m_prefix + "syncVerbosity" ),
288  m_option_checkingLevel (m_prefix + "checkingLevel" ),
289  m_option_rngType (m_prefix + "rngType" ),
290  m_option_seed (m_prefix + "seed" ),
291  m_option_platformName (m_prefix + "platformName" ),
292  m_option_identifyingString (m_prefix + "identifyingString" )
293 {
294  queso_deprecated();
295  queso_require_not_equal_to_msg(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the abscense of an options input file"));
296 }
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.
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix queso_require_not_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the absence of an options input file"))
std::string optionsInputFileName() const
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the...
Definition: Environment.C:354
std::string m_option_identifyingString
Identifying string.
std::string m_option_subDisplayFileName
My output filename for sub-screen writing.
std::string m_prefix
Options prefix.
const BaseEnvironment & m_env
Environment.
std::string m_option_subDisplayAllowedSet
Sub-environments that will write to output.
std::string m_option_platformName
Platform name.
std::string m_option_rngType
Type of the random number generator.
std::string m_option_seed
Seed of the random number generator.
std::string m_option_subDisplayAllowInter0
Allows (or not) all inter0 nodes to write to output file.
ScopedPtr< boost::program_options::options_description >::Type m_optionsDesc
Environment options description.
std::string m_option_displayVerbosity
Verbosity.
std::string m_option_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
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().

302  :
303  m_ov (alternativeOptionsValues),
304  m_env (env),
305  m_prefix ((std::string)(prefix) + "env_"),
306 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
307  m_optionsDesc (),
308 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
309  m_option_help (m_prefix + "help" ),
310  m_option_numSubEnvironments (m_prefix + "numSubEnvironments" ),
311  m_option_subDisplayFileName (m_prefix + "subDisplayFileName" ),
312  m_option_subDisplayAllowAll (m_prefix + "subDisplayAllowAll" ),
313  m_option_subDisplayAllowInter0(m_prefix + "subDisplayAllowInter0"),
314  m_option_subDisplayAllowedSet (m_prefix + "subDisplayAllowedSet" ),
315  m_option_displayVerbosity (m_prefix + "displayVerbosity" ),
316  m_option_syncVerbosity (m_prefix + "syncVerbosity" ),
317  m_option_checkingLevel (m_prefix + "checkingLevel" ),
318  m_option_rngType (m_prefix + "rngType" ),
319  m_option_seed (m_prefix + "seed" ),
320  m_option_platformName (m_prefix + "platformName" ),
321  m_option_identifyingString (m_prefix + "identifyingString" )
322 {
323  queso_deprecated();
324  queso_require_equal_to_msg(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"));
325 
326  if (m_env.subDisplayFile() != NULL) {
327  *m_env.subDisplayFile() << "In EnvironmentOptions::constructor(2)"
328  << ": after setting values of options with prefix '" << m_prefix
329  << "', state of object is:"
330  << "\n" << *this
331  << std::endl;
332  }
333 }
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.
std::string optionsInputFileName() const
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the...
Definition: Environment.C:354
std::string m_option_identifyingString
Identifying string.
std::string m_option_subDisplayFileName
My output filename for sub-screen writing.
std::string m_prefix
Options prefix.
const BaseEnvironment & m_env
Environment.
std::string m_option_subDisplayAllowedSet
Sub-environments that will write to output.
std::string m_option_platformName
Platform name.
std::string m_option_rngType
Type of the random number generator.
std::string m_option_seed
Seed of the random number generator.
std::string m_option_subDisplayAllowInter0
Allows (or not) all inter0 nodes to write to output file.
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
ScopedPtr< boost::program_options::options_description >::Type m_optionsDesc
Environment options description.
std::string m_option_displayVerbosity
Verbosity.
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:320
QUESO::EnvironmentOptions::~EnvironmentOptions ( )

Destructor.

Definition at line 335 of file EnvironmentOptions.C.

336 {
337  queso_deprecated();
338 }

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

398 {
399  queso_deprecated();
400 
401 #ifdef QUESO_MEMORY_DEBUGGING
402  std::cout << "In EnvOptions::defineMyOptions(), before add_options()" << std::endl;
403 #endif
404  optionsDesc.add_options()
405  (m_option_help.c_str(), "produce help message for environment" )
406  (m_option_numSubEnvironments.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_ENV_NUM_SUB_ENVIRONMENTS_ODV), "number of subEnvironments" )
407  (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" )
408  (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" )
409  (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")
410  (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" )
411  (m_option_displayVerbosity.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_ENV_DISPLAY_VERBOSITY_ODV), "set verbosity" )
412  (m_option_syncVerbosity.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_ENV_SYNC_VERBOSITY_ODV), "set sync verbosity" )
413  (m_option_checkingLevel.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_ENV_CHECKING_LEVEL_ODV), "set checking level" )
414  (m_option_rngType.c_str(), boost::program_options::value<std::string >()->default_value(UQ_ENV_RNG_TYPE_ODV), "set rngType" )
415  (m_option_seed.c_str(), boost::program_options::value<int >()->default_value(UQ_ENV_SEED_ODV), "set seed" )
416  (m_option_platformName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_ENV_PLATFORM_NAME_ODV), "platform name" )
417  (m_option_identifyingString.c_str(), boost::program_options::value<std::string >()->default_value(UQ_ENV_IDENTIFYING_STRING_ODV), "identifying string" )
418  //(m_option_numDebugParams.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_ENV_NUM_DEBUG_PARAMS_ODV), "set number of debug parameters" )
419  ;
420 #ifdef QUESO_MEMORY_DEBUGGING
421  std::cout << "In EnvOptions::defineMyOptions(), after add_options()" << std::endl;
422 #endif
423 
424  return;
425 }
std::string m_option_syncVerbosity
Synchronized verbosity.
std::string m_option_numSubEnvironments
My number of sub-environments.
std::string m_option_checkingLevel
Checking level.
std::string m_option_identifyingString
Identifying string.
std::string m_option_subDisplayFileName
My output filename for sub-screen writing.
std::string m_option_subDisplayAllowedSet
Sub-environments that will write to output.
std::string m_option_platformName
Platform name.
std::string m_option_rngType
Type of the random number generator.
std::string m_option_seed
Seed of the random number generator.
std::string m_option_subDisplayAllowInter0
Allows (or not) all inter0 nodes to write to output file.
std::string m_option_displayVerbosity
Verbosity.
std::string m_option_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
void QUESO::EnvironmentOptions::getMyOptionValues ( boost::program_options::options_description &  optionsDesc)
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().

429 {
430  queso_deprecated();
431 
432 #ifdef QUESO_MEMORY_DEBUGGING
433  std::cout << "Entering EnvOptions::getMyOptionsValues()" << std::endl;
434 #endif
435  if (m_env.allOptionsMap().count(m_option_help.c_str())) {
436  // 'm_subDisplayOutputFile' is still not available at this moment. Use 'std::cout'
437  if (m_env.fullRank() == 0) std::cout << optionsDesc
438  << std::endl;
439  }
440 
441  if (m_env.allOptionsMap().count(m_option_numSubEnvironments.c_str())) {
443  }
445  std::cerr << "In BaseEnvironment::getMyOptionValues()"
446  << ": m_env.fullComm().NumProc() = " << m_env.fullComm().NumProc()
447  << ", m_numSubEnvironments = " << m_ov.m_numSubEnvironments
448  << std::endl;
449  }
450  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");
451 
452  if (m_env.allOptionsMap().count(m_option_subDisplayFileName.c_str())) {
454  }
455 
456  if (m_env.allOptionsMap().count(m_option_subDisplayAllowAll.c_str())) {
458  }
459 
460  if (m_env.allOptionsMap().count(m_option_subDisplayAllowInter0.c_str())) {
462  }
463 
466  // The line below is commented because 'm_subId' is not set at this point yet
467  //m_subDisplayAllowedSet.insert((unsigned int) m_subId);
468  }
469  else if (m_ov.m_subDisplayAllowInter0) {
471  }
472  else if (m_env.allOptionsMap().count(m_option_subDisplayAllowedSet.c_str())) {
474  std::vector<double> tmpAllow(0,0.);
475  std::string inputString = m_env.allOptionsMap()[m_option_subDisplayAllowedSet].as<std::string>();
476  MiscReadDoublesFromString(inputString,tmpAllow);
477  //if (m_subDisplayOutputFile) {
478  // *m_subDisplayOutputFile << "In EnvironmentOptions::getMyOptionValues(): allow = ";
479  // for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
480  // *m_subDisplayOutputFile << " " << tmpAllow[i];
481  // }
482  // *m_subDisplayOutputFile << std::endl;
483  //}
484 
485  if (tmpAllow.size() > 0) {
486  for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
487  m_ov.m_subDisplayAllowedSet.insert((unsigned int) tmpAllow[i]);
488  }
489  }
490  }
491 
492  if (m_env.allOptionsMap().count(m_option_displayVerbosity.c_str())) {
494  }
495 
496  if (m_env.allOptionsMap().count(m_option_syncVerbosity.c_str())) {
498  }
499 
500  if (m_env.allOptionsMap().count(m_option_checkingLevel.c_str())) {
502  }
503 
504  if (m_env.allOptionsMap().count(m_option_rngType.c_str())) {
505  m_ov.m_rngType = m_env.allOptionsMap()[m_option_rngType].as<std::string>();
506  }
507 
508  if (m_env.allOptionsMap().count(m_option_seed.c_str())) {
510  }
511 
512  if (m_env.allOptionsMap().count(m_option_platformName.c_str())) {
514  }
515 
516  if (m_env.allOptionsMap().count(m_option_identifyingString.c_str())) {
518  }
519 
520  //if (m_env.allOptionsMap().count(m_option_numDebugParams.c_str())) {
521  // m_numDebugParams = m_env.allOptionsMap()[m_option_numDebugParams].as<unsigned int>();
522  //}
523 
524 #ifdef QUESO_MEMORY_DEBUGGING
525  std::cout << "Leaving EnvOptions::getMyOptionsValues()" << std::endl;
526 #endif
527 
528  return;
529 }
bool m_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
bool m_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.
unsigned int m_checkingLevel
Checking level.
std::string m_option_syncVerbosity
Synchronized verbosity.
boost::program_options::variables_map & allOptionsMap() const
Definition: Environment.C:386
std::string m_option_numSubEnvironments
My number of sub-environments.
std::string m_option_checkingLevel
Checking level.
std::string m_option_identifyingString
Identifying string.
std::string m_option_subDisplayFileName
My output filename for sub-screen writing.
std::string m_platformName
Platform name.
const BaseEnvironment & m_env
Environment.
std::set< unsigned int > m_subDisplayAllowedSet
Sub-environments that will write to output.
std::string m_option_subDisplayAllowedSet
Sub-environments that will write to output.
int fullRank() const
Returns the rank of the MPI process in QUESO&#39;s full communicator.
Definition: Environment.C:268
std::string m_option_platformName
Platform name.
std::string m_option_rngType
Type of the random number generator.
std::string m_option_seed
Seed of the random number generator.
std::string m_option_subDisplayAllowInter0
Allows (or not) all inter0 nodes to write to output file.
void MiscReadDoublesFromString(const std::string &inputString, std::vector< double > &outputDoubles)
Definition: Miscellaneous.C:40
std::string m_rngType
Type of the random number generator.
std::string m_identifyingString
Identifying string.
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
unsigned int m_displayVerbosity
Verbosity.
int NumProc() const
Returns total number of processes.
Definition: MpiComm.C:133
std::string m_subDisplayFileName
Output filename for sub-screen writing.
int m_seed
Seed of the random number generator.
const MpiComm & fullComm() const
Access function for the communicator that was passed to QUESO&#39;s environment.
Definition: Environment.C:274
unsigned int m_syncVerbosity
Synchronized verbosity.
std::string m_option_displayVerbosity
Verbosity.
std::string m_option_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
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<<().

371 {
372  queso_deprecated();
373 
377  //<< "\n" << m_option_subDisplayAllowInter0 << " = " << m_ov.m_subDisplayAllowInter0
378  << "\n" << m_option_subDisplayAllowedSet << " = ";
379  for (std::set<unsigned int>::iterator setIt = m_ov.m_subDisplayAllowedSet.begin(); setIt != m_ov.m_subDisplayAllowedSet.end(); ++setIt) {
380  os << *setIt << " ";
381  }
382  os << "\n" << m_option_displayVerbosity << " = " << m_ov.m_displayVerbosity
383  << "\n" << m_option_syncVerbosity << " = " << m_ov.m_syncVerbosity
384  << "\n" << m_option_checkingLevel << " = " << m_ov.m_checkingLevel
385  << "\n" << m_option_rngType << " = " << m_ov.m_rngType
386  << "\n" << m_option_seed << " = " << m_ov.m_seed
387  << "\n" << m_option_platformName << " = " << m_ov.m_platformName
389  //<< "\n" << m_option_numDebugParams << " = " << m_ov.m_numDebugParams
390  << std::endl;
391  return;
392 }
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.
unsigned int m_checkingLevel
Checking level.
std::string m_option_syncVerbosity
Synchronized verbosity.
std::string m_option_numSubEnvironments
My number of sub-environments.
std::string m_option_checkingLevel
Checking level.
std::string m_option_identifyingString
Identifying string.
std::string m_option_subDisplayFileName
My output filename for sub-screen writing.
std::string m_platformName
Platform name.
std::set< unsigned int > m_subDisplayAllowedSet
Sub-environments that will write to output.
std::string m_option_subDisplayAllowedSet
Sub-environments that will write to output.
std::string m_option_platformName
Platform name.
std::string m_option_rngType
Type of the random number generator.
std::string m_option_seed
Seed of the random number generator.
std::string m_rngType
Type of the random number generator.
std::string m_identifyingString
Identifying string.
unsigned int m_displayVerbosity
Verbosity.
std::string m_subDisplayFileName
Output filename for sub-screen writing.
int m_seed
Seed of the random number generator.
unsigned int m_syncVerbosity
Synchronized verbosity.
std::string m_option_displayVerbosity
Verbosity.
std::string m_option_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
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().

343 {
344  queso_deprecated();
345 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
346  queso_require_msg(m_optionsDesc, "m_optionsDesc variable is NULL");
347 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
348 
349 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
353 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
354 
355  // 'm_subDisplayOutputFile' is still not available at this moment. Use 'std::cout'
356  //if (m_env.subScreenFile() != NULL) {
357  // *m_env.subScreenFile()
358  if ((m_env.fullRank() == 0) && (m_env.displayVerbosity() >= 3)) {
359  std::cout << "In EnvironmentOptions::scanOptionsValues()"
360  << ": after reading values of options with prefix '" << m_prefix
361  << "', state of object is:"
362  << "\n" << *this
363  << std::endl;
364  }
365 
366  return;
367 }
std::string m_prefix
Options prefix.
const BaseEnvironment & m_env
Environment.
int fullRank() const
Returns the rank of the MPI process in QUESO&#39;s full communicator.
Definition: Environment.C:268
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:397
ScopedPtr< boost::program_options::options_description >::Type m_optionsDesc
Environment options description.
void getMyOptionValues(boost::program_options::options_description &optionsDesc)
Gets the option values of the environment.
unsigned int displayVerbosity() const
Definition: Environment.C:450

Member Data Documentation

const BaseEnvironment& QUESO::EnvironmentOptions::m_env
private

Environment.

Definition at line 275 of file EnvironmentOptions.h.

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

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

Checking level.

Definition at line 312 of file EnvironmentOptions.h.

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

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

Verbosity.

Definition at line 306 of file EnvironmentOptions.h.

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

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

Definition at line 288 of file EnvironmentOptions.h.

Referenced by defineMyOptions(), and getMyOptionValues().

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

Identifying string.

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

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

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

Platform name.

Definition at line 323 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 315 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 320 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 297 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 303 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 300 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 294 of file EnvironmentOptions.h.

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

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

Synchronized verbosity.

Definition at line 309 of file EnvironmentOptions.h.

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

ScopedPtr<boost::program_options::options_description>::Type 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 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().

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

Options prefix.

Definition at line 278 of file EnvironmentOptions.h.

Referenced by EnvironmentOptions(), and scanOptionsValues().


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

Generated on Tue Jun 5 2018 19:49:06 for queso-0.57.1 by  doxygen 1.8.5