Skip to content

Commit

Permalink
- Removed forgotten old print for torn systems (it's part of the erro…
Browse files Browse the repository at this point in the history
…r buffer now)

- BuildModelRecursive.mos script now uses +d=backenddaeinfo by default, and colour-codes the links (red,orange,blue for error,warning,notify)


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@19121 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Feb 14, 2014
1 parent 26d7bf3 commit d552155
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
5 changes: 0 additions & 5 deletions Compiler/BackEnd/BackendDump.mo
Expand Up @@ -3367,11 +3367,6 @@ algorithm
msgs := {strcompsStr,seqStr,sarrStr,salgStr,sceStr,sweStr,sieStr,eqsysStr,teqsysStr,meqsysStr};
Error.addMessage(Error.BACKENDDAEINFO_STRONGCOMPONENT_STATISTICS, msgs);

Debug.bcall(intGt(teqsys,0),print,"torn linear Equationsystems: " +& intString(listLength(te_l)) +& " {");
Debug.bcall(intGt(teqsys,0),debuglst,(te_l,intTplString,", ","}\n"));
Debug.bcall(intGt(teqsys,0),print,"torn nonlinear Equationsystems: " +& intString(listLength(te_nl)) +& " {");
Debug.bcall(intGt(teqsys,0),debuglst,(te_nl,intTplString,", ","}\n"));

Debug.bcall(intGt(eqsys,0),dumpCompSystems,systemsTpl);
Debug.bcall(intGt(meqsys,0),dumpCompMixed,mixedTpl);
Debug.bcall(intGt(teqsys,0),dumpCompTorn,tornTpl);
Expand Down
15 changes: 12 additions & 3 deletions Examples/BuildModelRecursive.mos
Expand Up @@ -2,7 +2,7 @@

setCommandLineOptions("+d=nogen");
if not regularFileExists("CustomCommands.mos") then
customCommands := "setCommandLineOptions(\"+d=nogen,initialization\");
customCommands := "setCommandLineOptions(\"+d=nogen,initialization,backenddaeinfo\");
setMatchingAlgorithm(\"PFPlusExt\");
setIndexReductionMethod(\"dynamicStateSelection\");";
writeFile("CustomCommands.mos",customCommands);
Expand Down Expand Up @@ -138,6 +138,8 @@ res:=buildModel("+s+",tolerance=tolerance,outputFormat=outputFormat,numberOfInte
greenColor := \"#00FF00\";
errFile:=\"files/"+s+".err\";
simFile:=\"files/"+s+".sim\";
(nmessage,nerror,nwarning) := countMessages();
errorLinkClass := if nerror>0 then \"messagesError\" elseif nwarning>0 then \"messagesWarning\" else \"messagesInfo\";
err:=getErrorString();
system(\"rm -f \" + errFile);
writeFile(simFile,\"\");
Expand Down Expand Up @@ -234,7 +236,7 @@ end if;
alarm(0); // We built the model fine and verified results; let's assume the rest is fast and easy to deal with

sim:=readFile(simFile);
str:=\"<tr><td>\" + (if err <> \"\" then \"<a href=\\\"\"+errFile+\"\\\">"+s+"</a>\" else \""+s+"\") +
str:=\"<tr><td>\" + (if err <> \"\" then \"<a class=\\\"\"+errorLinkClass+\"\\\" href=\\\"\"+errFile+\"\\\">"+s+"</a>\" else \""+s+"\") +
(if sim <> \"\" then \" (<a href=\\\"\"+simFile+\"\\\">sim</a>)\" else \"\") +
\"</td>\" + referenceCell +
cell(if simRes then timeSim else -1.0,greenOnOk=true,greenColor=greenColor) +
Expand Down Expand Up @@ -273,7 +275,14 @@ str:="<h1>Recursive BuildModel Test</h1>
+ customCommandsStr +
"<p>Links are provided if getErrorString() or the simulation generates output. <font style=\"background-color:#00FF00\">Green</font> means success. <font style=\"background-color:#FF0000\">Red</font> is bad and in general signifies a failure.</p>
";
writeFile(log,"<html><head><title>BuildModel Results</title></head><body>" + str);
writeFile(log,"<html>
<head>
<title>BuildModel Results</title>
<style>
a.messagesError {color:#FF0000;}
a.messagesWarning {color:#FFCC66;}
</style>
</head><body>" + str);
writeFile(log,"<table><tr><th>Model</th>"+(if referenceFiles == "" then "" else "<th>Verified</th>")+"<th>Simulate</th><th>Total buildModel</th><th>Frontend</th><th>Backend</th><th>SimCode</th><th>Templates</th><th>Compile</th></tr>\n",append=true);getErrorString();
writeFile(log,sum(readFile(s + ".stat") + "\n" for s in a),append=true);getErrorString();
writeFile(log,"</table><hr /><p><a href=\"BuildModelRecursive.tar.gz\">Offline version</a></p></body></html>",append=true);getErrorString();
Expand Down

0 comments on commit d552155

Please sign in to comment.