SST  15.1.0
StructuralSimulationToolkit
SST::Config Class Reference

Class to contain SST Simulation Configuration variables. More...

#include <config.h>

Inheritance diagram for SST::Config:
SST::ConfigShared SST::Core::Serialization::serializable SST::ConfigBase SST::Core::Serialization::serializable_base

Public Member Functions

friend int ::main (int argc, char **argv)
 
 Config ()
 Default constructor.
 
int parseUsage (std::string UNUSED(arg))
 Level of verbosity to use in the core prints using Output.verbose or Output.debug. More...
 
 SST_CONFIG_DECLARE_OPTION_NOVAR (usage, std::bind(&Config::parseUsage, this, std::placeholders::_1))
 
int parseHelp (std::string arg)
 Print extended help.
 
 SST_CONFIG_DECLARE_OPTION_NOVAR (help, std::bind(&Config::parseHelp, this, std::placeholders::_1))
 
 SST_CONFIG_DECLARE_OPTION_NOVAR (version, std::bind(&Config::parseVersion, std::placeholders::_1))
 
uint32_t num_ranks () const
 
std::string parallel_load_str () const
 
std::string runMode_str () const
 Get string version of runmode.
 
bool canInitiateCheckpoint ()
 Get whether or not any of the checkpoint options were turned on.
 
void print ()
 Print to stdout the current configuration.
 
void merge_checkpoint_options (Config &other)
 
void serialize_order (SST::Core::Serialization::serializer &ser) override
 
 ImplementSerializable (SST::Config)
 
- Public Member Functions inherited from SST::ConfigShared
 ConfigShared (bool suppress_print, bool include_libpath, bool include_env, bool include_verbose)
 ConfigShared constructor that it meant to be used when needing a stand alone ConfigShared (i.e. More...
 
std::string getLibPath (bool exclude_ext_paths=false) const
 Get the library path for loading element libraries. More...
 
- Public Member Functions inherited from SST::ConfigBase
int parseCmdLine (int argc, char *argv[], bool ignore_unknown=false)
 Parse command-line arguments to update configuration values. More...
 
bool wasOptionSetOnCmdLine (const std::string &option)
 Check to see if an option was set on the command line. More...
 
- Public Member Functions inherited from SST::Core::Serialization::serializable_base
virtual const char * cls_name () const =0
 
virtual uint32_t cls_id () const =0
 
virtual std::string serialization_name () const =0
 

Static Public Member Functions

static int parseVersion (std::string UNUSED(arg))
 Print version info.
 
- Static Public Member Functions inherited from SST::ConfigBase
static uint32_t parseWallTimeToSeconds (const std::string &arg, bool &success, const std::string &option)
 Function to parse a string to wall time using one of the following formats: More...
 

Protected Member Functions

std::string getUsagePrelude () override
 Called to get the prelude for the help/usage message.
 
int checkArgsAfterParsing () override
 Function that will be called at the end of parsing so that error checking can be done.
 
int positionalCallback (int num, const std::string &arg)
 
- Protected Member Functions inherited from SST::ConfigShared
void addLibraryPathOptions ()
 
void addEnvironmentOptions ()
 
void addVerboseOptions (bool sdl_avail)
 
- Protected Member Functions inherited from SST::ConfigBase
 ConfigBase ()
 Default constructor used for serialization. More...
 
int printUsage ()
 Called to print the help/usage message.
 
int printExtHelp (const std::string &option)
 Called to print the extended help for an option.
 
void addAnnotation (const AnnotationInfo &info)
 Add an annotation available to the options.
 
void addOption (struct option opt, const char *argname, const char *desc, std::vector< bool > annotations, OptionDefinition *def)
 Add options to the Config object. More...
 
void addHeading (const char *desc)
 Adds a heading to the usage output.
 
void enableDashDashSupport (std::function< int(const char *arg)> callback)
 Enable support for everything after – to be passed to a callback. More...
 
void addPositionalCallback (std::function< int(int num, const char *arg)> callback)
 Add support for positional args. More...
 
std::string getRunName ()
 Get the name of the executable being run. More...
 
bool setOptionExternal (const std::string &entryName, const std::string &value)
 Set a configuration string to update configuration values.
 
bool getAnnotation (const std::string &entryName, char annotation)
 Get the value of an annotation for an option.
 
size_t getAnnotationIndex (char annotation)
 Get the index in the annotation vector for the given annotation.
 
void enable_printing ()
 

Friends

class SSTModelDescription
 
class Simulation_impl
 

Additional Inherited Members

- Static Public Attributes inherited from SST::ConfigBase
static std::string currently_parsing_option = ""
 Variable used to identify the currently parsing option.
 
- Static Public Attributes inherited from SST::Core::Serialization::serializable
static constexpr uint32_t NullClsId = std::numeric_limits<uint32_t>::max()
 
- Static Public Attributes inherited from SST::Core::Serialization::serializable_base
static constexpr uint32_t NullClsId = std::numeric_limits<uint32_t>::max()
 
- Protected Types inherited from SST::Core::Serialization::serializable_base
enum  cxn_flag_t { ConstructorFlag }
 
- Static Protected Member Functions inherited from SST::Core::Serialization::serializable_base
static void serializable_abort (uint32_t line, const char *file, const char *func, const char *obj)
 
- Protected Attributes inherited from SST::ConfigBase
std::vector< LongOptionoptions
 

Detailed Description

Class to contain SST Simulation Configuration variables.

NOTE: This class needs to be serialized for the sst.x executable, but not for the sst (wrapper compiled from the boot*.{h,cc} files) executable. To avoid having to compile all the serialization code into the bootstrap executable, the Config class is the first level of class hierarchy to inherit from serializable.

Member Function Documentation

◆ parseUsage()

int SST::Config::parseUsage ( std::string   UNUSEDarg)
inline

Level of verbosity to use in the core prints using Output.verbose or Output.debug.

Included in ConfigShared uint32_t verbose() const { return verbose_; } Print the usage text

References SST::ConfigBase::printUsage().


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