Skip to content

Commit

Permalink
#2174: args: add ability to enable vt-tv and specify yaml config file
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Aug 10, 2023
1 parent a729ace commit 57ddf09
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/vt/configs/arguments/app_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ struct AppConfig {

bool vt_debug_print_flush = false;

bool vt_tv = false;
std::string vt_tv_config_file = "";

bool vt_user_1 = false;
bool vt_user_2 = false;
bool vt_user_3 = false;
Expand Down Expand Up @@ -389,6 +392,9 @@ struct AppConfig {

| vt_debug_print_flush

| vt_tv
| vt_tv_config_file

| vt_user_1
| vt_user_2
| vt_user_3
Expand Down
15 changes: 15 additions & 0 deletions src/vt/configs/arguments/args.cc
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,20 @@ void addRuntimeArgs(CLI::App& app, AppConfig& appConfig) {
a3->group(configRuntime);
}

void addTVArgs(CLI::App& app, AppConfig& appConfig) {
auto tv_enabled = "Enable vt-tv visualization/mesh streaming";
auto tv_file = "File name for YAML vt-tv configuraton file";

auto a1 = app.add_flag("--vt_tv", appConfig.vt_tv, tv_enabled);
auto a2 = app.add_option(
"--vt_tv_config_file", appConfig.vt_tv_config_file, tv_file
);

auto configTV = "vt-tv Configuration";
a1->group(configTV);
a2->group(configTV);
}

void addThreadingArgs(CLI::App& app, AppConfig& appConfig) {
#if (vt_feature_fcontext != 0)
auto ult_disable = "Disable running handlers in user-level threads";
Expand Down Expand Up @@ -768,6 +782,7 @@ std::tuple<int, std::string> ArgConfig::parseToConfig(
addSchedulerArgs(app, appConfig);
addConfigFileArgs(app, appConfig);
addRuntimeArgs(app, appConfig);
addTVArgs(app, appConfig);
addThreadingArgs(app, appConfig);

std::tuple<int, std::string> result = parseArguments(app, argc, argv, appConfig);
Expand Down

0 comments on commit 57ddf09

Please sign in to comment.