From e7e18a666753c3026f8b0293d2754a9d7e461d29 Mon Sep 17 00:00:00 2001 From: Nicole Lemaster Slattengren Date: Fri, 13 May 2022 14:48:17 -0700 Subject: [PATCH] #1129: examples: update lb_iter subphase usage --- examples/collection/lb_iter.cc | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/examples/collection/lb_iter.cc b/examples/collection/lb_iter.cc index 980f94bf49..d306918529 100644 --- a/examples/collection/lb_iter.cc +++ b/examples/collection/lb_iter.cc @@ -52,14 +52,13 @@ struct IterCol : vt::Collection { struct IterMsg : vt::CollectionMessage { IterMsg() = default; IterMsg( - int64_t const in_work_amt, int64_t const in_iter, int64_t const subphase + int64_t const in_work_amt, int64_t const in_iter ) - : iter_(in_iter), work_amt_(in_work_amt), subphase_(subphase) + : iter_(in_iter), work_amt_(in_work_amt) { } int64_t iter_ = 0; int64_t work_amt_ = 0; - int64_t subphase_ = 0; }; void iterWork(IterMsg* msg); @@ -77,7 +76,6 @@ struct IterCol : vt::Collection { static double weight = 1.0f; void IterCol::iterWork(IterMsg* msg) { - this->lb_data_.setSubPhase(msg->subphase_); double val = 0.1f; double val2 = 0.4f * msg->work_amt_; auto const idx = getIndex().x(); @@ -130,14 +128,14 @@ int main(int argc, char** argv) { for (int i = 0; i < num_iter; i++) { auto cur_time = vt::timing::getCurrentTime(); - vt::runInEpochCollective([=]{ - proxy.broadcastCollective(10, i, 0); + vt::runSubphaseCollective([=]{ + proxy.broadcastCollective(10, i); }); - vt::runInEpochCollective([=]{ - proxy.broadcastCollective(5, i, 1); + vt::runSubphaseCollective([=]{ + proxy.broadcastCollective(5, i); }); - vt::runInEpochCollective([=]{ - proxy.broadcastCollective(15, i, 2); + vt::runSubphaseCollective([=]{ + proxy.broadcastCollective(15, i); }); auto total_time = vt::timing::getCurrentTime() - cur_time;