Skip to content

Commit

Permalink
Merge pull request #113 from DARMA-tasking/111-add-support-for-seq_id…
Browse files Browse the repository at this point in the history
…-object-identifiers

#111: Add support for `seq_id` object identifiers
  • Loading branch information
cwschilly authored Sep 17, 2024
2 parents eb5046c + 8571604 commit 43704ff
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/vt-tv/utility/json_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ std::unique_ptr<Info> JSONReader::parse() {
auto node = task["node"];
auto time = task["time"];
auto etype = task["entity"]["type"];
assert(time.is_number());
assert(node.is_number());
assert(time.is_number() && "task time must be a number");
assert(node.is_number() && "task node must be a number");

if (etype == "object") {
auto object = task["entity"]["id"];
auto object = task["entity"].value("id", task["entity"]["seq_id"]);
auto home = task["entity"]["home"];
bool migratable = task["entity"]["migratable"];
assert(object.is_number());
assert(home.is_number());
assert(object.is_number() && "task id or seq_id must be provided and be a number");
assert(home.is_number() && "task home must be a number");

std::vector<UniqueIndexBitType> index_arr;

Expand Down Expand Up @@ -174,8 +174,8 @@ std::unique_ptr<Info> JSONReader::parse() {
auto sid = s["id"];
auto stime = s["time"];

assert(sid.is_number());
assert(stime.is_number());
assert(sid.is_number() && "sid must be a number");
assert(stime.is_number() && "stime must be a number");

subphase_loads[sid] = stime;
}
Expand Down Expand Up @@ -227,10 +227,10 @@ std::unique_ptr<Info> JSONReader::parse() {
auto from = comm["from"];
auto to = comm["to"];

ElementIDType from_id = from["id"];
ElementIDType to_id = to["id"];
ElementIDType from_id = from.value("id", from["seq_id"]);
ElementIDType to_id = to.value("id", to["seq_id"]);

assert(bytes.is_number());
assert(bytes.is_number() && "bytes must be a number");
// assert(from.is_number());
// assert(to.is_number());

Expand Down

0 comments on commit 43704ff

Please sign in to comment.