queso-0.56.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 233 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 271 of file EnvironmentOptions.C.

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

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

Constructor with alternative options values.

Definition at line 299 of file EnvironmentOptions.C.

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

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

Destructor.

Definition at line 336 of file EnvironmentOptions.C.

References m_optionsDesc, and queso_deprecated.

337 {
339 
340 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
341  if (m_optionsDesc) delete m_optionsDesc;
342 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
343 }
boost::program_options::options_description * m_optionsDesc
Environment options description.
#define queso_deprecated()
Definition: Defines.h:134

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

403 {
405 
406 #ifdef QUESO_MEMORY_DEBUGGING
407  std::cout << "In EnvOptions::defineMyOptions(), before add_options()" << std::endl;
408 #endif
409  optionsDesc.add_options()
410  (m_option_help.c_str(), "produce help message for environment" )
411  (m_option_numSubEnvironments.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_ENV_NUM_SUB_ENVIRONMENTS_ODV), "number of subEnvironments" )
412  (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" )
413  (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" )
414  (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")
415  (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" )
416  (m_option_displayVerbosity.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_ENV_DISPLAY_VERBOSITY_ODV), "set verbosity" )
417  (m_option_syncVerbosity.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_ENV_SYNC_VERBOSITY_ODV), "set sync verbosity" )
418  (m_option_checkingLevel.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_ENV_CHECKING_LEVEL_ODV), "set checking level" )
419  (m_option_rngType.c_str(), boost::program_options::value<std::string >()->default_value(UQ_ENV_RNG_TYPE_ODV), "set rngType" )
420  (m_option_seed.c_str(), boost::program_options::value<int >()->default_value(UQ_ENV_SEED_ODV), "set seed" )
421  (m_option_platformName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_ENV_PLATFORM_NAME_ODV), "platform name" )
422  (m_option_identifyingString.c_str(), boost::program_options::value<std::string >()->default_value(UQ_ENV_IDENTIFYING_STRING_ODV), "identifying string" )
423  //(m_option_numDebugParams.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_ENV_NUM_DEBUG_PARAMS_ODV), "set number of debug parameters" )
424  ;
425 #ifdef QUESO_MEMORY_DEBUGGING
426  std::cout << "In EnvOptions::defineMyOptions(), after add_options()" << std::endl;
427 #endif
428 
429  return;
430 }
#define UQ_ENV_SEED_ODV
#define UQ_ENV_IDENTIFYING_STRING_ODV
#define UQ_ENV_CHECKING_LEVEL_ODV
std::string m_option_subDisplayAllowInter0
Allows (or not) all inter0 nodes to write to output file.
#define UQ_ENV_RNG_TYPE_ODV
#define UQ_ENV_SUB_DISPLAY_ALLOW_INTER0_ODV
std::string m_option_numSubEnvironments
My number of sub-environments.
std::string m_option_checkingLevel
Checking level.
#define UQ_ENV_SUB_DISPLAY_ALLOW_ALL_ODV
#define UQ_ENV_SUB_DISPLAY_ALLOWED_SET_ODV
#define queso_deprecated()
Definition: Defines.h:134
std::string m_option_platformName
Platform name.
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_seed
Seed of the random number generator.
#define UQ_ENV_DISPLAY_VERBOSITY_ODV
#define UQ_ENV_SYNC_VERBOSITY_ODV
std::string m_option_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
std::string m_option_identifyingString
Identifying string.
std::string m_option_subDisplayFileName
My output filename for sub-screen writing.
#define UQ_ENV_SUB_DISPLAY_FILE_NAME_ODV
#define UQ_ENV_PLATFORM_NAME_ODV
std::string m_option_syncVerbosity
Synchronized verbosity.
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 433 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().

