From 98a5ffa8a0fe47c44b02a0bb655db726dfcefc13 Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Thu, 22 Sep 2022 16:22:19 +0200 Subject: [PATCH] #1933: Appconfig: Add new flags/options vt_lb_spec and vt_lb_spec_file --- src/vt/configs/arguments/app_config.h | 3 +++ src/vt/configs/arguments/args.cc | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/vt/configs/arguments/app_config.h b/src/vt/configs/arguments/app_config.h index 27a85cc14d..10f30e370e 100644 --- a/src/vt/configs/arguments/app_config.h +++ b/src/vt/configs/arguments/app_config.h @@ -155,6 +155,9 @@ struct AppConfig { std::string vt_lb_statistics_dir = ""; bool vt_help_lb_args = false; bool vt_lb_self_migration = false; + bool vt_lb_spec = false; + std::string vt_lb_spec_file = ""; + bool vt_no_detect_hang = false; bool vt_print_no_progress = true; diff --git a/src/vt/configs/arguments/args.cc b/src/vt/configs/arguments/args.cc index 615e19cd79..e2e8383884 100644 --- a/src/vt/configs/arguments/args.cc +++ b/src/vt/configs/arguments/args.cc @@ -478,6 +478,8 @@ void addLbArgs(CLI::App& app, AppConfig& appConfig) { auto lb_statistics_file = "Load balancing statistics output file name"; auto lb_statistics_dir = "Load balancing statistics output directory name"; auto lb_self_migration = "Allow load balancer to migrate objects to the same node"; + auto lb_spec = "Enable LB spec file (defines which phases output LB data)"; + auto lb_spec_file = "File containing LB spec; --vt_lb_spec to enable"; auto s = app.add_flag("--vt_lb", appConfig.vt_lb, lb); auto t1 = app.add_flag("--vt_lb_quiet", appConfig.vt_lb_quiet, lb_quiet); auto u = app.add_option("--vt_lb_file_name", appConfig.vt_lb_file_name, lb_file_name)->capture_default_str()->check(CLI::ExistingFile); @@ -496,7 +498,9 @@ void addLbArgs(CLI::App& app, AppConfig& appConfig) { auto yy = app.add_flag("--vt_lb_statistics_compress", appConfig.vt_lb_statistics_compress, lb_statistics_comp); auto yz = app.add_option("--vt_lb_statistics_file", appConfig.vt_lb_statistics_file, lb_statistics_file)->capture_default_str(); auto zz = app.add_option("--vt_lb_statistics_dir", appConfig.vt_lb_statistics_dir, lb_statistics_dir)->capture_default_str(); - auto lbasm = app.add_flag("--vt_lb_self_migration", appConfig.vt_lb_self_migration, lb_self_migration); + auto lbasm = app.add_flag("--vt_lb_self_migration", appConfig.vt_lb_self_migration, lb_self_migration); + auto lbspec = app.add_flag("--vt_lb_spec", appConfig.vt_lb_spec, lb_spec); + auto lbspecfile = app.add_option("--vt_lb_spec_file", appConfig.vt_lb_spec_file, lb_spec_file)->capture_default_str(); auto debugLB = "Load Balancing"; s->group(debugLB); @@ -518,6 +522,8 @@ void addLbArgs(CLI::App& app, AppConfig& appConfig) { yz->group(debugLB); zz->group(debugLB); lbasm->group(debugLB); + lbspec->group(debugLB); + lbspecfile->group(debugLB); // help options deliberately omitted from the debugLB group above so that // they appear grouped with --vt_help when --vt_help is used