SST  14.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

uint32_t num_threads () const
 Level of verbosity to use in the core prints using Output.verbose or Output.debug. More...
 
uint32_t num_ranks () const
 Number of ranks in the simulation.
 
const std::string & configFile () const
 Name of the SDL file to use to genearte the simulation.
 
const std::string & model_options () const
 Model options to pass to the SDL file.
 
bool print_timing () const
 Print SST timing information after the run.
 
const std::string & stop_at () const
 Simulated cycle to stop the simulation at.
 
uint32_t exit_after () const
 Wall clock time (approximiate) in seconds to stop the simulation at.
 
const std::string & partitioner () const
 Partitioner to use for parallel simulations.
 
const std::string & heartbeat_sim_period () const
 Simulation period at which to print out a "heartbeat" message.
 
uint32_t heartbeat_wall_period () const
 Wall-clock period at which to print out a "heartbeat" message.
 
const std::string & output_directory () const
 The directory to be used for writting output files.
 
const std::string output_core_prefix () const
 Prefix to use for the default SST::Output object in core.
 
const std::string & output_config_graph () const
 File to output python formatted config graph to (empty string means no output)
 
const std::string & output_json () const
 File to output json formatted config graph to (empty string means no output)
 
bool parallel_output () const
 If true, and a config graph output option is specified, write each ranks graph separately.
 
const std::string & output_dot () const
 File to output dot formatted config graph to (empty string means no output). More...
 
uint32_t dot_verbosity () const
 Level of verbosity to use for the dot output.
 
const std::string & component_partition_file () const
 File to output component partition info to (empty string means no output)
 
bool output_partition () const
 Controls whether partition info is output as part of configuration output.
 
const std::string & timeBase () const
 Core timebase to use as the atomic time unit for the simulation. More...
 
bool parallel_load () const
 Controls whether graph constuction will be done in parallel. More...
 
bool parallel_load_mode_multi () const
 If graph constuction will be done in parallel, will use a file per rank if true, and the same file for each rank if false.
 
std::string parallel_load_str () const
 Returns the string equivalent for parallel-load: NONE (if parallel load is off), SINGLE or MULTI.
 
uint32_t checkpoint_wall_period () const
 Interval at which to create a checkpoint in wall time.
 
const std::string & checkpoint_sim_period () const
 Interval at which to create a checkpoint in simulated time.
 
bool load_from_checkpoint () const
 Returns whether the simulation will begin from a checkpoint (true) or not (false).
 
const std::string & checkpoint_prefix () const
 Prefix for checkpoint filenames and directory.
 
const std::string & timeVortex () const
 TimeVortex implementation to use.
 
bool interthread_links () const
 Use links that connect directly to ActivityQueue in receiving thread.
 
const std::string & debugFile () const
 File to which core debug information should be written.
 
const std::string & enabledProfiling () const
 Library path to use for finding element libraries (will replace the libpath in the sstsimulator.conf file) More...
 
const std::string & profilingOutput () const
 Profiling points to turn on.
 
SimulationRunMode runMode () const
 Run mode to use (Init, Both, Run-only). More...
 
std::string runMode_str () const
 Get string version of runmode.
 
std::string interactive_console () const
 Get the InteractiveAction to use for interactive mode.
 
std::string interactive_start_time () const
 Get the time to start interactive mode.
 
bool rank_seq_startup () const
 Run simulation initialization stages one rank at a time for debug purposes.
 
bool enable_sig_handling () const
 Controls whether the environment variables that SST sees are printed out. More...
 
const std::string & sigusr1 () const
 SIGUSR1 handler.
 
const std::string & sigusr2 () const
 SIGUSR2 handler.
 
const std::string & sigalrm () const
 SIGALRM handler(s)
 
bool canInitiateCheckpoint ()
 Get whether or not any of the checkpoint options were turned on.
 
void print ()
 Print to stdout the current configuration.
 
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...
 
bool print_env () const
 Controls whether the environment variables that SST sees are printed out.
 
