Skip to content

Commit

Permalink
#991: Norm Model: Fix to actually loop over subphases, rather than re…
Browse files Browse the repository at this point in the history
…peatedly over WHOLE_PHASE
  • Loading branch information
PhilMiller committed Aug 31, 2020
1 parent 0e91408 commit 20c9288
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/vt/vrt/collection/balance/model/norm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ TimeType Norm::getWork(ElementIDType object, PhaseOffset offset)
double sum = 0.0;

for (int i = 0; i < getNumSubphases(); ++i) {
offset.subphase = i;
auto t = ComposedModel::getWork(object, offset);
sum += std::pow(t, power_);
}
Expand All @@ -75,6 +76,7 @@ TimeType Norm::getWork(ElementIDType object, PhaseOffset offset)
double max = 0.0;

for (int i = 0; i < getNumSubphases(); ++i) {
offset.subphase = i;
auto t = ComposedModel::getWork(object, offset);
max = std::max(max, t);
}
Expand Down

0 comments on commit 20c9288

Please sign in to comment.