25 #include <boost/program_options.hpp> 
   27 #include <queso/queso.h> 
   28 #include <queso/Environment.h> 
   29 #include <queso/EnvironmentOptions.h> 
   30 #include <queso/RngGsl.h> 
   31 #include <queso/RngBoost.h> 
   32 #include <queso/BasicPdfsGsl.h> 
   33 #include <queso/BasicPdfsBoost.h> 
   34 #include <queso/Miscellaneous.h> 
   41 #include <queso/asserts.h> 
   52       os << 
"------------------------------------------------------------------------------------------" ;
 
   53       os << 
"--------------------" << std::endl;
 
   54       os << 
"QUESO Library: Version = " << QUESO_LIB_VERSION;
 
   57       os << QUESO_LIB_RELEASE << std::endl << std::endl;
 
   59       os << 
"Build Date   = " << QUESO_BUILD_DATE     << std::endl;
 
   60       os << 
"Build Host   = " << QUESO_BUILD_HOST     << std::endl;
 
   61       os << 
"Build User   = " << QUESO_BUILD_USER     << std::endl;
 
   62       os << 
"Build Arch   = " << QUESO_BUILD_ARCH     << std::endl;
 
   63       os << 
"Build Rev    = " << QUESO_BUILD_VERSION  << std::endl     << std::endl;
 
   65       os << 
"C++ Config   = " << QUESO_CXX << 
" " << QUESO_CXXFLAGS    << std::endl;
 
   67       os << 
"Trilinos DIR = " << QUESO_TRILINOS_DIR << std::endl;
 
   68       os << 
"GSL Libs     = " << QUESO_GSL_DIR  << std::endl;
 
   69       os << 
"GRVY DIR     = " << QUESO_GRVY_DIR << std::endl;
 
   70       os << 
"GLPK DIR     = " << QUESO_GLPK_DIR << std::endl;
 
   71       os << 
"HDF5 DIR     = " << QUESO_HDF5_DIR << std::endl;
 
   72       os << 
"------------------------------------------------------------------------------------------" ;
 
   73       os << 
"--------------------" << std::endl;
 
   92     int major_version = 0;
 
   93     int minor_version = 0;
 
   94     int micro_version = 0;
 
   96 #ifdef QUESO_MAJOR_VERSION 
   97     major_version = QUESO_MAJOR_VERSION;
 
  100 #ifdef QUESO_MINOR_VERSION 
  101     minor_version = QUESO_MINOR_VERSION;
 
  104 #ifdef QUESO_MICRO_VERSION 
  105     micro_version = QUESO_MICRO_VERSION;
 
  108     return(major_version*10000 + minor_version*100 + micro_version);
 
  115 #ifdef QUESO_HAS_HDF5
 
  137   const char*                    passedOptionsInputFileName,
 
  140   m_fullEnvIsReady             (false),
 
  145   m_optionsInputFileName       (
""),
 
  146   m_optionsInputFileAccessState(true),
 
  147   m_allOptionsDesc             (NULL),
 
  148   m_allOptionsMap              (NULL),
 
  155   m_inter0CommSize             (1),
 
  156   m_subDisplayFile             (NULL),
 
  159   m_exceptionalCircumstance    (false),
 
  160   m_optionsObj                 (alternativeOptionsValues)
 
  172   struct timeval timevalNow;
 
  174   gettimeofday(&timevalNow, NULL);
 
  180                           << 
"Total run time = " << timevalNow.tv_sec - 
m_timevalBegin.tv_sec
 
  186         std::cout << 
"Ending run at "    << ctime(&timevalNow.tv_sec)
 
  187                   << 
"Total run time = " << timevalNow.tv_sec - 
m_timevalBegin.tv_sec
 
  329 #ifdef UQ_USES_COMMAND_LINE_OPTIONS 
  330 const boost::program_options::options_description&
 
  331 BaseEnvironment::allOptionsDesc()
 const 
  339 boost::program_options::variables_map&
 
  353 #ifdef UQ_USES_COMMAND_LINE_OPTIONS 
  365 #ifdef QUESO_MEMORY_DEBUGGING 
  366   std::cout << 