434 {
436 
437 #ifdef QUESO_MEMORY_DEBUGGING
438  std::cout << "Entering EnvOptions::getMyOptionsValues()" << std::endl;
439 #endif
440  if (m_env.allOptionsMap().count(m_option_help.c_str())) {
441  // 'm_subDisplayOutputFile' is still not available at this moment. Use 'std::cout'
442  if (m_env.fullRank() == 0) std::cout << optionsDesc
443  << std::endl;
444  }
445 
446  if (m_env.allOptionsMap().count(m_option_numSubEnvironments.c_str())) {
448  }
450  std::cerr << "In BaseEnvironment::getMyOptionValues()"
451  << ": m_env.fullComm().NumProc() = " << m_env.fullComm().NumProc()
452  << ", m_numSubEnvironments = " << m_ov.m_numSubEnvironments
453  << std::endl;
454  }
455  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");
456 
457  if (m_env.allOptionsMap().count(m_option_subDisplayFileName.c_str())) {
459  }
460 
461  if (m_env.allOptionsMap().count(m_option_subDisplayAllowAll.c_str())) {
463  }
464 
465  if (m_env.allOptionsMap().count(m_option_subDisplayAllowInter0.c_str())) {
467  }
468 
471  // The line below is commented because 'm_subId' is not set at this point yet
472  //m_subDisplayAllowedSet.insert((unsigned int) m_subId);
473  }
474  else if (m_ov.m_subDisplayAllowInter0) {
476  }
477  else if (m_env.allOptionsMap().count(m_option_subDisplayAllowedSet.c_str())) {
479  std::vector<double> tmpAllow(0,0.);
480  std::string inputString = m_env.allOptionsMap()[m_option_subDisplayAllowedSet].as<std::string>();
481  MiscReadDoublesFromString(inputString,tmpAllow);
482  //if (m_subDisplayOutputFile) {
483  // *m_subDisplayOutputFile << "In EnvironmentOptions::getMyOptionValues(): allow = ";
484  // for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
485  // *m_subDisplayOutputFile << " " << tmpAllow[i];
486  // }
487  // *m_subDisplayOutputFile << std::endl;
488  //}
489 
490  if (tmpAllow.size() > 0) {
491  for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
492  m_ov.m_subDisplayAllowedSet.insert((unsigned int) tmpAllow[i]);
493  }
494  }
495  }
496 
497  if (m_env.allOptionsMap().count(m_option_displayVerbosity.c_str())) {
499  }
500 
501  if (m_env.allOptionsMap().count(m_option_syncVerbosity.c_str())) {
503  }
504 
505  if (m_env.allOptionsMap().count(m_option_checkingLevel.c_str())) {
507  }
508 
509  if (m_env.allOptionsMap().count(m_option_rngType.c_str())) {
510  m_ov.m_rngType = m_env.allOptionsMap()[m_option_rngType].as<std::string>();
511  }
512 
513  if (m_env.allOptionsMap().count(m_option_seed.c_str())) {
515  }
516 
517  if (m_env.allOptionsMap().count(m_option_platformName.c_str())) {
519  }
520 
521  if (m_env.allOptionsMap().count(m_option_identifyingString.c_str())) {
523  }
524 
525  //if (m_env.allOptionsMap().count(m_option_numDebugParams.c_str())) {
526  // m_numDebugParams = m_env.allOptionsMap()[m_option_numDebugParams].as<unsigned int>();
527  //}
528 
529 #ifdef QUESO_MEMORY_DEBUGGING
530  std::cout << "Leaving EnvOptions::getMyOptionsValues()" << std::endl;
531 #endif
532 
533  return;
534 }
int NumProc() const
Returns total number of processes.
Definition: MpiComm.C:123
bool m_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.
unsigned int m_syncVerbosity
Synchronized verbosity.
std::string m_platformName
Platform name.
void MiscReadDoublesFromString(const std::string &inputString, std::vector< double > &outputDoubles)
Definition: Miscellaneous.C:40
#define queso_require_equal_to_msg(expr1, expr2, msg)
Definition: asserts.h:73
boost::program_options::variables_map & allOptionsMap() const
Definition: Environment.C:385
std::string m_option_numSubEnvironments
My number of sub-environments.
const BaseEnvironment & m_env
Environment.
std::string m_option_checkingLevel
Checking level.
#define queso_deprecated()
Definition: Defines.h:134
unsigned int m_displayVerbosity
Verbosity.
std::string m_subDisplayFileName
Output filename for sub-screen writing.
std::set< unsigned int > m_subDisplayAllowedSet
Sub-environments that will write to output.
std::string m_option_platformName
Platform name.
int fullRank() const
Returns the process full rank.
Definition: Environment.C:268
std::string m_option_rngType
Type of the random number generator.
std::string m_rngType
Type of the random number generator.
unsigned int m_checkingLevel
Checking level.
const MpiComm & fullComm() const
Access function for MpiComm full communicator.
Definition: Environment.C:274
std::string m_identifyingString
Identifying string.
int m_seed
Seed of the random number generator.
std::string m_option_subDisplayAllowedSet
Sub-environments that will write to output.
std::string m_option_seed
Seed 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_identifyingString
Identifying string.
std::string m_option_subDisplayFileName
My output filename for sub-screen writing.
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.
std::string m_option_syncVerbosity
Synchronized verbosity.
std::string m_option_displayVerbosity
Verbosity.
void QUESO::EnvironmentOptions::print ( std::ostream &  os) const

