Skip to content

Commit

Permalink
#8: add 'suffix' option to configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
cwschilly committed Aug 26, 2024
1 parent 9f8e5a0 commit 29178d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vt-tv/utility/parse_render.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ void ParseRender::parseAndRender(PhaseType phase_id, std::unique_ptr<Info> info)
std::string input_dir = config["input"]["directory"].as<std::string>();
std::filesystem::path input_path(input_dir);

// Allow user to point to specific files (e.g. json.br)
std::string file_suffix = config["input"]["suffix"].as<std::string>("json");

// If it's a relative path, prepend the SRC_DIR
if (input_path.is_relative()) {
input_path = std::filesystem::path(SRC_DIR) / input_path;
Expand Down Expand Up @@ -94,7 +97,7 @@ void ParseRender::parseAndRender(PhaseType phase_id, std::unique_ptr<Info> info)
for (int64_t rank = 0; rank < n_ranks; rank++) {
fmt::print("Reading file for rank {}\n", rank);
utility::JSONReader reader{static_cast<NodeType>(rank)};
reader.readFile(input_dir + "data." + std::to_string(rank) + ".json");
reader.readFile(input_dir + "data." + std::to_string(rank) + "." + file_suffix);
auto tmpInfo = reader.parse();
#ifdef VT_TV_OPENMP_ENABLED
#if VT_TV_OPENMP_ENABLED
Expand Down

0 comments on commit 29178d0

Please sign in to comment.