Skip to content

Commit e992a3f

Browse files
Merge pull request #1234 from sstsimulator/devel
Automatically Merged using SST Master Branch Merger
2 parents 6eb12f9 + 80ff4b9 commit e992a3f

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

src/sst/core/main.cc

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,8 @@ start_graph_creation(
293293
}
294294
}
295295

296-
297296
// Create the model generator
298-
SSTModelDescription* modelGen = nullptr;
297+
std::unique_ptr<SSTModelDescription> modelGen;
299298

300299
force_rank_sequential_start(cfg.rank_seq_startup(), myRank, world_size);
301300

@@ -320,8 +319,8 @@ start_graph_creation(
320319
}
321320

322321
if ( myRank.rank == 0 || cfg.parallel_load() ) {
323-
modelGen = factory->Create<SSTModelDescription>(
324-
model_name, cfg.configFile(), cfg.verbose(), &cfg, sst_get_cpu_time());
322+
modelGen.reset(factory->Create<SSTModelDescription>(
323+
model_name, cfg.configFile(), cfg.verbose(), &cfg, sst_get_cpu_time()));
325324
}
326325
}
327326

@@ -357,12 +356,6 @@ start_graph_creation(
357356
}
358357
#endif
359358

360-
// Delete the model generator
361-
if ( modelGen ) {
362-
delete modelGen;
363-
modelGen = nullptr;
364-
}
365-
366359
return start_graph_gen;
367360
}
368361

src/sst/core/statapi/statnull.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class NullStatisticBase<T, true> : public Statistic<T>
5151

5252
void addData_impl_Ntimes(uint64_t UNUSED(N), T UNUSED(data)) override {}
5353

54-
virtual const std::string& getStatTypeName() const { return stat_type_; }
54+
virtual const std::string& getStatTypeName() const override { return stat_type_; }
5555

5656
private:
5757
inline static const std::string stat_type_ = "NULL";
@@ -70,7 +70,7 @@ class NullStatisticBase<std::tuple<Args...>, false> : public Statistic<std::tupl
7070

7171
void addData_impl_Ntimes(uint64_t UNUSED(N), Args... UNUSED(data)) override {}
7272

73-
virtual const std::string& getStatTypeName() const { return stat_type_; }
73+
virtual const std::string& getStatTypeName() const override { return stat_type_; }
7474

7575
private:
7676
inline static const std::string stat_type_ = "NULL";
@@ -91,7 +91,7 @@ class NullStatisticBase<T, false> : public Statistic<T>
9191
void addData_impl_Ntimes(uint64_t UNUSED(N), T&& UNUSED(data)) override {}
9292
void addData_impl_Ntimes(uint64_t UNUSED(N), const T& UNUSED(data)) override {}
9393

94-
virtual const std::string& getStatTypeName() const { return stat_type_; }
94+
virtual const std::string& getStatTypeName() const override { return stat_type_; }
9595

9696
private:
9797
inline static const std::string stat_type_ = "NULL";
@@ -164,7 +164,7 @@ class NullStatistic<void> : public Statistic<void>
164164

165165
virtual std::string getELIName() const override { return "sst.NullStatistic"; }
166166

167-
virtual const std::string& getStatTypeName() const { return stat_type_; }
167+
virtual const std::string& getStatTypeName() const override { return stat_type_; }
168168

169169
private:
170170
inline static const std::string stat_type_ = "NULL";

0 commit comments

Comments
 (0)