12 #ifndef SST_CORE_CONFIG_H
13 #define SST_CORE_CONFIG_H
15 #include "sst/core/env/envconfig.h"
16 #include "sst/core/env/envquery.h"
17 #include "sst/core/rankInfo.h"
18 #include "sst/core/serialization/serializable.h"
19 #include "sst/core/simulation.h"
20 #include "sst/core/sst_types.h"
87 std::string event_dump_file;
90 typedef bool (
Config::*flagFunction)(void);
91 typedef bool (
Config::*argFunction)(
const std::string& arg);
100 bool setVerbosity(
const std::string& arg);
101 bool disableSigHandlers()
106 bool disableEnvConfig()
111 bool enablePrintTiming()
116 bool enablePrintEnv()
122 bool setConfigFile(
const std::string& arg);
123 bool setDebugFile(
const std::string& arg);
124 bool setLibPath(
const std::string& arg);
125 bool addLibPath(
const std::string& arg);
126 bool setRunMode(
const std::string& arg);
127 bool setStopAt(
const std::string& arg);
128 bool setStopAfter(
const std::string& arg);
129 bool setHeartbeat(
const std::string& arg);
130 bool setTimebase(
const std::string& arg);
131 bool setPartitioner(
const std::string& arg);
132 bool setTimeVortex(
const std::string& arg);
133 bool setInterThreadLinks(
const std::string& arg);
134 bool setOutputDir(
const std::string& arg);
135 bool setWriteConfig(
const std::string& arg);
136 bool setWriteDot(
const std::string& arg);
137 bool setDotVerbosity(
const std::string& arg);
138 bool setWriteXML(
const std::string& arg);
139 bool setWriteJSON(
const std::string& arg);
140 bool setWritePartition(
const std::string& arg);
141 bool setOutputPrefix(
const std::string& arg);
143 bool setWriteUndeleted(
const std::string& arg);
145 bool setModelOptions(
const std::string& arg);
146 bool setNumThreads(
const std::string& arg);
153 std::cout <<
"debugFile = " <<
debugFile << std::endl;
154 std::cout <<
"runMode = " <<
runMode << std::endl;
155 std::cout <<
"libpath = " <<
getLibPath() << std::endl;
156 std::cout <<
"configFile = " <<
configFile << std::endl;
157 std::cout <<
"stopAtCycle = " <<
stopAtCycle << std::endl;
158 std::cout <<
"stopAfterSec = " <<
stopAfterSec << std::endl;
159 std::cout <<
"timeBase = " <<
timeBase << std::endl;
160 std::cout <<
"partitioner = " <<
partitioner << std::endl;
162 std::cout <<
"output_dot = " <<
output_dot << std::endl;
163 std::cout <<
"dot_verbosity = " <<
dot_verbosity << std::endl;
164 std::cout <<
"output_xml = " <<
output_xml << std::endl;
165 std::cout <<
"no_env_config = " <<
no_env_config << std::endl;
167 std::cout <<
"output_json = " <<
output_json << std::endl;
168 std::cout <<
"model_options = " <<
model_options << std::endl;
169 std::cout <<
"num_threads = " << world_size.thread << std::endl;
172 std::cout <<
"print_timing=" <<
print_timing << std::endl;
173 std::cout <<
"print_env" <<
print_env << std::endl;
179 uint32_t getNumRanks() {
return world_size.rank; }
180 uint32_t getNumThreads() {
return world_size.thread; }
181 uint32_t setNumThreads(uint32_t nthr)
183 uint32_t old = world_size.thread;
184 world_size.thread = nthr;
214 std::string run_name;
216 std::string addlLibPath;
221 bool isFileNameOnly(
const std::string& name)
223 bool nameOnly =
true;
225 for (
size_t i = 0; i < name.size(); ++i ) {
226 if (
'/' == name[i] ) {
240 #endif // SST_CORE_CONFIG_H
RankInfo world_size
Definition: config.h:79
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:34
uint32_t stopAfterSec
Definition: config.h:63
std::string partitioner
Definition: config.h:66
bool print_env
Definition: config.h:84
std::string timeVortex
Definition: config.h:67
Class to contain SST Simulation Configuration variables.
Definition: config.h:29
std::string heartbeatPeriod
Definition: config.h:64
bool inter_thread_links
Definition: config.h:68
std::string output_core_prefix
Definition: config.h:77
int parseCmdLine(int argc, char *argv[])
Parse command-line arguments to update configuration values.
Definition: config.cc:245
bool setConfigEntryFromModel(const std::string &entryName, const std::string &value)
Set a configuration string to update configuration values.
Definition: config.cc:346
Simulation::Mode_t runMode
Definition: config.h:60
uint32_t dot_verbosity
Definition: config.h:71
std::string output_config_graph
Definition: config.h:69
uint32_t getVerboseLevel()
Return the current Verbosity level.
Definition: config.cc:637
std::string output_dot
Definition: config.h:70
Definition: serializable.h:118
uint32_t verbose
Definition: config.h:80
std::string timeBase
Definition: config.h:65
bool no_env_config
Definition: config.h:81
std::string model_options
Definition: config.h:75
std::string output_xml
Definition: config.h:72
std::string output_directory
Definition: config.h:74
Definition: rankInfo.h:21
std::string output_json
Definition: config.h:73
void print()
Print to stdout the current configuration.
Definition: config.h:151
bool printTimingInfo()
Print the SST core timing information.
Definition: config.cc:631
std::string debugFile
Definition: config.h:59
std::string getLibPath(void) const
Return the library search path.
Definition: config.cc:643
std::string dump_component_graph_file
Definition: config.h:76
std::string configFile
Definition: config.h:61
std::string stopAtCycle
Definition: config.h:62
bool enable_sig_handling
Definition: config.h:82
Mode_t
Type of Run Modes.
Definition: simulation.h:39
void Print()
Print the current configuration to stdout.
bool print_timing
Definition: config.h:83