Skip to content

Commit

Permalink
Take care of that damn testudine
Browse files Browse the repository at this point in the history
  • Loading branch information
cvonelm committed Mar 12, 2024
1 parent 59737fd commit 94291d1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
27 changes: 13 additions & 14 deletions src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,9 @@ void parse_program_options(int argc, const char** argv)
io_options.toggle("block-io",
"Enable recording of block I/O events (requires access to debugfs)");


accel_options.multi_option("accel", "Accelerator to record execution events for").metavar("ACCEL").optional();

accel_options.multi_option("accel", "Accelerator to record execution events for")
.metavar("ACCEL")
.optional();

accel_options.option("nec-readout-interval", "Accelerator sampling interval")
.optional()
Expand All @@ -347,7 +347,6 @@ void parse_program_options(int argc, const char** argv)
.metavar("MSEC")
.default_value("100");


nitro::options::arguments arguments;
try
{
Expand Down Expand Up @@ -487,21 +486,21 @@ void parse_program_options(int argc, const char** argv)
}

for (const auto& accel : arguments.get_all("accel"))
{
if(accel == "nec")
{
{
if (accel == "nec")
{
config.use_nec = true;
}
else if(accel == "nvidia")
{
}
else if (accel == "nvidia")
{
config.use_nvidia = true;
}
}
else
{
{
std::cerr << "Unknown Accelerator " << accel << "!";
std::exit(EXIT_FAILURE);
}
}
}
}

std::vector<std::string> perf_group_events = arguments.get_all("metric-event");
std::vector<std::string> perf_userspace_events = arguments.get_all("userspace-metric-event");
Expand Down
9 changes: 4 additions & 5 deletions src/monitor/process_monitor_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,10 @@ namespace monitor
auto current_path = std::filesystem::current_path();

std::vector<std::string> env;
if(config().use_nvidia)
{
env = { "CUDA_INJECTION64_PATH=" + cuda_path,
"LO2S_RINGBUF_SIZE=1024" };
}
if (config().use_nvidia)
{
env = { "CUDA_INJECTION64_PATH=" + cuda_path, "LO2S_RINGBUF_SIZE=1024" };
}
std::vector<char*> c_env;
std::vector<char*> tmp;

Expand Down

0 comments on commit 94291d1

Please sign in to comment.