Skip to content

Commit

Permalink
- Renamed compareTaskGraphs to checkTaskGraph, because the execution …
Browse files Browse the repository at this point in the history
…and communication costs are now checked too

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16673 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Marcus Walther committed Jul 25, 2013
1 parent b177aba commit 87a1ebd
Show file tree
Hide file tree
Showing 6 changed files with 549 additions and 456 deletions.
4 changes: 2 additions & 2 deletions Compiler/FrontEnd/ModelicaBuiltin.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2286,13 +2286,13 @@ external "builtin";
annotation(preferredView="text");
end compareSimulationResults;

public function compareTaskGraphResults "compares two task graphs."
public function checkTaskGraph "Checks if the given taskgraph has the same structure as the reference taskgraph and if all attributes are set correctly."
input String filename;
input String reffilename;
output String[:] result;
external "builtin";
annotation(preferredView="text");
end compareTaskGraphResults;
end checkTaskGraph;

function val "Return the value of a variable at a given time in the simulation results"
input VariableName var;
Expand Down
8 changes: 4 additions & 4 deletions Compiler/Script/CevalScript.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2396,19 +2396,19 @@ algorithm
case (cache,env,"compareSimulationResults",_,st,_)
then (cache,Values.STRING("Error in compareSimulationResults"),st);

case (cache,env,"compareTaskGraphResults",{Values.STRING(filename),Values.STRING(filename_1)},st,_)
case (cache,env,"checkTaskGraph",{Values.STRING(filename),Values.STRING(filename_1)},st,_)
equation
pwd = System.pwd();
pd = System.pathDelimiter();
filename = Util.if_(System.substring(filename,1,1) ==& "/",filename,stringAppendList({pwd,pd,filename}));
filename_1 = Util.if_(System.substring(filename_1,1,1) ==& "/",filename_1,stringAppendList({pwd,pd,filename_1}));
strings = TaskGraphResults.cmpTaskGraphs(filename, filename_1);
strings = TaskGraphResults.checkTaskGraph(filename, filename_1);
cvars = List.map(strings,ValuesUtil.makeString);
v = ValuesUtil.makeArray(cvars);
then (cache,v,st);

case (cache,env,"compareTaskGraphResults",_,st,_)
then (cache,Values.STRING("Error in compareTaskGraphResults"),st);
case (cache,env,"checkTaskGraph",_,st,_)
then (cache,Values.STRING("Error in checkTaskGraph"),st);

case (cache,env,"getPlotSilent",{},st,_)
equation
Expand Down
8 changes: 4 additions & 4 deletions Compiler/Util/TaskGraphResults.mo
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@
encapsulated package TaskGraphResults
" file: TaskGraphResults.mo
package: TaskGraphResults
description: Compares two task-graph files.
description: Checks if the given taskGraph has the same structure as the reference graph and correct node and edge values.

RCS: $Id: TaskGraphResults.mo 2013-06-11 marcusw $

"

public function cmpTaskGraphs
public function checkTaskGraph
input String filename;
input String reffilename;
output list<String> res;
external "C" res=TaskGraphResults_cmpTaskGraphs(filename,reffilename) annotation(Library = "omcruntime");
end cmpTaskGraphs;
external "C" res=TaskGraphResults_checkTaskGraph(filename,reffilename) annotation(Library = "omcruntime");
end checkTaskGraph;

end TaskGraphResults;

0 comments on commit 87a1ebd

Please sign in to comment.