Skip to content

Commit

Permalink
Merge pull request #76 from unisa-hpc/fix-seg-fault-warmup-runs
Browse files Browse the repository at this point in the history
Add check for `timingResults` size when using `--warmup-run`
  • Loading branch information
Luigi-Crisci authored Feb 22, 2024
2 parents b997ed1 + 6b57c85 commit db1c70c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/time_metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ class TimeMetricsProcessor {
if(unavailableTimings.count(name) == 0) {
std::vector<double> resultsSeconds;
auto timesBegin = timingResults.at(name).begin();
if (args.warmup_run) {
// If verification is enabled and fails, only the warmup run is executed.
if (timingResults.size() > 1 && args.warmup_run) {
++timesBegin;
}
std::transform(timesBegin, timingResults.at(name).end(), std::back_inserter(resultsSeconds),
Expand Down

0 comments on commit db1c70c

Please sign in to comment.