12 #ifndef SST_CORE_CONFIG_H 13 #define SST_CORE_CONFIG_H 15 #include "sst/core/configShared.h" 16 #include "sst/core/serialization/serializable.h" 17 #include "sst/core/sst_types.h" 22 extern int main(
int argc,
char** argv);
28 class SSTModelDescription;
43 friend int ::main(
int argc,
char** argv);
65 bool checkConfigFile();
70 bool setOptionFromModel(
const std::string& entryName,
const std::string& value);
107 const std::string&
configFile()
const {
return configFile_; }
122 const std::string&
stop_at()
const {
return stop_at_; }
177 const std::string&
output_dot()
const {
return output_dot_; }
201 const std::string&
timeBase()
const {
return timeBase_; }
224 if ( !parallel_load_ )
return "NONE";
225 if ( parallel_load_mode_multi_ )
return "MULTI";
232 const std::string&
timeVortex()
const {
return timeVortex_; }
244 bool cache_align_mempools()
const {
return cache_align_mempools_; }
249 const std::string&
debugFile()
const {
return debugFile_; }
286 SimulationRunMode
runMode()
const {
return runMode_; }
293 switch ( runMode_ ) {
294 case SimulationRunMode::INIT:
296 case SimulationRunMode::RUN:
298 case SimulationRunMode::BOTH:
300 case SimulationRunMode::UNKNOWN:
315 const std::string& event_dump_file()
const {
return event_dump_file_; }
363 ser& heartbeatPeriod_;
364 ser& output_directory_;
365 ser& output_core_prefix_;
367 ser& output_config_graph_;
369 ser& parallel_output_;
373 ser& component_partition_file_;
374 ser& output_partition_;
378 ser& parallel_load_mode_multi_;
380 ser& interthread_links_;
382 ser& cache_align_mempools_;
387 ser& enabled_profiling_;
388 ser& profiling_output_;
391 ser& event_dump_file_;
395 ser& enable_sig_handling_;
402 int checkArgsAfterParsing()
override;
403 int positionalCallback(
int num,
const std::string& arg);
408 std::string run_name;
413 void insertOptions();
415 bool isFileNameOnly(
const std::string& name)
417 bool nameOnly =
true;
419 for (
size_t i = 0; i < name.size(); ++i ) {
420 if (
'/' == name[i] ) {
440 uint32_t num_threads_;
441 std::string configFile_;
442 std::string model_options_;
444 std::string stop_at_;
445 uint32_t exit_after_;
446 std::string partitioner_;
447 std::string heartbeatPeriod_;
448 std::string output_directory_;
449 std::string output_core_prefix_;
452 std::string output_config_graph_;
453 std::string output_json_;
454 bool parallel_output_;
457 std::string output_dot_;
458 uint32_t dot_verbosity_;
459 std::string component_partition_file_;
460 bool output_partition_;
463 std::string timeBase_;
465 bool parallel_load_mode_multi_;
466 std::string timeVortex_;
467 bool interthread_links_;
469 bool cache_align_mempools_;
471 std::string debugFile_;
476 std::string enabled_profiling_;
477 std::string profiling_output_;
480 SimulationRunMode runMode_;
482 std::string event_dump_file_;
484 bool rank_seq_startup_;
487 bool enable_sig_handling_;
494 #endif // SST_CORE_CONFIG_H const std::string & enabledProfiling() const
Library path to use for finding element libraries (will replace the libpath in the sstsimulator...
Definition: config.h:272
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:34
bool enable_sig_handling() const
Controls whether the environment variables that SST sees are printed out.
Definition: config.h:344
uint32_t dot_verbosity() const
Level of verbosity to use for the dot output.
Definition: config.h:182
uint32_t exit_after() const
Wall clock time (approximiate) in seconds to stop the simulation at.
Definition: config.h:127
Class to contain SST Simulation Configuration variables.
Definition: config.h:38
const std::string & profilingOutput() const
Profiling points to turn on.
Definition: config.h:277
bool parallel_load() const
Controls whether graph constuction will be done in parallel.
Definition: config.h:209
const std::string & heartbeatPeriod() const
Simulation period at which to print out a "heartbeat" message.
Definition: config.h:137
bool parallel_output() const
If true, and a config graph output option is specified, write each ranks graph separately.
Definition: config.h:167
const std::string output_core_prefix() const
Prefix to use for the default SST::Output object in core.
Definition: config.h:147
Class to contain SST Simulation Configuration variables.
Definition: configShared.h:33
const std::string & output_dot() const
File to output dot formatted config graph to (empty string means no output).
Definition: config.h:177
bool output_partition() const
Controls whether partition info is output as part of configuration output.
Definition: config.h:192
const std::string & timeVortex() const
TimeVortex implementation to use.
Definition: config.h:232
const std::string & component_partition_file() const
File to output component partition info to (empty string means no output)
Definition: config.h:187
SimulationRunMode runMode() const
Run mode to use (Init, Both, Run-only).
Definition: config.h:286
Definition: serializable.h:118
const std::string & stop_at() const
Simulated cycle to stop the simulation at.
Definition: config.h:122
uint32_t num_ranks() const
Number of ranks in the simulation.
Definition: config.h:102
const std::string & output_json() const
File to output json formatted config graph to (empty string means no output)
Definition: config.h:161
bool print_timing() const
Print SST timing information after the run.
Definition: config.h:117
const std::string & configFile() const
Name of the SDL file to use to genearte the simulation.
Definition: config.h:107
bool interthread_links() const
Use links that connect directly to ActivityQueue in receiving thread.
Definition: config.h:237
std::string runMode_str() const
Get string version of runmode.
Definition: config.h:291
const std::string & output_config_graph() const
File to output python formatted config graph to (empty string means no output)
Definition: config.h:155
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 fo...
Definition: config.h:216
const std::string & debugFile() const
File to which core debug information should be written.
Definition: config.h:249
std::string parallel_load_str() const
Retruns the string equivalent for parallel-load: NONE (if parallel load is off), SINGLE or MULTI...
Definition: config.h:222
const std::string & model_options() const
Model options to pass to the SDL file.
Definition: config.h:112
void print()
Print to stdout the current configuration.
Definition: config.cc:409
uint32_t num_threads() const
Level of verbosity to use in the core prints using Output.verbose or Output.debug.
Definition: config.h:97
Base class for Model Generation.
Definition: sstmodel.h:25
const std::string & output_directory() const
The directory to be used for writting output files.
Definition: config.h:142
const std::string & timeBase() const
Core timebase to use as the atomic time unit for the simulation.
Definition: config.h:201
std::string getUsagePrelude() override
Called to get the prelude for the help/usage message.
Definition: config.cc:720
bool rank_seq_startup() const
Run simulation initialization stages one rank at a time for debug purposes.
Definition: config.h:322
ConfigShared()
Default constructor used for serialization.
Definition: configShared.h:59
const std::string & partitioner() const
Partitioner to use for parallel simualations.
Definition: config.h:132