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_; }
182 const std::string&
output_dot()
const {
return output_dot_; }
206 const std::string&
timeBase()
const {
return timeBase_; }
229 if ( !parallel_load_ )
return "NONE";
230 if ( parallel_load_mode_multi_ )
return "MULTI";
256 const std::string&
timeVortex()
const {
return timeVortex_; }
268 bool cache_align_mempools()
const {
return cache_align_mempools_; }
273 const std::string&
debugFile()
const {
return debugFile_; }
310 SimulationRunMode
runMode()
const {
return runMode_; }
317 switch ( runMode_ ) {
318 case SimulationRunMode::INIT:
320 case SimulationRunMode::RUN:
322 case SimulationRunMode::BOTH:
324 case SimulationRunMode::UNKNOWN:
349 const std::string& event_dump_file()
const {
return event_dump_file_; }
383 const std::string&
sigusr1()
const {
return sigusr1_; }
388 const std::string&
sigusr2()
const {
return sigusr2_; }
393 const std::string&
sigalrm()
const {
return sigalrm_; }
415 ser& heartbeat_wall_period_;
416 ser& heartbeat_sim_period_;
417 ser& output_directory_;
418 ser& output_core_prefix_;
420 ser& output_config_graph_;
422 ser& parallel_output_;
426 ser& component_partition_file_;
427 ser& output_partition_;
431 ser& parallel_load_mode_multi_;
433 ser& interthread_links_;
435 ser& cache_align_mempools_;
440 ser& enabled_profiling_;
441 ser& profiling_output_;
443 ser& interactive_console_;
444 ser& interactive_start_time_;
446 ser& event_dump_file_;
448 ser& load_from_checkpoint_;
449 ser& checkpoint_wall_period_;
450 ser& checkpoint_sim_period_;
451 ser& checkpoint_prefix_;
453 ser& enable_sig_handling_;
464 int checkArgsAfterParsing()
override;
465 int positionalCallback(
int num,
const std::string& arg);
470 std::string run_name;
475 void insertOptions();
477 bool isFileNameOnly(
const std::string& name)
479 bool nameOnly =
true;
481 for (
size_t i = 0; i < name.size(); ++i ) {
482 if (
'/' == name[i] ) {
502 uint32_t num_threads_;
503 std::string configFile_;
504 std::string model_options_;
506 std::string stop_at_;
507 uint32_t exit_after_;
508 std::string partitioner_;
509 std::string heartbeat_sim_period_;
510 uint32_t heartbeat_wall_period_;
511 std::string output_directory_;
512 std::string output_core_prefix_;
515 std::string output_config_graph_;
516 std::string output_json_;
517 bool parallel_output_;
520 std::string output_dot_;
521 uint32_t dot_verbosity_;
522 std::string component_partition_file_;
523 bool output_partition_;
526 std::string timeBase_;
528 bool parallel_load_mode_multi_;
529 std::string timeVortex_;
530 bool interthread_links_;
532 bool cache_align_mempools_;
534 std::string debugFile_;
539 std::string enabled_profiling_;
540 std::string profiling_output_;
543 SimulationRunMode runMode_;
544 std::string interactive_console_;
545 std::string interactive_start_time_;
547 std::string event_dump_file_;
549 bool rank_seq_startup_;
552 bool load_from_checkpoint_;
553 std::string checkpoint_sim_period_;
555 checkpoint_wall_period_;
556 std::string checkpoint_prefix_;
557 std::string checkpoint_directory_;
560 bool enable_sig_handling_;
561 std::string sigusr1_;
562 std::string sigusr2_;
563 std::string sigalrm_;
570 #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:296
uint32_t heartbeat_wall_period() const
Wall-clock period at which to print out a "heartbeat" message.
Definition: config.h:142
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:43
bool enable_sig_handling() const
Controls whether the environment variables that SST sees are printed out.
Definition: config.h:378
uint32_t dot_verbosity() const
Level of verbosity to use for the dot output.
Definition: config.h:187
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:251
uint32_t checkpoint_wall_period() const
Interval at which to create a checkpoint in wall time.
Definition: config.h:237
const std::string & profilingOutput() const
Profiling points to turn on.
Definition: config.h:301
bool parallel_load() const
Controls whether graph constuction will be done in parallel.
Definition: config.h:214
bool parallel_output() const
If true, and a config graph output option is specified, write each ranks graph separately.
Definition: config.h:172
const std::string output_core_prefix() const
Prefix to use for the default SST::Output object in core.
Definition: config.h:152
bool canInitiateCheckpoint()
Get whether or not any of the checkpoint options were turned on.
Definition: config.cc:1159
const std::string & checkpoint_sim_period() const
Interval at which to create a checkpoint in simulated time.
Definition: config.h:241
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:182
bool output_partition() const
Controls whether partition info is output as part of configuration output.
Definition: config.h:197
const std::string & timeVortex() const
TimeVortex implementation to use.
Definition: config.h:256
const std::string & component_partition_file() const
File to output component partition info to (empty string means no output)
Definition: config.h:192
SimulationRunMode runMode() const
Run mode to use (Init, Both, Run-only).
Definition: config.h:310
Definition: serializable.h:24
const std::string & heartbeat_sim_period() const
Simulation period at which to print out a "heartbeat" message.
Definition: config.h:137
const std::string & stop_at() const
Simulated cycle to stop the simulation at.
Definition: config.h:122
const std::string & sigusr1() const
SIGUSR1 handler.
Definition: config.h:383
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:166
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:261
std::string runMode_str() const
Get string version of runmode.
Definition: config.h:315
const std::string & output_config_graph() const
File to output python formatted config graph to (empty string means no output)
Definition: config.h:160
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:221
const std::string & debugFile() const
File to which core debug information should be written.
Definition: config.h:273
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:227
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:680
uint32_t num_threads() const
Level of verbosity to use in the core prints using Output.verbose or Output.debug.
Definition: config.h:97
std::string interactive_start_time() const
Get the time to start interactive mode.
Definition: config.h:338
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:147
std::string interactive_console() const
Get the InteractiveAction to use for interactive mode.
Definition: config.h:333
const std::string & sigusr2() const
SIGUSR2 handler.
Definition: config.h:388
const std::string & sigalrm() const
SIGALRM handler(s)
Definition: config.h:393
const std::string & timeBase() const
Core timebase to use as the atomic time unit for the simulation.
Definition: config.h:206
std::string getUsagePrelude() override
Called to get the prelude for the help/usage message.
Definition: config.cc:1088
bool load_from_checkpoint() const
Returns whether the simulation will begin from a checkpoint (true) or not (false).
Definition: config.h:246
bool rank_seq_startup() const
Run simulation initialization stages one rank at a time for debug purposes.
Definition: config.h:356
ConfigShared()
Default constructor used for serialization.
Definition: configShared.h:59
const std::string & partitioner() const
Partitioner to use for parallel simulations.
Definition: config.h:132