Skip to content

Commit

Permalink
[BE] Remove dumping of empty sets from index reduction
Browse files Browse the repository at this point in the history
Belonging to [master]:
  - OpenModelica/OMCompiler#3074
  • Loading branch information
kabdelhak authored and OpenModelica-Hudson committed May 3, 2019
1 parent f6e1212 commit 5daaf9b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
25 changes: 11 additions & 14 deletions Compiler/BackEnd/BackendDump.mo
Expand Up @@ -4573,23 +4573,20 @@ algorithm
list<tuple<DAE.ComponentRef,DAE.ComponentRef>> tplLst;
case (BackendDAE.STATEORDER(ht,_))
equation
print("State Order: (");
(tplLst) = BaseHashTable.hashTableList(ht);
str = stringDelimitList(List.map(tplLst,printStateOrderStr),"\n");
len = listLength(tplLst);
len_str = intString(len);
print(len_str);
print(")\n");
print("=============\n");
print(str);
print("\n");
if listLength(tplLst) > 0 then
print("State Order: (");
str = stringDelimitList(List.map(tplLst,printStateOrderStr),"\n");
len = listLength(tplLst);
len_str = intString(len);
print(len_str);
print(")\n");
print("=============\n");
print(str);
print("\n");
end if;
then
();
case (BackendDAE.NOSTATEORDER())
equation
print("no stateorder\n");
print("=============\n");
then ();
end match;
end dumpStateOrder;

Expand Down
4 changes: 2 additions & 2 deletions Compiler/BackEnd/Matching.mo
Expand Up @@ -5596,15 +5596,15 @@ algorithm
unmatched1 = getUnassigned(ne, ass1, {});
//BackendDump.dumpEqSystem(isyst, "EQSYS");
if Flags.isSet(Flags.BLT_DUMP) and Flags.isSet(Flags.GRAPHML) then BackendDump.dumpBipartiteGraphEqSystem(isyst, ishared, "BeforMatching_"+intString(arrayLength(m))+"_unmatched "+intString(listLength(unmatched1))); end if;
if Flags.isSet(Flags.BLT_DUMP) then print("unmatched equations: "+stringDelimitList(List.map(unmatched1,intString),", ")+"\n\n"); end if;
if Flags.isSet(Flags.BLT_DUMP) and listLength(unmatched1) > 0 then print("unmatched equations: "+stringDelimitList(List.map(unmatched1,intString),", ")+"\n\n"); end if;

// remove some edges which do not have to be traversed when finding the MSSS
m1 = arrayCopy(m);
m1t = arrayCopy(mt);
(m1,m1t) = removeEdgesForNoDerivativeFunctionInputs(m1,m1t,isyst,ishared);
(m1,m1t) = removeEdgesToDiscreteEquations(m1,m1t,isyst,ishared);
meqns1 = getEqnsforIndexReduction(unmatched1,ne,m1,m1t,ass1,ass2,inArg);
if Flags.isSet(Flags.BLT_DUMP) then print("MSS subsets: "+stringDelimitList(List.map(meqns1,Util.intLstString),"\n ")+"\n"); end if;
if Flags.isSet(Flags.BLT_DUMP) and listLength(meqns1) > 0 then print("MSS subsets: "+stringDelimitList(List.map(meqns1,Util.intLstString),"\n ")+"\n"); end if;

//Debug information
//if listLength(List.flatten(meqns1)) >= 5 then meqs_short = List.firstN(List.flatten(meqns1),5); else meqs_short = List.flatten(meqns1); end if;
Expand Down

0 comments on commit 5daaf9b

Please sign in to comment.