Skip to content

Commit

Permalink
#1835: split modeled comm proportionally when using subphases
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed Jun 2, 2022
1 parent c1b5f62 commit f4bb6aa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/vt/vrt/collection/balance/model/raw_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,14 @@ TimeType RawData::getModeledComm(ElementIDStruct object, PhaseOffset when) {
}
}

// TODO: consider subphases (?)
return std::max(incoming, outgoing);
auto modeled_comm = std::max(incoming, outgoing);
if (when.subphase == PhaseOffset::WHOLE_PHASE) {
return modeled_comm;
} else {
// we don't record comm costs for each subphase - split it proportionally
return modeled_comm *
1.0 /* (when.subphase / number of subphases in phase) */;
}
}

unsigned int RawData::getNumPastPhasesNeeded(unsigned int look_back)
Expand Down

0 comments on commit f4bb6aa

Please sign in to comment.