"Entering BaseEnv::scanInputFileForMyOptions()" << std::endl;
 
  379 #ifdef QUESO_MEMORY_DEBUGGING 
  380   std::cout << 
"in BaseEnv::scanInputFileForMyOptions(), before store(a)" << std::endl;
 
  385 #ifdef QUESO_MEMORY_DEBUGGING 
  386   std::cout << 
"in BaseEnv::scanInputFileForMyOptions(), after store(a)" << std::endl;
 
  392 #ifdef QUESO_MEMORY_DEBUGGING 
  393   std::cout << 
"Leaving BaseEnv::scanInputFileForMyOptions()" << std::endl;
 
  467   return m_timevalBegin;
 
  472   const std::string&            baseFileName,
 
  473   const std::string&            inputFileType,
 
  474   const std::set<unsigned int>& allowedSubEnvIds,
 
  478   std::string fileType(inputFileType);
 
  479 #ifdef QUESO_HAS_HDF5 
  484       *this->
subDisplayFile() << 
"WARNING in BaseEnvironment::openOutputFile()" 
  486                               << 
"' has been requested, but this QUESO library has not been built with 'hdf5'" 
  492       std::cerr << 
"WARNING in BaseEnvironment::openOutputFile()" 
  494                 << 
"' has been requested, but this QUESO library has not been built with 'hdf5'" 
  503   bool returnValue = 