Print values of the options chosen.

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

376 {
378 
382  //<< "\n" << m_option_subDisplayAllowInter0 << " = " << m_ov.m_subDisplayAllowInter0
383  << "\n" << m_option_subDisplayAllowedSet << " = ";
384  for (std::set<unsigned int>::iterator setIt = m_ov.m_subDisplayAllowedSet.begin(); setIt != m_ov.m_subDisplayAllowedSet.end(); ++setIt) {
385  os << *setIt << " ";
386  }
387  os << "\n" << m_option_displayVerbosity << " = " << m_ov.m_displayVerbosity
388  << "\n" << m_option_syncVerbosity << " = " << m_ov.m_syncVerbosity
389  << "\n" << m_option_checkingLevel << " = " << m_ov.m_checkingLevel
390  << "\n" << m_option_rngType << " = " << m_ov.m_rngType
391  << "\n" << m_option_seed << " = " << m_ov.m_seed
392  << "\n" << m_option_platformName << " = " << m_ov.m_platformName
394  //<< "\n" << m_option_numDebugParams << " = " << m_ov.m_numDebugParams
395  << std::endl;
396  return;
397 }
bool m_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
unsigned int m_syncVerbosity
Synchronized verbosity.
std::string m_platformName
Platform name.
std::string m_option_numSubEnvironments
My number of sub-environments.
std::string m_option_checkingLevel
Checking level.
#define queso_deprecated()
Definition: Defines.h:134
unsigned int m_displayVerbosity
Verbosity.
std::string m_subDisplayFileName
Output filename for sub-screen writing.
std::set< unsigned int > m_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_rngType
Type of the random number generator.
unsigned int m_checkingLevel
Checking level.
std::string m_identifyingString
Identifying string.
int m_seed
Seed of the random number generator.
std::string m_option_subDisplayAllowedSet
Sub-environments that will write to output.
std::string m_option_seed
Seed 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_identifyingString
Identifying string.
std::string m_option_subDisplayFileName
My output filename for sub-screen writing.
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_displayVerbosity
Verbosity.
void QUESO::EnvironmentOptions::scanOptionsValues ( )

Scans option values from input file.

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

348 {
350 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
351  queso_require_msg(m_optionsDesc, "m_optionsDesc variable is NULL");
352 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
353 
354 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
358 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
359 
360  // 'm_subDisplayOutputFile' is still not available at this moment. Use 'std::cout'
361  //if (m_env.subScreenFile() != NULL) {
362  // *m_env.subScreenFile()
363  if ((m_env.fullRank() == 0) && (m_env.displayVerbosity() >= 3)) {
364  std::cout << "In EnvironmentOptions::scanOptionsValues()"
365  << ": after reading values of options with prefix '" << m_prefix
366  << "', state of object is:"
367  << "\n" << *this
368  << std::endl;
369  }
370 
371  return;
372 }
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.
const BaseEnvironment & m_env
Environment.
#define queso_deprecated()
Definition: Defines.h:134
std::string m_prefix
Options prefix.
void getMyOptionValues(boost::program_options::options_description &optionsDesc)
Gets the option values of the environment.
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:396
int fullRank() const
Returns the process full rank.
Definition: Environment.C:268
unsigned int displayVerbosity() const
Definition: Environment.C:449
#define queso_require_msg(asserted, msg)
Definition: asserts.h:69

Member Data Documentation

const BaseEnvironment& QUESO::EnvironmentOptions::m_env
private

Environment.

Definition at line 272 of file EnvironmentOptions.h.

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

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

Checking level.

Definition at line 309 of file EnvironmentOptions.h.

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

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

Verbosity.

Definition at line 303 of file EnvironmentOptions.h.

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

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

Definition at line 285 of file EnvironmentOptions.h.

Referenced by defineMyOptions(), and getMyOptionValues().

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

Identifying string.

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

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

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

Platform name.

Definition at line 320 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 312 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 317 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 294 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 300 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 297 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 291 of file EnvironmentOptions.h.

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

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

Synchronized verbosity.

Definition at line 306 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 282 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 260 of file EnvironmentOptions.h.

Referenced by getMyOptionValues(), and print().

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

Options prefix.

Definition at line 275 of file EnvironmentOptions.h.

Referenced by EnvironmentOptions(), and scanOptionsValues().


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

Generated on Tue Nov 29 2016 10:53:13 for queso-0.56.0 by  doxygen 1.8.5