Skip to content

Commit

Permalink
Add basic error handling for mismatching profile
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam committed Jun 25, 2022
1 parent b67ec5f commit f0e6e60
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/ast2ram/utility/SipsMetric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,14 @@ std::vector<std::size_t> SelingerProfileSipsMetric::getReordering(
cc << constantsStringMap;
std::string constants = cc.str();

if (isRecursive) {
return prof->getRecursiveJoinSize(rel, attributes, constants, iteration);
} else {
return prof->getNonRecursiveJoinSize(rel, attributes, constants);
try {
if (isRecursive) {
return prof->getRecursiveJoinSize(rel, attributes, constants, iteration);
} else {
return prof->getNonRecursiveJoinSize(rel, attributes, constants);
}
} catch (...) {
fatal("Error: profile used for auto-scheduling doesn't match the provided program.");
}
};

Expand Down

0 comments on commit f0e6e60

Please sign in to comment.