queso-0.53.0
|
This class sets up the full environment underlying the use of the QUESO library by an executable. More...
#include <Environment.h>
Public Member Functions | |
Constructor/Destructor methods | |
FullEnvironment (RawType_MPI_Comm inputComm, const char *passedOptionsInputFileName, const char *prefix, EnvOptionsValues *alternativeOptionsValues) | |
Default constructor. More... | |
~FullEnvironment () | |
Destructor. More... | |
I/O methods | |
void | print (std::ostream &os) const |
Sends the environment options to the stream. More... | |
Public Member Functions inherited from QUESO::BaseEnvironment | |
BaseEnvironment (const char *passedOptionsInputFileName, EnvOptionsValues *alternativeOptionsValues) | |
Default constructor. More... | |
virtual | ~BaseEnvironment () |
Destructor. More... | |
bool | fullEnvIsReady () const |
Returns whether the full environment class is ready (constructor has successfully been called). More... | |
int | worldRank () const |
Returns the process world rank. More... | |
int | fullRank () const |
Returns the process full rank. More... | |
const MpiComm & | fullComm () const |
Access function for MpiComm full communicator. More... | |
RawType_MPI_Group | subGroup () const |
Access function for sub-group. More... | |
int | subRank () const |
Access function for sub-rank. More... | |
const MpiComm & | subComm () const |
Access function for MpiComm sub communicator. More... | |
const MpiComm & | selfComm () const |
Access function for MpiComm self-communicator. More... | |
int | inter0Rank () const |
Returns the process inter0 rank. More... | |
const MpiComm & | inter0Comm () const |
Access function for MpiComm inter0-communicator. More... | |
std::ofstream * | subDisplayFile () const |
Access function for m_subDisplayFile (displays file on stream). More... | |
std::string | subDisplayFileName () const |
Access function for m_subDisplayFileName (displays filename on stream). More... | |
unsigned int | numSubEnvironments () const |
Access function to the number of sub-environments. More... | |
unsigned int | subId () const |
Access function to the number of each sub-environment Id: m_subId. More... | |
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. More... | |
void | checkTheParallelEnvironment () const |
std::string | optionsInputFileName () const |
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the user to QUESO. More... | |
void | setOptionsInputFileAccessState (bool newState) const |
boost::program_options::variables_map & | allOptionsMap () const |
void | scanInputFileForMyOptions (const boost::program_options::options_description &optionsDesc) const |
This method scans the input file provided by the user to QUESO. More... | |
unsigned int | displayVerbosity () const |
unsigned int | syncVerbosity () const |
Access function to private attribute m_syncVerbosity. More... | |
unsigned int | checkingLevel () const |
Access function to private attribute m_checkingLevel. More... | |
const RngBase * | rngObject () const |
Access to the RNG object. More... | |
void | resetSeed (int newSeedOption) |
Reset RNG seed. More... | |
int | seed () const |
Access to the RNG seed. More... | |
const BasicPdfsBase * | basicPdfs () const |
Access to Basic PDFs. More... | |
std::string | platformName () const |
Access to the platform name. More... | |
std::string | identifyingString () const |
Access function to private attribute m_identifyingString: identifying string. More... | |
void | resetIdentifyingString (const std::string &newString) |
Reset private attribute m_identifyingString with the value newString . More... | |
bool | isThereInputFile () const |
//TODO Not implemented? it is called in examples/validationCycle/tests_old/results_5_25/uqTgaEx4.h. More... | |
struct timeval | timevalBegin () const |
Used to save the time when the combo `QUESO+user's application' started to run. More... | |
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. More... | |
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. More... | |
bool | openInputFile (const std::string &fileName, const std::string &fileType, const std::set< unsigned int > &allowedSubEnvIds, FilePtrSetStruct &filePtrSet) const |
Opens an input file. More... | |
bool | openUnifiedInputFile (const std::string &fileName, const std::string &fileType, FilePtrSetStruct &filePtrSet) const |
Opens the unified input file. More... | |
void | closeFile (FilePtrSetStruct &filePtrSet, const std::string &fileType) const |
Closes the file. More... | |
void | setExceptionalCircumstance (bool value) const |
Set an exceptional circumstance. More... | |
bool | exceptionalCircumstance () const |
Decides whether there is an exceptional circumstance. More... | |
Private Member Functions | |
void | readOptionsInputFile () |
Checks the options input file and reads the options. More... | |
Additional Inherited Members | |
Protected Attributes inherited from QUESO::BaseEnvironment | |
bool | m_fullEnvIsReady |
int | m_worldRank |
MpiComm * | m_fullComm |
int | m_fullRank |
int | m_fullCommSize |
RawType_MPI_Group | m_fullGroup |
std::string | m_optionsInputFileName |
bool | m_optionsInputFileAccessState |
boost::program_options::options_description * | m_allOptionsDesc |
boost::program_options::variables_map * | m_allOptionsMap |
unsigned int | m_subId |
std::string | m_subIdString |
RawType_MPI_Group | m_subGroup |
MpiComm * | m_subComm |
int | m_subRank |
int | m_subCommSize |
MpiComm * | m_selfComm |
RawType_MPI_Group | m_inter0Group |
MpiComm * | m_inter0Comm |
int | m_inter0Rank |
int | m_inter0CommSize |
std::ofstream * | m_subDisplayFile |
RngBase * | m_rngObject |
BasicPdfsBase * | m_basicPdfs |
struct timeval | m_timevalBegin |
bool | m_exceptionalCircumstance |
EnvOptionsValues * | m_optionsObj |
This class sets up the full environment underlying the use of the QUESO library by an executable.
This is the class that is actually used during a QUESO+application run.
Definition at line 416 of file Environment.h.
QUESO::FullEnvironment::FullEnvironment | ( | RawType_MPI_Comm | inputComm, |
const char * | passedOptionsInputFileName, | ||
const char * | prefix, | ||
EnvOptionsValues * | alternativeOptionsValues | ||
) |
Default constructor.
It initializes the full communicator, reads the options, deals with multiple sub-environments, e.g. dealing with sub/self/inter0-communicators, handles path for output files.
Definition at line 1107 of file Environment.C.
References QUESO::MpiComm::Barrier(), QUESO::CheckFilePath(), QUESO::MpiComm::Comm(), QUESO::BaseEnvironment::displayVerbosity(), QUESO::BaseEnvironment::fullComm(), QUESO::BaseEnvironment::m_allOptionsDesc, QUESO::BaseEnvironment::m_allOptionsMap, QUESO::BaseEnvironment::m_basicPdfs, QUESO::BaseEnvironment::m_fullComm, QUESO::BaseEnvironment::m_fullCommSize, QUESO::BaseEnvironment::m_fullEnvIsReady, QUESO::BaseEnvironment::m_fullGroup, QUESO::BaseEnvironment::m_fullRank, QUESO::EnvOptionsValues::m_help, QUESO::BaseEnvironment::m_inter0Comm, QUESO::BaseEnvironment::m_inter0CommSize, QUESO::BaseEnvironment::m_inter0Group, QUESO::BaseEnvironment::m_inter0Rank, QUESO::EnvOptionsValues::m_numSubEnvironments, QUESO::BaseEnvironment::m_optionsInputFileName, QUESO::BaseEnvironment::m_optionsObj, QUESO::BaseEnvironment::m_rngObject, QUESO::EnvOptionsValues::m_rngType, QUESO::EnvOptionsValues::m_seed, QUESO::BaseEnvironment::m_selfComm, QUESO::BaseEnvironment::m_subComm, QUESO::BaseEnvironment::m_subCommSize, QUESO::EnvOptionsValues::m_subDisplayAllowAll, QUESO::EnvOptionsValues::m_subDisplayAllowedSet, QUESO::EnvOptionsValues::m_subDisplayAllowInter0, QUESO::BaseEnvironment::m_subDisplayFile, QUESO::EnvOptionsValues::m_subDisplayFileName, QUESO::BaseEnvironment::m_subGroup, QUESO::BaseEnvironment::m_subId, QUESO::BaseEnvironment::m_subIdString, QUESO::BaseEnvironment::m_subRank, QUESO::BaseEnvironment::m_timevalBegin, QUESO::BaseEnvironment::m_worldRank, QUESO::MpiComm::MyPID(), QUESO::MpiComm::NumProc(), QUESO::old_terminate_handler, queso_error_msg, queso_require_equal_to_msg, queso_require_greater_equal_msg, queso_require_msg, QUESO::queso_terminate_handler(), QUESO::QUESO_version_print(), RawValue_MPI_COMM_SELF, readOptionsInputFile(), and UQ_ENV_FILENAME_FOR_NO_OUTPUT_FILE.
QUESO::FullEnvironment::~FullEnvironment | ( | ) |
|
virtual |
Sends the environment options to the stream.
Implements QUESO::BaseEnvironment.
Definition at line 1372 of file Environment.C.
|
private |
Checks the options input file and reads the options.
Definition at line 1401 of file Environment.C.
References QUESO::BaseEnvironment::m_fullRank, QUESO::BaseEnvironment::m_optionsInputFileName, and queso_error.
Referenced by FullEnvironment().