Skip to content

Commit

Permalink
#1934: Reset ElementLBData containers after resetting the current phase
Browse files Browse the repository at this point in the history
  • Loading branch information
thearusable committed Sep 19, 2024
1 parent 4254d6d commit 509662f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/vt/elm/elm_lb_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ void ElementLBData::updatePhase(PhaseType const& inc) {

void ElementLBData::resetPhase() {
cur_phase_ = fst_lb_phase;
// Reset containers after resetting the current phase
phase_timings_.clear();
subphase_timings_.clear();
phase_comm_.clear();
subphase_comm_.clear();
}

PhaseType ElementLBData::getPhase() const {
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/collection/test_lb.extended.cc
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,8 @@ TEST_F(TestRestoreLBData, test_restore_lb_data_data_1) {
);
});

vt::vrt::collection::balance::LBDataHolder lbdh(num_phases);
vt::vrt::collection::balance::LBDataHolder lbdh;
lbdh.resizeHistory(num_phases);
PhaseType write_phase = 0;

using CommKey = vt::elm::CommKey;
Expand Down

0 comments on commit 509662f

Please sign in to comment.