true;
 
  506       (allowedSubEnvIds.find(this->subId()) == allowedSubEnvIds.end()            )) {
 
  509                               << 
", subId = "     << this->
subId()
 
  510                               << 
": no output file opened with base name '" << baseFileName << 
"." << fileType
 
  512                               << 
", writeOver = " << writeOver
 
  523                               << 
", subId = "     << this->
subId()
 
  524                               << 
": opening output file with base name '" << baseFileName << 
"." << fileType
 
  526                               << 
", writeOver = " << writeOver
 
  532       std::cout << 
"In BaseEnvironment::openOutputFile()" 
  533                 << 
": opening output file with base name '" << baseFileName << 
"." << fileType
 
  535                 << 
", writeOver = " << writeOver
 
  546                                 << 
", subId = "     << this->
subId()
 
  547                                 << 
", trying to open output file with base name '" << baseFileName << 
"." << fileType
 
  549                                 << 
", writeOver = " << writeOver
 
  550                                 << 
": calling CheckFilePath()..." 
  556                                 << 
", subId = "     << this->
subId()
 
  557                                 << 
", trying to open output file with base name '" << baseFileName << 
"." << fileType
 
  559                                 << 
", writeOver = " << writeOver
 
  560                                 << 
": returned from CheckFilePath() with irtrn = " << irtrn
 
  571           filePtrSet.
ofsVar = 
new std::ofstream((baseFileName+
"_sub"+this->
subIdString()+
"."+fileType).c_str(),
 
  572                                                 std::ofstream::out | std::ofstream::trunc);
 
  582                                   << 
": just opened output file with base name '" << baseFileName << 
"." << fileType
 
  584                                   << 
", writeOver = " << writeOver
 
  585                                   << 
", options 'out|trunc'" 
  586                                   << 
", osfvar = " << filePtrSet.
ofsVar 
  597           filePtrSet.
ofsVar = 
new std::ofstream((baseFileName+
"_sub"+this->
subIdString()+
"."+fileType).c_str(),
 
  599           std::cout << 
"filePtrSet.ofsVar(1) = " << filePtrSet.
ofsVar << std::endl;
 
  600           if (filePtrSet.
ofsVar) std::cout << 
"filePtrSet.ofsVar(1)->is_open() = " << filePtrSet.
ofsVar->is_open() << std::endl;
 
  604           filePtrSet.
ofsVar = 
new std::ofstream((baseFileName+
"_sub"+this->
subIdString()+
"."+fileType).c_str(),
 
  605                                                 std::ofstream::out  | std::ofstream::app);
 
  607 #ifdef QUESO_HAS_HDF5 
  609           std::string fullFileName =
 
  610             baseFileName+
"_sub"+this->
subIdString()+
"."+fileType;
 
  613           filePtrSet.h5Var = H5Fcreate(fullFileName.c_str(),
 
  620               "error opening file `" << fullFileName << 
"`");
 
  628                                   << 
": just opened output file with base name '" << baseFileName << 
"." << fileType
 
  630                                   << 
", writeOver = " << writeOver
 
  631                                   << 
", options 'out|in|app'" 
  632                                   << 
", osfvar = " << filePtrSet.
ofsVar 
  639           if ((filePtrSet.
ofsVar            == NULL ) ||
 
  640               (filePtrSet.
ofsVar->is_open() == 
false)) {
 
  643             filePtrSet.
ofsVar = 
new std::ofstream((baseFileName+
"_sub"+this->
subIdString()+
"."+fileType).c_str(),
 
  644                                                   std::ofstream::out | std::ofstream::trunc);
 
  647                                       << 
": just opened output file with base name '" << baseFileName << 
"." << fileType
 
  649                                       << 
", writeOver = " << writeOver
 
  650                                       << 
", options 'out|trunc'" 
  651                                       << 
", osfvar = " << filePtrSet.
ofsVar 
  663             "failed to open output file");
 
  677   const std::string&        baseFileName,
 
  678   const std::string&        inputFileType,
 
  682   std::string fileType(inputFileType);
 
  683 #ifdef QUESO_HAS_HDF5 
  688       *this->
subDisplayFile() << 
"WARNING in BaseEnvironment::openUnifiedOutputFile()" 
  690                               << 
"' has been requested, but this QUESO library has not been built with 'hdf5'" 
  696       std::cerr << 
"WARNING in BaseEnvironment::openUnifiedOutputFile()" 
  698                 << 
"' has been requested, but this QUESO library has not been built with 'hdf5'" 
  707   bool returnValue = 
true;
 
  709   if (baseFileName == 
".") {
 
  711       *this->
subDisplayFile() << 
"In BaseEnvironment::openUnifiedOutputFile()" 
  712                               << 
": no unified output file opened with base name '" << baseFileName << 
"." << fileType
 
  714                               << 
", writeOver = " << writeOver
 
  724       *this->
subDisplayFile() << 
"In BaseEnvironment::openUnifiedOutputFile()" 
  725                               << 
": opening unified output file with base name '" << baseFileName << 
"." << fileType
 
  727                               << 
", writeOver = " << writeOver
 
  735       std::cout << 
"In BaseEnvironment::openUnifiedOutputFile()" 
  736                 << 
": opening output file with base name '" << baseFileName << 
"." << fileType
 
  738                 << 
", writeOver = " << writeOver
 
  746       int irtrn = 
CheckFilePath((baseFileName+
"."+fileType).c_str());
 
  755           filePtrSet.
ofsVar = 
new std::ofstream((baseFileName+
"."+fileType).c_str(),
 
  756                                                 std::ofstream::out | std::ofstream::trunc);
 
  758 #ifdef QUESO_HAS_HDF5 
  760           filePtrSet.h5Var = H5Fcreate((baseFileName+
"."+fileType).c_str(),
 
  770           *this->
subDisplayFile() << 
"In BaseEnvironment::openUnifiedOutputFile()" 
  771                                   << 
": just opened output file with base name '" << baseFileName << 
"." << fileType
 
  773                                   << 
", writeOver = " << writeOver
 
  774                                   << 
", options 'out|trunc'" 
  775                                   << 
", osfvar = " << filePtrSet.
ofsVar 
  786           filePtrSet.
ofsVar = 
new std::ofstream((baseFileName+
"."+fileType).c_str(),
 
  787                                                 std::ofstream::out  | std::ofstream::app);
 
  789 #ifdef QUESO_HAS_HDF5 
  791           filePtrSet.h5Var = H5Fcreate((baseFileName+
"."+fileType).c_str(), 
 
  805           *this->
subDisplayFile() << 
"In BaseEnvironment::openUnifiedOutputFile()" 
  806                                   << 
": just opened output file with base name '" << baseFileName << 
"." << fileType
 
  808                                   << 
", writeOver = " << writeOver
 
  809                                   << 
", options 'out|in|app'" 
  810                                   << 
", osfvar = " << filePtrSet.
ofsVar 
  813         if ((filePtrSet.
ofsVar            == NULL ) ||
 
  814             (filePtrSet.
ofsVar->is_open() == 
false)) {
 
  816           std::cout << 
"Retrying 2..." << std::endl;
 
  819           filePtrSet.
ofsVar = 
new std::ofstream((baseFileName+
"."+fileType).c_str(),
 
  820                                                 std::ofstream::out | std::ofstream::trunc);
 
  822             *this->
subDisplayFile() << 
"In BaseEnvironment::openUnifiedOutputFile()" 
  823                                     << 
": just opened output file with base name '" << baseFileName << 
"." << fileType
 
  825                                     << 
", writeOver = " << writeOver
 
  826                                     << 
", options 'out|trunc'" 
  827                                     << 
", osfvar = " << filePtrSet.
ofsVar 
  832       if (filePtrSet.
ofsVar == NULL) {
 
  833         std::cerr << 
"In BaseEnvironment::openUnifiedOutputFile()" 
  834                   << 
": failed to open unified output file with base name '" << baseFileName << 
"." << fileType
 
  847   const std::string&            baseFileName,
 
  848   const std::string&            inputFileType,
 
  849   const std::set<unsigned int>& allowedSubEnvIds,
 
  852   std::string fileType(inputFileType);
 
  853 #ifdef QUESO_HAS_HDF5 
  858       *this->
subDisplayFile() << 
"WARNING in BaseEnvironment::openInputFile()" 
  860                               << 
"' has been requested, but this QUESO library has not been built with 'hdf5'" 
  866       std::cerr << 
"WARNING in BaseEnvironment::openInputFile()" 
  868                 << 
"' has been requested, but this QUESO library has not been built with 'hdf5'" 
  877   bool returnValue = 
true;
 
  880       (allowedSubEnvIds.find(this->subId()) == allowedSubEnvIds.end()           )) {
 
  883                               << 
": no input file opened with base name '" << baseFileName << 
"." << fileType
 
  895                               << 
": opening input file with base name '" << baseFileName << 
"." << fileType
 
  905       int irtrn = 
CheckFilePath((baseFileName+
"."+fileType).c_str());
 
  910         filePtrSet.
ifsVar = 
new std::ifstream((baseFileName+
"."+fileType).c_str(),
 
  912         if ((filePtrSet.
ifsVar == NULL) || (filePtrSet.
ifsVar->is_open() == 
false)) {
 
  913           std::cerr << 
"In BaseEnvironment::openInputFile()" 
  914                     << 
": failed to open input file with base name '" << baseFileName << 
"." << fileType
 
  920 #ifdef QUESO_HAS_HDF5 
  922         filePtrSet.h5Var = H5Fopen((baseFileName+
"."+fileType).c_str(),
 
  942   const std::string&        baseFileName,
 
  943   const std::string&        inputFileType,
 
  946   std::string fileType(inputFileType);
 
  947 #ifdef QUESO_HAS_HDF5 
  952       *this->
subDisplayFile() << 
"WARNING in BaseEnvironment::openUnifiedInputFile()" 
  954                               << 
"' has been requested, but this QUESO library has not been built with 'hdf5'" 
  960       std::cerr << 
"WARNING in BaseEnvironment::openUnifiedInputFile()" 
  962                 << 
"' has been requested, but this QUESO library has not been built with 'hdf5'" 
  971   bool returnValue = 
true;
 
  975       *this->
subDisplayFile() << 
"In BaseEnvironment::openUnifiedInputFile()" 
  976                               << 
": no input file opened with base name '" << baseFileName << 
"." << fileType
 
  987       *this->
subDisplayFile() << 
"In BaseEnvironment::openUnifiedInputFile()" 
  988                               << 
": opening input file with base name '" << baseFileName << 
"." << fileType
 
  998       int irtrn = 
CheckFilePath((baseFileName+
"."+fileType).c_str());
 
 1003         filePtrSet.
ifsVar = 
new std::ifstream((baseFileName+
"."+fileType).c_str(),
 
 1005         if ((filePtrSet.
ifsVar == NULL) || (filePtrSet.
ifsVar->is_open() == 
false)) {
 
 1006           std::cerr << 
"In BaseEnvironment::openUnifiedInputFile()" 
 1007                     << 
": failed to open input file with base name '" << baseFileName << 
"." << fileType
 
 1013 #ifdef QUESO_HAS_HDF5 
 1015         filePtrSet.h5Var = H5Fopen((baseFileName+
"."+fileType).c_str(),
 
 1036   const std::string&  inputFileType)
 const 
 1038   std::string fileType(inputFileType);
 
 1039 #ifdef QUESO_HAS_HDF5 
 1044       *this->
subDisplayFile() << 
"WARNING in BaseEnvironment::closeFile()" 
 1046                               << 
"' has been requested, but this QUESO library has not been built with 'hdf5'" 
 1052       std::cerr << 
"WARNING in BaseEnvironment::closeFile()" 
 1054                 << 
"' has been requested, but this QUESO library has not been built with 'hdf5'" 
 1066     delete filePtrSet.
ofsVar;
 
 1067     filePtrSet.
ofsVar = NULL;
 
 1070     delete filePtrSet.
ifsVar;
 
 1071     filePtrSet.
ifsVar = NULL;
 
 1073 #ifdef QUESO_HAS_HDF5 
 1075     H5Fclose(filePtrSet.h5Var);
 
 1122 #ifdef QUESO_HAS_MPI 
 1125   const char*                    passedOptionsInputFileName,
 
 1131 #ifdef QUESO_MEMORY_DEBUGGING 
 1132   std::cout << 
"Entering FullEnv" << std::endl;
 
 1138   int mpiRC = MPI_Comm_rank(inputComm,&
m_worldRank);
 
 1152 #ifdef QUESO_MEMORY_DEBUGGING 
 1153   std::cout << 
"In FullEnv, finished dealing with MPI initially" << std::endl;
 
 1167       m_allOptionsDesc = 
new boost::program_options::options_description(
"Allowed options");
 
 1169       readOptionsInputFile();
 
 1180     std::cout << (*m_optionsObj) << std::endl;
 
 1185       "total number of processors in environment must be multiple of the specified number of subEnvironments");
 
 1187 #ifdef QUESO_MEMORY_DEBUGGING 
 1188   std::cout << 
"In FullEnv, finished scanning options" << std::endl;
 
 1208       std::cout << 
"Beginning run at " << ctime(&
m_timevalBegin.tv_sec)
 
 1220   sprintf(tmpSubId,
"%u",
m_subId);
 
 1227   std::vector<int> fullRanksOfMySubEnvironment(numRanksPerSubEnvironment,0);
 
 1228   for (
unsigned int i = 0; i < numRanksPerSubEnvironment; ++i) {
 
 1229     fullRanksOfMySubEnvironment[i] = 
m_subId * numRanksPerSubEnvironment + i;
 
 1232   mpiRC = MPI_Group_incl(
m_fullGroup, (
int) numRanksPerSubEnvironment, &fullRanksOfMySubEnvironment[0], &
m_subGroup);
 
 1238   m_subComm = 
new MpiComm(*
this,subRawComm);
 
 1252     fullRanksOfInter0[i] = i * numRanksPerSubEnvironment;
 
 1259   if (
m_fullRank%numRanksPerSubEnvironment == 0) {
 
 1278   bool openFile = 
false;
 
 1304                                          std::ofstream::out | std::ofstream::trunc);
 
 1320         std::cout << 
"MPI node of worldRank "             << 
m_worldRank 
 1322                   << 
", belongs to subEnvironment of id " << 
m_subId 
 1326         std::cout << 
"MPI node of worldRank " << 
m_worldRank 
 1327                   << 
" belongs to sub communicator with full ranks";
 
 1328         for (
unsigned int j = 0; j < fullRanksOfMySubEnvironment.size(); ++j) {
 
 1329           std::cout << 
" " << fullRanksOfMySubEnvironment[j];
 
 1334           std::cout << 
"MPI node of worldRank " << m_worldRank
 
 1335                     << 
" also belongs to inter0 communicator with full ranks";
 
 1336           for (
unsigned int j = 0; j < fullRanksOfInter0.size(); ++j) {
 
 1337             std::cout << 
" " << fullRanksOfInter0[j];
 
 1343         std::cout << std::endl;
 
 1364     std::cerr << 
"In Environment::constructor()" 
 1377     *
m_subDisplayFile << 
"Done with initializations at FullEnvironment::commonConstructor()" 
 1383 #endif  // QUESO_HAS_MPI 
 1386   const char*                    passedOptionsInputFileName,
 
 1392 #ifdef QUESO_MEMORY_DEBUGGING 
 1393   std::cout << 
"Entering FullEnv" << std::endl;
 
 1402 #ifndef QUESO_HAS_MPI 
 1409 #ifdef QUESO_MEMORY_DEBUGGING 
 1410   std::cout << 
"In FullEnv, finished dealing with MPI initially" << std::endl;
 
 1424       m_allOptionsDesc = 
new boost::program_options::options_description(
"Allowed options");
 
 1437     std::cout << (*m_optionsObj) << std::endl;
 
 1442       "total number of processors in environment must be multiple of the specified number of subEnvironments");
 
 1444 #ifdef QUESO_MEMORY_DEBUGGING 
 1445   std::cout << 
"In FullEnv, finished scanning options" << std::endl;
 
 1462     std::cout << 
"Beginning run at " << ctime(&
m_timevalBegin.tv_sec)
 
 1468   sprintf(tmpSubId,
"%u",
m_subId);
 
 1475   int fullRanksOfMySubEnvironment = 1;
 
 1477 #ifndef QUESO_HAS_MPI 
 1493   int fullRanksOfInter0 = 0;
 
 1494 #ifndef QUESO_HAS_MPI 
 1514   bool openFile = 
false;
 
 1521   if (openFile && m_worldRank == 0) {
 
 1540                                          std::ofstream::out | std::ofstream::trunc);
 
 1556         std::cout << 
"MPI node of worldRank "             << m_worldRank
 
 1558                   << 
", belongs to subEnvironment of id " << 
m_subId 
 1562         std::cout << 
"MPI node of worldRank " << m_worldRank
 
 1563                   << 
" belongs to sub communicator with full ranks";
 
 1564           std::cout << 
" " << fullRanksOfMySubEnvironment;
 
 1568           std::cout << 
"MPI node of worldRank " << m_worldRank
 
 1569                     << 
" also belongs to inter0 communicator with full ranks";
 
 1570             std::cout << 
" " << fullRanksOfInter0;
 
 1575   std::cout << std::endl;
 
 1593     std::cerr << 
"In Environment::constructor()" 
 1606     *
m_subDisplayFile << 
"Done with initializations at FullEnvironment::commonConstructor()" 
 1627 #ifdef QUESO_HAS_MPI 
 1628   int mpi_initialized;
 
 1629   MPI_Initialized (&mpi_initialized);
 
 1631   if (mpi_initialized)
 
 1634       MPI_Abort(MPI_COMM_WORLD, 1);
 
 1655   if (ifs->is_open()) {
 
 1660     if (
m_fullRank == 0) std::cout << 
"An invalid input file has been passed to the 'environment' class constructor!" 
 1664     if (
m_fullRank == 0) std::cout << 
"\nThis is a help message of the QUESO library." 
 1665                                    << 
"\nAn application using the QUESO library shall be executed by typing" 
 1666                                    << 
"\n  '<eventual mpi commands and options> <Application> <InputFile>'" 
 1667                                    << 
"\nin the command line." 
#define UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT
 
unsigned int displayVerbosity() const 
 
const MpiComm & subComm() const 
Access function for MpiComm sub communicator. 
 
void readOptionsInputFile()
Checks the options input file and reads the options. 
 
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. 
 
std::ofstream * ofsVar
Provides a stream interface to write data to files. 
 
#define UQ_ENV_FILENAME_FOR_NO_OUTPUT_FILE
 
BasicPdfsBase * m_basicPdfs
 
unsigned int m_checkingLevel
Checking level. 
 
#define UQ_FILE_EXTENSION_FOR_TXT_FORMAT
 
int subRank() const 
Access function for sub-rank. 
 
#define queso_error_msg(msg)
 
RawType_MPI_Comm Comm() const 
Extract MPI Communicator from a MpiComm object. 
 
void print(std::ostream &os) const 
Sends the environment options to the stream. 
 
bool m_exceptionalCircumstance
 
boost::program_options::variables_map * m_allOptionsMap
 
void setOptionsInputFileAccessState(bool newState) const 
 
bool exceptionalCircumstance() const 
Decides whether there is an exceptional circumstance. 
 
void scanInputFileForMyOptions(const boost::program_options::options_description &optionsDesc) const 
This method scans the input file provided by the user to QUESO. 
 
int seed() const 
Access to the RNG seed. 
 
std::string m_optionsInputFileName
 
TODO: Base class for basic PDFs using Boost library. 
 
int fullRank() const 
Returns the process full rank. 
 
int QUESO_get_numeric_version()
 
std::string identifyingString() const 
Access function to private attribute m_identifyingString: identifying string. 
 
#define queso_require_not_equal_to_msg(expr1, expr2, msg)
 
FilePtrSetStruct()
Struct constructor. 
 
RawType_MPI_Group subGroup() const 
Access function for sub-group. 
 
#define queso_deprecated()
 
const MpiComm & fullComm() const 
Access function for MpiComm full communicator. 
 
void queso_terminate_handler()
Function for unhandled exceptions in Queso. 
 
void QUESO_version_print(std::ostream &os)
 
unsigned int syncVerbosity() const 
Access function to private attribute m_syncVerbosity. 
 
EnvOptionsValues * m_optionsObj
 
unsigned int numSubEnvironments() const 
Access function to the number of sub-environments. 
 
std::string m_platformName
Platform name. 
 
boost::program_options::variables_map & allOptionsMap() const 
 
#define queso_require_msg(asserted, msg)
 
const std::string & subIdString() const 
Access to the attribute m_subIdString; which stores the string for the sub-environment, and it will be used, for instance, to create the output files for each sub-environment. 
 
int inter0Rank() const 
Returns the process inter0 rank. 
 
Class for random number generation using Boost library. 
 
#define queso_require_equal_to_msg(expr1, expr2, msg)
 
bool openUnifiedOutputFile(const std::string &fileName, const std::string &fileType, bool writeOver, FilePtrSetStruct &filePtrSet) const 
Opens a unified output file, that will contain data from all sub-environments. 
 
void Barrier() const 
Pause every process in *this communicator until all the processes reach this point. 
 
#define queso_require_greater_equal_msg(expr1, expr2, msg)
 
virtual ~BaseEnvironment()
Destructor. 
 
std::set< unsigned int > m_subDisplayAllowedSet
Sub-environments that will write to output. 
 
void closeFile(FilePtrSetStruct &filePtrSet, const std::string &fileType) const 
Closes the file. 
 
std::terminate_handler old_terminate_handler
 
std::string m_subIdString
 
#define UQ_ENV_FILENAME_FOR_NO_INPUT_FILE
 
std::string optionsInputFileName() const 
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the...
 
const MpiComm & selfComm() const 
Access function for MpiComm self-communicator. 
 
bool fullEnvIsReady() const 
Returns whether the full environment class is ready (constructor has successfully been called)...
 
~FilePtrSetStruct()
Destructor. 
 
int seed() const 
Sets the seed. 
 
Struct for handling data input and output from files. 
 
std::ofstream * subDisplayFile() const 
Access function for m_subDisplayFile (displays file on stream). 
 
#define RawValue_MPI_COMM_SELF
 
RawType_MPI_Group m_fullGroup
 
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
 
unsigned int m_numSubEnvironments
 
void setExceptionalCircumstance(bool value) const 
Set an exceptional circumstance. 
 
#define UQ_FILE_EXTENSION_FOR_HDF_FORMAT
 
std::string m_rngType
Type of the random number generator. 
 
boost::program_options::options_description * m_allOptionsDesc
 
unsigned int subId() const 
Access function to the number of each sub-environment Id: m_subId. 
 
void resetSeed(int newSeedOption)
Reset RNG seed. 
 
TODO: Base class for basic PDFs (via either GSL or Boost). 
 
int MyPID() const 
Return my process ID. 
 
FullEnvironment(const char *passedOptionsInputFileName, const char *prefix, EnvOptionsValues *alternativeOptionsValues)
Parallel constructor. 
 
int CheckFilePath(const char *path)
 
bool m_optionsInputFileAccessState
 
std::string m_identifyingString
Identifying string. 
 
std::string platformName() const 
Access to the platform name. 
 
int NumProc() const 
Returns total number of processes. 
 
std::ifstream * ifsVar
Provides a stream interface to read data from files. 
 
const MpiComm & inter0Comm() const 
Access function for MpiComm inter0-communicator. 
 
struct timeval m_timevalBegin
 
std::ofstream * m_subDisplayFile
 
This class provides a suite options one can pass to a QUESO environment. 
 
const BasicPdfsBase * basicPdfs() const 
Access to Basic PDFs. 
 
RawType_MPI_Group m_inter0Group
 
const RngBase * rngObject() const 
Access to the RNG object. 
 
bool openOutputFile(const std::string &fileName, const std::string &fileType, const std::set< unsigned int > &allowedSubEnvIds, bool writeOver, FilePtrSetStruct &filePtrSet) const 
Opens an output file for each sub-environment that was chosen to send data to the file...
 
virtual void resetSeed(int newSeed)
Resets the seed with value newSeed. 
 
unsigned int checkingLevel() const 
Access function to private attribute m_checkingLevel. 
 
Class for random number generation using GSL library. 
 
unsigned int m_displayVerbosity
Verbosity. 
 
std::string m_subDisplayFileName
Output filename for sub-screen writing. 
 
std::string subDisplayFileName() const 
Access function for m_subDisplayFileName (displays filename on stream). 
 
The QUESO MPI Communicator Class. 
 
int m_seed
Seed of the random number generator. 
 
int worldRank() const 
Returns the process world rank. 
 
TODO: Base class for basic PDFs using Gsl library. 
 
EmptyEnvironment()
Default constructor. Does nothing. 
 
unsigned int m_syncVerbosity
Synchronized verbosity. 
 
void resetIdentifyingString(const std::string &newString)
Reset private attribute m_identifyingString with the value newString. 
 
~FullEnvironment()
Destructor. 
 
RawType_MPI_Group m_subGroup
 
~EmptyEnvironment()
Destructor. 
 
BaseEnvironment(const char *passedOptionsInputFileName, EnvOptionsValues *alternativeOptionsValues)
Default constructor. 
 
void print(std::ostream &os) const 
 
Class for random number generation (base class for either GSL or Boost RNG). 
 
bool openUnifiedInputFile(const std::string &fileName, const std::string &fileType, FilePtrSetStruct &filePtrSet) const 
Opens the unified input file. 
 
bool openInputFile(const std::string &fileName, const std::string &fileType, const std::set< unsigned int > &allowedSubEnvIds, FilePtrSetStruct &filePtrSet) const 
Opens an input file.