Skip to content

Commit db1c70c

Browse files
authored
Merge pull request #76 from unisa-hpc/fix-seg-fault-warmup-runs
Add check for `timingResults` size when using `--warmup-run`
2 parents b997ed1 + 6b57c85 commit db1c70c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: include/time_metrics.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ class TimeMetricsProcessor {
7676
if(unavailableTimings.count(name) == 0) {
7777
std::vector<double> resultsSeconds;
7878
auto timesBegin = timingResults.at(name).begin();
79-
if (args.warmup_run) {
79+
// If verification is enabled and fails, only the warmup run is executed.
80+
if (timingResults.size() > 1 && args.warmup_run) {
8081
++timesBegin;
8182
}
8283
std::transform(timesBegin, timingResults.at(name).end(), std::back_inserter(resultsSeconds),

0 commit comments

Comments
 (0)