bool no_env_config () const
 
int verbose () const
 
std::string libpath () const
 
std::string addLibPath () const
 
std::string getLibPath (void) 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
 

Protected Member Functions

std::string getUsagePrelude () override
 Called to get the prelude for the help/usage message.
 
int checkArgsAfterParsing () override
 
int positionalCallback (int num, const std::string &arg)
 
- Protected Member Functions inherited from SST::ConfigShared
void addLibraryPathOptions ()
 
void addEnvironmentOptions ()
 
void addVerboseOptions (bool sdl_avail)
 
 ConfigShared (bool suppress_print, std::vector< AnnotationInfo > annotations)
 ConfigShared constructor for child classes.
 
 ConfigShared ()
 Default constructor used for serialization. More...
 
- Protected Member Functions inherited from SST::ConfigBase
 ConfigBase (bool suppress_print)
 ConfigBase constructor. More...
 
 ConfigBase ()
 Default constructor used for serialization. More...
 
 ConfigBase (bool suppress_print, std::vector< AnnotationInfo > annotations)
 
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 addOption (struct option opt, const char *argname, const char *desc, std::function< int(const char *arg)> callback, std::vector< bool > annotations, std::function< std::string(void)> ext_help=std::function< std::string(void)>())
 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)
 
void addPositionalCallback (std::function< int(int num, const char *arg)> callback)
 
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.
 

Friends

class ConfigHelper
 
class SSTModelDescription
 

Additional Inherited Members

- Static Public Member Functions inherited from SST::ConfigBase
static bool parseBoolean (const std::string &arg, bool &success, const std::string &option)
 
static uint32_t parseWallTimeToSeconds (const std::string &arg, bool &success, const std::string &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::ConfigShared
std::string libpath_ = ""
 
std::string addlibpath_ = ""
 
bool print_env_ = false
 
bool no_env_config_ = false
 
int verbose_ = 0
 

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

◆ enable_sig_handling()

bool SST::Config::enable_sig_handling ( ) const
inline

Controls whether the environment variables that SST sees are printed out.

Included in ConfigShared bool print_env() const { return print_env_; } Included in ConfigShared bool no_env_config() const { return no_env_config_; } Controls whether signal handlers are enable or not. NOTE: the sense of this variable is opposite of the command1 line option (–disable-signal-handlers)

Referenced by SST::Simulation_impl::setupSimActions().

◆ enabledProfiling()

const std::string& SST::Config::enabledProfiling ( ) const
inline

Library path to use for finding element libraries (will replace the libpath in the sstsimulator.conf file)

Included in ConfigShared const std::string& libpath() const { return libpath_; } Paths to add to library search (adds to libpath found in sstsimulator.conf file)

Included in ConfigShared const std::string& addLibPath() const { return addLibPath_; } Profiling points to turn on

Referenced by SST::Simulation_impl::createSimulation().

◆ num_threads()

uint32_t SST::Config::num_threads ( ) const
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_; } Number of threads requested

Referenced by SST::Core::DotConfigGraphOutput::generate().

◆ output_dot()

const std::string& SST::Config::output_dot ( ) const
inline

File to output dot formatted config graph to (empty string means no output).

Note, this is not a format that can be used as input for simulation

◆ parallel_load()

bool SST::Config::parallel_load ( ) const
inline

Controls whether graph constuction will be done in parallel.

If it is, then the SDL file name is modified to add the rank number to the file name right before the file extension, if parallel_load_mode_multi is true.

◆ runMode()

SimulationRunMode SST::Config::runMode ( ) const
inline

Run mode to use (Init, Both, Run-only).

Note that Run-only is not currently supported because there is not component level checkpointing.

◆ timeBase()

const std::string& SST::Config::timeBase ( ) const
inline

Core timebase to use as the atomic time unit for the simulation.

It is usually best to just leave this at the default (1ps)

Referenced by SST::Core::JSONConfigGraphOutput::generate(), and SST::Core::PythonConfigGraphOutput::generate().


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