Skip to content

Commit 69e3810

Browse files
Willi BraunOpenModelica-Hudson
authored andcommitted
- change execStat usage a bit to get a better overview
1 parent c9cd590 commit 69e3810

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

Compiler/BackEnd/BackendDAEUtil.mo

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6905,6 +6905,7 @@ algorithm
69056905

69066906
// transformation phase (matching and sorting using index reduction method)
69076907
sode := causalizeDAE(optdae, NONE(), matchingAlgorithm, daeHandler, true);
6908+
SimCodeUtil.execStat("matching and sorting");
69086909

69096910
if Flags.isSet(Flags.GRAPHML) then
69106911
HpcOmTaskGraph.dumpBipartiteGraph(sode, fileNamePrefix);
@@ -7036,15 +7037,15 @@ algorithm
70367037
BackendDAE.DAE(systs,shared) := inDAE;
70377038
// reduce index
70387039
(systs,shared,args,causalized) := mapCausalizeDAE(systs,shared,inMatchingOptions,matchingAlgorithm,stateDeselection,{},{},false);
7039-
SimCodeUtil.execStat("matching");
7040+
//SimCodeUtil.execStat("matching");
70407041
// do late inline
70417042
outDAE := if dolateinline then BackendInline.lateInlineFunction(BackendDAE.DAE(systs,shared)) else BackendDAE.DAE(systs,shared);
70427043
// do state selection
70437044
BackendDAE.DAE(systs,shared) := stateDeselectionDAE(causalized,outDAE,args,stateDeselection);
70447045
// sort assigned equations to blt form
70457046
systs := mapSortEqnsDAE(systs,shared,{});
70467047
outDAE := BackendDAE.DAE(systs,shared);
7047-
SimCodeUtil.execStat("sorting");
7048+
//SimCodeUtil.execStat("sorting");
70487049
end causalizeDAE;
70497050

70507051
protected function mapCausalizeDAE "
@@ -7164,7 +7165,7 @@ algorithm
71647165
equation
71657166
// do state selection
71667167
outDAE = sDfunc(BackendDAE.DAE(systs,shared),args);
7167-
SimCodeUtil.execStat("transformDAE -> state selection " + methodstr);
7168+
//SimCodeUtil.execStat("transformDAE -> state selection " + methodstr);
71687169
then
71697170
outDAE;
71707171
else inDAE;

Compiler/BackEnd/SymbolicJacobian.mo

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,14 +1722,14 @@ algorithm
17221722
seedlst = List.map1(comref_vars, createSeedVars, inName);
17231723
s1 = intString(listLength(inVars));
17241724

1725-
SimCodeUtil.execStat("analytical Jacobians -> starting to generate the jacobian. DiffVars:" + s + " diffed equations: " + s1);
1725+
//SimCodeUtil.execStat("analytical Jacobians -> starting to generate the jacobian. DiffVars:" + s + " diffed equations: " + s1);
17261726

17271727
// Differentiate the ODE system w.r.t states for jacobian
17281728
(backendDAE as BackendDAE.DAE(shared=shared), funcs) = generateSymbolicJacobian(reduceDAE, inDiffVars, inDifferentiatedVars, BackendVariable.listVar1(seedlst), inStateVars, inInputVars, inParameterVars, inName);
17291729
if Flags.isSet(Flags.JAC_DUMP2) then
17301730
print("analytical Jacobians -> generated equations for Jacobian " + inName + " time: " + realString(clock()) + "\n");
17311731
end if;
1732-
SimCodeUtil.execStat("analytical Jacobians -> generated jacobian equations");
1732+
//SimCodeUtil.execStat("analytical Jacobians -> generated jacobian equations");
17331733

