Skip to content

Commit

Permalink
Added restart path to main()
Browse files Browse the repository at this point in the history
  • Loading branch information
feldergast committed Apr 18, 2024
1 parent 5fecace commit d9d53a4
Show file tree
Hide file tree
Showing 7 changed files with 456 additions and 403 deletions.
9 changes: 5 additions & 4 deletions src/sst/core/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ class ConfigHelper
// Set whether to load from checkpoint
static int setLoadFromCheckpoint(Config* cfg, const std::string& UNUSED(arg))
{
if ( arg == "" ) { cfg->load_from_checkpoint_ = true; }
cfg->load_from_checkpoint_ = true;
return 0;
}

Expand Down Expand Up @@ -808,9 +808,10 @@ Config::insertOptions()
"Set frequency for checkpoints to be generated (this is an approximate timing and specified in simulated "
"time.\n ",
std::bind(&ConfigHelper::setCheckpointPeriod, this, _1), true);
DEF_ARG(
"load-checkpoint", 0, "FILE", "Set file to load checkpoint from",
std::bind(&ConfigHelper::setLoadFromCheckpoint, this, _1), true);
DEF_FLAG(
"load-checkpoint", 0,
"Load checkpoint and continue simulation. Specified SDL file will be used as the checkpoint file.",
std::bind(&ConfigHelper::setLoadFromCheckpoint, this, _1), false);

enableDashDashSupport(std::bind(&ConfigHelper::setModelOptions, this, _1));
addPositionalCallback(std::bind(&Config::positionalCallback, this, _1, _2));
Expand Down
2 changes: 1 addition & 1 deletion src/sst/core/link.cc
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ Link::finalizeConfiguration()

// If we have a queue, it means we ended up having init events
// sent. No need to keep the initQueue around
if ( nullptr == pair_link->send_queue ) {
if ( nullptr != pair_link->send_queue ) {
delete pair_link->send_queue;
pair_link->send_queue = nullptr;
}
Expand Down
Loading

0 comments on commit d9d53a4

Please sign in to comment.