Skip to content
This repository has been archived by the owner on May 18, 2019. It is now read-only.

Commit

Permalink
Warn about unbalanced system after WFC
Browse files Browse the repository at this point in the history
Belonging to [master]:
  - #1886
  • Loading branch information
ptaeuber authored and OpenModelica-Hudson committed Oct 10, 2017
1 parent 3c3ca87 commit 624b9a6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Compiler/BackEnd/CommonSubExpression.mo
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@ algorithm
syst.orderedEqs := orderedEqs_new;
syst.orderedVars := orderedVars;

// Check for unbalanced system
if not intEq(BackendEquation.equationArraySize(orderedEqs_new), orderedVars.numberOfVars) then
Error.addCompilerWarning("After manipulating the system with postOptModule wrapFunctionCalls the system is unbalanced. This indicates that the original system is singular. You can use -d=dumpCSE and -d=dumpCSE_verbose for more information.");
end if;

// Reset Matching
syst.m := NONE();
syst.mT := NONE();
Expand Down

0 comments on commit 624b9a6

Please sign in to comment.