17341734
knvars1 = BackendVariable.daeKnVars(shared);
17351735
knvarsTmp = BackendVariable.varList(knvars1);
@@ -1753,11 +1753,11 @@ algorithm
17531753
end if;
17541754
knvars = BackendVariable.listVar1(knvarsTmp);
17551755
backendDAE = BackendDAEUtil.addBackendDAEKnVars(knvars,backendDAE);
1756-
SimCodeUtil.execStat("analytical Jacobians -> generated optimized jacobians");
1756+
//SimCodeUtil.execStat("analytical Jacobians -> generated optimized jacobians");
17571757

17581758
// generate sparse pattern
17591759
(sparsepattern,colsColors) = generateSparsePattern(reduceDAE, inDiffVars, diffedVars);
1760-
SimCodeUtil.execStat("analytical Jacobians -> generated generateSparsePattern");
1760+
//SimCodeUtil.execStat("analytical Jacobians -> generated generateSparsePattern");
17611761
then
17621762
((backendDAE, inName, inDiffVars, diffedVars, inVars), sparsepattern, colsColors, funcs);
17631763
else

Compiler/SimCode/SimCodeUtil.mo

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15057,7 +15057,11 @@ algorithm
1505715057
gcStr = GC.profStatsStr(GC.getProfStats(), head="");
1505815058
timeStr = System.snprintff("%.4g",20,t);
1505915059
totalTimeStr = System.snprintff("%.4g",20,total);
15060-
Error.addMessage(Error.EXEC_STAT,{name,timeStr,totalTimeStr,gcStr});
15060+
if Flags.isSet(Flags.GC_PROF) then
15061+
Error.addMessage(Error.EXEC_STAT_GC,{name,timeStr,totalTimeStr,gcStr});
15062+
else
15063+
Error.addMessage(Error.EXEC_STAT,{name,timeStr,totalTimeStr});
15064+
end if;
1506115065
System.realtimeTick(ClockIndexes.RT_CLOCK_EXECSTAT);
1506215066
then ();
1506315067
end match;

Compiler/Util/Error.mo

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,8 +771,6 @@ public constant Message INVALID_FLAG_TYPE_STRINGS = MESSAGE(545, SCRIPTING(), ER
771771
Util.gettext("Invalid type of flag %s, expected one of %s but got %s."));
772772
public constant Message FUNCTION_RETURN_EXT_OBJ = MESSAGE(546, TRANSLATION(), ERROR(),
773773
Util.gettext("Function %s returns an external object, but the only function allowed to return this object is %s."));
774-
public constant Message EXEC_STAT = MESSAGE(547, TRANSLATION(), NOTIFICATION(),
775-
Util.gettext("Performance of %s: time %s/%s, GC stats:%s"));
776774
public constant Message NON_STANDARD_OPERATOR = MESSAGE(547, TRANSLATION(), WARNING(),
777775
Util.gettext("Usage of non-standard operator (not specified in the Modelica specification): %s. Functionality might be partially supported but is not guaranteed."));
778776
public constant Message CONNECT_ARRAY_SIZE_ZERO = MESSAGE(548, TRANSLATION(), WARNING(),
@@ -823,6 +821,11 @@ public constant Message SUBCLOCK_CONFLICT = MESSAGE(570, TRANSLATION(), ERROR(),
823821
Util.gettext("Partition have different sub-clocks."));
824822
public constant Message CLOCK_CONFLICT = MESSAGE(571, TRANSLATION(), ERROR(),
825823
Util.gettext("Partition have different base clocks."));
824+
public constant Message EXEC_STAT = MESSAGE(572, TRANSLATION(), NOTIFICATION(),
825+
Util.gettext("Performance of %s: time %s/%s"));
826+
public constant Message EXEC_STAT_GC = MESSAGE(573, TRANSLATION(), NOTIFICATION(),
827+
Util.gettext("Performance of %s: time %s/%s, GC stats:%s"));
828+
826829

827830
public constant Message MATCH_SHADOWING = MESSAGE(5001, TRANSLATION(), ERROR(),
828831
Util.gettext("Local variable '%s' shadows another variable."));

0 commit comments

Comments
 (0)