queso-0.53.0
EnvironmentOptions.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // QUESO - a library to support the Quantification of Uncertainty
5 // for Estimation, Simulation and Optimization
6 //
7 // Copyright (C) 2008-2015 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #include <boost/program_options.hpp>
26 
27 #include <queso/EnvironmentOptions.h>
28 #include <queso/Miscellaneous.h>
29 
30 #include <queso/asserts.h>
31 
32 namespace QUESO {
33 
34 // --------------------------------------------------
35 // EnvOptionsValues --------------------------
36 // --------------------------------------------------
37 
38 // Default constructor ------------------------------
40  :
41  m_prefix("env_"),
42  m_help(UQ_ENV_HELP),
43  m_numSubEnvironments(UQ_ENV_NUM_SUB_ENVIRONMENTS_ODV),
44  m_subDisplayFileName(UQ_ENV_SUB_DISPLAY_FILE_NAME_ODV),
45  m_subDisplayAllowAll(UQ_ENV_SUB_DISPLAY_ALLOW_ALL_ODV),
46  m_subDisplayAllowInter0(UQ_ENV_SUB_DISPLAY_ALLOW_INTER0_ODV),
47  //m_subDisplayAllowedSet (),
48  m_displayVerbosity(UQ_ENV_DISPLAY_VERBOSITY_ODV),
49  m_syncVerbosity(UQ_ENV_SYNC_VERBOSITY_ODV),
50  m_checkingLevel(UQ_ENV_CHECKING_LEVEL_ODV),
51  m_rngType(UQ_ENV_RNG_TYPE_ODV),
52  m_seed(UQ_ENV_SEED_ODV),
53  m_platformName(UQ_ENV_PLATFORM_NAME_ODV),
54  m_identifyingString(UQ_ENV_IDENTIFYING_STRING_ODV),
55  m_numDebugParams(UQ_ENV_NUM_DEBUG_PARAMS_ODV),
56  m_debugParams(m_numDebugParams,0.),
57  m_parser(NULL),
58  m_option_help(m_prefix + "help"),
59  m_option_numSubEnvironments(m_prefix + "numSubEnvironments"),
60  m_option_subDisplayFileName(m_prefix + "subDisplayFileName"),
61  m_option_subDisplayAllowAll(m_prefix + "subDisplayAllowAll"),
62  m_option_subDisplayAllowInter0(m_prefix + "subDisplayAllowInter0"),
63  m_option_subDisplayAllowedSet(m_prefix + "subDisplayAllowedSet"),
64  m_option_displayVerbosity(m_prefix + "displayVerbosity"),
65  m_option_syncVerbosity(m_prefix + "syncVerbosity"),
66  m_option_checkingLevel(m_prefix + "checkingLevel"),
67  m_option_rngType(m_prefix + "rngType"),
68  m_option_seed(m_prefix + "seed"),
69  m_option_platformName(m_prefix + "platformName"),
70  m_option_identifyingString(m_prefix + "identifyingString")
71 {
72 }
73 
75  prefix)
76  :
77  m_prefix((std::string) + "env_"),
78  m_help(UQ_ENV_HELP),
79  m_numSubEnvironments(UQ_ENV_NUM_SUB_ENVIRONMENTS_ODV),
80  m_subDisplayFileName(UQ_ENV_SUB_DISPLAY_FILE_NAME_ODV),
81  m_subDisplayAllowAll(UQ_ENV_SUB_DISPLAY_ALLOW_ALL_ODV),
82  m_subDisplayAllowInter0(UQ_ENV_SUB_DISPLAY_ALLOW_INTER0_ODV),
83  //m_subDisplayAllowedSet (),
84  m_displayVerbosity(UQ_ENV_DISPLAY_VERBOSITY_ODV),
85  m_syncVerbosity(UQ_ENV_SYNC_VERBOSITY_ODV),
86  m_checkingLevel(UQ_ENV_CHECKING_LEVEL_ODV),
87  m_rngType(UQ_ENV_RNG_TYPE_ODV),
88  m_seed(UQ_ENV_SEED_ODV),
89  m_platformName(UQ_ENV_PLATFORM_NAME_ODV),
90  m_identifyingString(UQ_ENV_IDENTIFYING_STRING_ODV),
91  m_numDebugParams(UQ_ENV_NUM_DEBUG_PARAMS_ODV),
92  m_debugParams(m_numDebugParams,0.),
93  m_parser(new BoostInputOptionsParser(env->optionsInputFileName())),
94  m_option_help(m_prefix + "help"),
95  m_option_numSubEnvironments(m_prefix + "numSubEnvironments"),
96  m_option_subDisplayFileName(m_prefix + "subDisplayFileName"),
97  m_option_subDisplayAllowAll(m_prefix + "subDisplayAllowAll"),
98  m_option_subDisplayAllowInter0(m_prefix + "subDisplayAllowInter0"),
99  m_option_subDisplayAllowedSet(m_prefix + "subDisplayAllowedSet"),
100  m_option_displayVerbosity(m_prefix + "displayVerbosity"),
101  m_option_syncVerbosity(m_prefix + "syncVerbosity"),
102  m_option_checkingLevel(m_prefix + "checkingLevel"),
103  m_option_rngType(m_prefix + "rngType"),
104  m_option_seed(m_prefix + "seed"),
105  m_option_platformName(m_prefix + "platformName"),
106  m_option_identifyingString(m_prefix + "identifyingString")
107 {
108  // Register all options with parser
109  m_parser->registerOption<std::string >(m_option_help, UQ_ENV_HELP, "produce help message for environment");
110  m_parser->registerOption<unsigned int>(m_option_numSubEnvironments, UQ_ENV_NUM_SUB_ENVIRONMENTS_ODV, "number of subEnvironments");
111  m_parser->registerOption<std::string >(m_option_subDisplayFileName, UQ_ENV_SUB_DISPLAY_FILE_NAME_ODV, "output filename for subscreen writing");
112  m_parser->registerOption<bool >(m_option_subDisplayAllowAll, UQ_ENV_SUB_DISPLAY_ALLOW_ALL_ODV, "Allow all processors to write to output file");
113  m_parser->registerOption<bool >(m_option_subDisplayAllowInter0, UQ_ENV_SUB_DISPLAY_ALLOW_INTER0_ODV, "Allow all inter0 nodes to write to output file");
114  m_parser->registerOption<std::string >(m_option_subDisplayAllowedSet, UQ_ENV_SUB_DISPLAY_ALLOWED_SET_ODV, "subEnvs that will write to output file");
116  m_parser->registerOption<unsigned int>(m_option_syncVerbosity, UQ_ENV_SYNC_VERBOSITY_ODV, "set sync verbosity");
117  m_parser->registerOption<unsigned int>(m_option_checkingLevel, UQ_ENV_CHECKING_LEVEL_ODV, "set checking level");
118  m_parser->registerOption<std::string >(m_option_rngType, UQ_ENV_RNG_TYPE_ODV, "set rngType");
120  m_parser->registerOption<std::string >(m_option_platformName, UQ_ENV_PLATFORM_NAME_ODV, "platform name");
122 
123  // Read the input file
125 
126  m_parser->getOption<std::string >(m_option_help, m_help);
139 
140  checkOptions();
141 }
142 
143 void
145 {
146  // Clear the permitted set of ranks if the user specifies that all are
147  // allowed to display or the Inter0 communicator is allowed to display
148  if (m_subDisplayAllowAll) {
149  // This will get filled by the Environment after the sub communicators are
150  // created
151  m_subDisplayAllowedSet.clear();
152  }
153  else if (m_subDisplayAllowInter0) {
154  m_subDisplayAllowedSet.clear();
155  }
156 }
157 
158 // Copy constructor ---------------------------------
160 {
161  this->copy(src);
162 }
163 
164 // Destructor ---------------------------------------
166 {
167  if (m_parser) {
168  delete m_parser;
169  }
170 }
171 
172 // Set methods---------------------------------------
175 {
176  this->copy(rhs);
177  return *this;
178 }
179 // Private methods-----------------------------------
180 void
182 {
191  m_rngType = src.m_rngType;
192  m_seed = src.m_seed;
197 
198  return;
199 }
200 
201 std::ostream& operator<<(std::ostream& os, const EnvOptionsValues & obj)
202 {
203  // Print the parser
204  os << (*(obj.m_parser)) << std::endl;
205 
206  // Print the option names and current values
207  os << obj.m_option_numSubEnvironments << " = " << obj.m_numSubEnvironments
208  << "\n" << obj.m_option_subDisplayFileName << " = " << obj.m_subDisplayFileName
209  << "\n" << obj.m_option_subDisplayAllowAll << " = " << obj.m_subDisplayAllowAll
210  //<< "\n" << obj.m_option_subDisplayAllowInter0 << " = " << obj.m_subDisplayAllowInter0
211  << "\n" << obj.m_option_subDisplayAllowedSet << " = ";
212  for (std::set<unsigned int>::iterator setIt = obj.m_subDisplayAllowedSet.begin(); setIt != obj.m_subDisplayAllowedSet.end(); ++setIt) {
213  os << *setIt << " ";
214  }
215  os << "\n" << obj.m_option_displayVerbosity << " = " << obj.m_displayVerbosity
216  << "\n" << obj.m_option_syncVerbosity << " = " << obj.m_syncVerbosity
217  << "\n" << obj.m_option_checkingLevel << " = " << obj.m_checkingLevel
218  << "\n" << obj.m_option_rngType << " = " << obj.m_rngType
219  << "\n" << obj.m_option_seed << " = " << obj.m_seed
220  << "\n" << obj.m_option_platformName << " = " << obj.m_platformName
221  << "\n" << obj.m_option_identifyingString << " = " << obj.m_identifyingString
222  //<< "\n" << obj.m_option_numDebugParams << " = " << obj.m_numDebugParams
223  << std::endl;
224  return os;
225 }
226 
227 // --------------------------------------------------
228 // EnvironmentOptions ------------------------
229 // --------------------------------------------------
230 
231 // Default constructor ------------------------------
233  const BaseEnvironment& env,
234  const char* prefix)
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 }
257 // Constructor with alternative values --------------
259  const BaseEnvironment& env,
260  const char* prefix,
261  const EnvOptionsValues& alternativeOptionsValues)
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 }
292 // Destructor ---------------------------------------
294 {
296 
297  if (m_optionsDesc) delete m_optionsDesc;
298 }
299 
300 // I/O methods---------------------------------------
301 void
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 }
324 // --------------------------------------------------
325 void
326 EnvironmentOptions::print(std::ostream& os) const
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 }
349 
350 // Private methods ----------------------------------
351 void
352 EnvironmentOptions::defineMyOptions(boost::program_options::options_description& optionsDesc) const
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 }
381 // --------------------------------------------------
382 void
383 EnvironmentOptions::getMyOptionValues(boost::program_options::options_description& optionsDesc)
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 }
485 
486 // Operator outside class definition ----------------
487 std::ostream& operator<<(std::ostream& os, const EnvironmentOptions& obj)
488 {
490 
491  obj.print(os);
492 
493  return os;
494 }
495 
496 } // End namespace QUESO
#define UQ_ENV_SUB_DISPLAY_FILE_NAME_ODV
unsigned int displayVerbosity() const
Definition: Environment.C:396
#define UQ_ENV_NUM_SUB_ENVIRONMENTS_ODV
#define UQ_ENV_SUB_DISPLAY_ALLOW_ALL_ODV
std::string m_option_rngType
Input file option name for m_rngType.
std::string m_option_subDisplayAllowInter0
Input file option name for m_subDisplayAllowInter0.
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.
std::string m_option_seed
Input file option name for m_seed.
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
std::string m_option_help
Input file option name for flagging helpful printing output.
std::string m_option_subDisplayFileName
Input file option name for m_subDisplayFileName.
#define UQ_ENV_RNG_TYPE_ODV
void scanOptionsValues()
Scans option values from input file.
virtual ~EnvOptionsValues()
Destructor.
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
#define UQ_ENV_CHECKING_LEVEL_ODV
unsigned int m_checkingLevel
Checking level.
#define queso_require_not_equal_to_msg(expr1, expr2, msg)
Definition: asserts.h:86
#define UQ_ENV_PLATFORM_NAME_ODV
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
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
This class provides a suite options one can pass to a QUESO environment.
unsigned int m_syncVerbosity
Synchronized verbosity.
void getMyOptionValues(boost::program_options::options_description &optionsDesc)
Gets the option values of the environment.
unsigned int m_displayVerbosity
Verbosity.
boost::program_options::variables_map & allOptionsMap() const
Definition: Environment.C:336
std::string m_option_identifyingString
Input file option name for m_identifyingString.
std::string m_subDisplayFileName
Output filename for sub-screen writing.
std::string m_option_platformName
Input file option name for m_platformName.
std::string m_option_subDisplayAllowedSet
Sub-environments that will write to output.
#define UQ_ENV_SUB_DISPLAY_ALLOWED_SET_ODV
std::string m_option_displayVerbosity
Input file option name for m_displayVerbosity.
#define UQ_ENV_HELP
#define queso_require_equal_to_msg(expr1, expr2, msg)
Definition: asserts.h:85
#define UQ_ENV_SUB_DISPLAY_ALLOW_INTER0_ODV
std::string m_option_rngType
Type of the random number generator.
#define UQ_ENV_NUM_DEBUG_PARAMS_ODV
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
void scanInputFile()
This is the method that parses the input file.
std::string m_option_subDisplayAllowAll
Allows (or not) all sub-environments to write to output file.
EnvOptionsValues & operator=(const EnvOptionsValues &rhs)
Operator for copying the options of an environment.
std::string m_option_syncVerbosity
Input file option name for m_syncVerbosity.
#define queso_require_msg(asserted, msg)
Definition: asserts.h:69
#define UQ_ENV_DISPLAY_VERBOSITY_ODV
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:274
#define UQ_ENV_SYNC_VERBOSITY_ODV
unsigned int m_numDebugParams
Number of debug parameters. Unused?
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:193
void copy(const EnvOptionsValues &src)
Makes an exact copy of an existing EnvOptionsValues instance.
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.
BoostInputOptionsParser * m_parser
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 registerOption(std::string name, T defaultValue, std::string description)
Call this to register an option with the parser.
std::string m_option_subDisplayAllowAll
Input file option name for m_subDisplayAllowAll.
This class reads options one can pass to a QUESO environment through an input file.
void MiscReadDoublesFromString(const std::string &inputString, std::vector< double > &outputDoubles)
Definition: Miscellaneous.C:40
std::vector< double > m_debugParams
Debug parameters. Unused?
#define queso_deprecated()
Definition: Defines.h:120
std::string m_option_subDisplayAllowedSet
Input file option name for m_subDisplayAllowedSet.
EnvOptionsValues()
Default constructor.
std::string m_rngType
Type of the random number generator.
std::string m_prefix
Options prefix.
std::string m_platformName
Platform name.
std::string m_identifyingString
Identifying string.
std::string m_option_platformName
Platform name.
std::string m_option_checkingLevel
Input file option name for m_checkingLevel.
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.
#define UQ_ENV_IDENTIFYING_STRING_ODV
void getOption(std::string &name, T &value)
Get option name from the parser and set value to the parsed value.
void checkOptions()
Sorts out any inter-option conflicts.
const BaseEnvironment & m_env
Environment.
#define UQ_ENV_SEED_ODV
EnvironmentOptions(const BaseEnvironment &env, const char *prefix)
Default constructor.
std::string m_option_numSubEnvironments
Input file option name for m_numSubEnvironments.
std::string m_option_displayVerbosity
Verbosity.
void print(std::ostream &os) const
Print values of the options chosen.

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