Skip to content

Commit

Permalink
#2074: Abort when OfflineLB is misconfigured
Browse files Browse the repository at this point in the history
  • Loading branch information
thearusable authored and cwschilly committed Sep 20, 2024
1 parent d6e36e2 commit 4cb685b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/vt/runtime/runtime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -429,11 +429,7 @@ bool Runtime::needLBDataRestartReader() {
using vrt::collection::balance::get_lb_names;

#if vt_check_enabled(lblite)
bool data_in = arg_config_->config_.vt_lb_data_in;
bool requested_offline_lb = arg_config_->config_.vt_lb_name == get_lb_names()[LBType::OfflineLB];
bool has_file = arg_config_->config_.vt_lb_file_name != "";

if (data_in || requested_offline_lb || has_file) {
if (arg_config_->config_.vt_lb_data_in) {
auto& config_file = arg_config_->config_.vt_lb_file_name;
if (config_file != "") {
bool const has_spec = ReadLBConfig::openConfig(config_file);
Expand All @@ -442,6 +438,8 @@ bool Runtime::needLBDataRestartReader() {
}
}
return true;
} else if (arg_config_->config_.vt_lb_name == get_lb_names()[LBType::OfflineLB]) {
vtAbort("VT cannot run OfflineLB without '--vt_lb_data_in' parameter.");
}
#endif

Expand Down

0 comments on commit 4cb685b

Please sign in to comment.