Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2319: fix undefined reference to makeLB in collection_extended #2326

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -173,19 +173,6 @@ void LBManager::setLoadModel(std::shared_ptr<LoadModel> model) {
nlb_data->getUserData());
}

template <typename LB>
LBManager::LBProxyType
LBManager::makeLB(std::string const& lb_name) {
auto proxy = theObjGroup()->makeCollective<LB>(lb_name);
auto strat = proxy.get();
strat->init(proxy);
auto base_proxy = proxy.template castToBase<lb::BaseLB>();

destroy_lb_ = [proxy]{ proxy.destroyCollective(); };

return base_proxy;
}

void LBManager::defaultPostLBWork(ReassignmentMsg* msg) {
auto reassignment = msg->reassignment;
auto phase = msg->phase;
Expand Down
11 changes: 10 additions & 1 deletion src/vt/vrt/collection/balance/lb_invoke/lb_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,16 @@ struct LBManager : runtime::component::Component<LBManager> {
* \return objgroup proxy to the new load balancer
*/
template <typename LB>
LBProxyType makeLB(std::string const& lb_name = {});
LBProxyType makeLB(std::string const& lb_name = {}) {
auto proxy = theObjGroup()->makeCollective<LB>(lb_name);
auto strat = proxy.get();
strat->init(proxy);
auto base_proxy = proxy.template castToBase<lb::BaseLB>();

destroy_lb_ = [proxy]{ proxy.destroyCollective(); };

return base_proxy;
}

protected:
/**
Expand Down