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";
247 const std::string&
timeVortex()
const {
return timeVortex_; }
259 bool cache_align_mempools()
const {
return cache_align_mempools_; }
264 const std::string&
debugFile()
const {
return debugFile_; }
301 SimulationRunMode
runMode()
const {
return runMode_; }
308 switch ( runMode_ ) {
309 case SimulationRunMode::INIT:
311 case SimulationRunMode::RUN:
313 case SimulationRunMode::BOTH:
315 case SimulationRunMode::UNKNOWN:
330 const std::string& event_dump_file()
const {
return event_dump_file_; }
378 ser& heartbeat_period_;
379 ser& output_directory_;
380 ser& output_core_prefix_;
382 ser& output_config_graph_;
384 ser& parallel_output_;
388 ser& component_partition_file_;
389 ser& output_partition_;
393 ser& parallel_load_mode_multi_;
395 ser& interthread_links_;
397 ser& cache_align_mempools_;
402 ser& enabled_profiling_;
403 ser& profiling_output_;
406 ser& event_dump_file_;
408 ser& load_from_checkpoint_;
409 ser& checkpoint_period_;
410 ser& checkpoint_prefix_;
413 ser& enable_sig_handling_;
420 int checkArgsAfterParsing()
override;
421 int positionalCallback(
int num,
const std::string& arg);
426 std::string run_name;
431 void insertOptions();
433 bool isFileNameOnly(
const std::string& name)
435 bool nameOnly =
true;
437 for (
size_t i = 0; i < name.size(); ++i ) {
438 if (
'/' == name[i] ) {
458 uint32_t num_threads_;
459 std::string configFile_;
460 std::string model_options_;
462 std::string stop_at_;
463 uint32_t exit_after_;
464 std::string partitioner_;
465 std::string heartbeat_period_;
466 std::string output_directory_;
467 std::string output_core_prefix_;
470 std::string output_config_graph_;
471 std::string output_json_;
472 bool parallel_output_;
475 std::string output_dot_;
476 uint32_t dot_verbosity_;
477 std::string component_partition_file_;
478 bool output_partition_;
481 std::string timeBase_;
483 bool parallel_load_mode_multi_;
484 std::string timeVortex_;
485 bool interthread_links_;
487 bool cache_align_mempools_;
489 std::string debugFile_;
494 std::string enabled_profiling_;
495 std::string profiling_output_;
498 SimulationRunMode runMode_;
500 std::string event_dump_file_;
502 bool rank_seq_startup_;
505 bool load_from_checkpoint_;
506 std::string checkpoint_period_;
507 std::string checkpoint_prefix_;
508 std::string checkpoint_directory_;
511 bool enable_sig_handling_;
518 #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:287
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:35
const std::string & heartbeat_period() const
Simulation period at which to print out a "heartbeat" message.
Definition: config.h:137
bool enable_sig_handling() const
Controls whether the environment variables that SST sees are printed out.
Definition: config.h:359
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 & checkpoint_prefix() const
Prefix for checkpoint filenames and directory.
Definition: config.h:242
const std::string & profilingOutput() const
Profiling points to turn on.
Definition: config.h:292
bool parallel_load() const
Controls whether graph constuction will be done in parallel.
Definition: config.h:209
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:247
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:301
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:252
std::string runMode_str() const
Get string version of runmode.
Definition: config.h:306
const std::string & output_config_graph() const
File to output python formatted config graph to (empty string means no output)
Definition: config.h:155
const std::string & checkpoint_period() const
Simulation period at which to create a checkpoint.
Definition: config.h:232
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:264
std::string parallel_load_str() const
Returns 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:492
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:834
bool load_from_checkpoint() const
Returns whether the simulation will begin from a checkpoint (true) or not (false).
Definition: config.h:237
bool rank_seq_startup() const
Run simulation initialization stages one rank at a time for debug purposes.
Definition: config.h:337
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