Skip to content

Commit

Permalink
- new type structure for the task graph (TaskGraphMeta and TaskGraph)
Browse files Browse the repository at this point in the history
- added additional information to TaskGraphMeta (nodeMark,costs...)
- some useful dump functions

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16535 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Volker Waurich committed Jul 3, 2013
1 parent 4272192 commit 1dea272
Show file tree
Hide file tree
Showing 3 changed files with 972 additions and 500 deletions.
2 changes: 1 addition & 1 deletion Compiler/BackEnd/BackendDump.mo
Expand Up @@ -2764,7 +2764,7 @@ algorithm
print("\n");
end dumpIncidenceMatrixT;

protected function dumpIncidenceMatrix2
public function dumpIncidenceMatrix2
"function: dumpIncidenceMatrix2
author: PA
Helper function to dumpIncidenceMatrix (+T)."
Expand Down
22 changes: 20 additions & 2 deletions Compiler/BackEnd/HpcOmSimCode.mo
Expand Up @@ -125,11 +125,28 @@ algorithm

BackendDAE.SampleLookup sampleLookup;

HpcOmTaskGraph.TaskGraph taskGraph;
HpcOmTaskGraph.TaskGraph taskGraphOde;
HpcOmTaskGraph.TaskGraphMeta taskGraphData;
HpcOmTaskGraph.TaskGraphMeta taskGraphDataOde;
String fileName;

case (dlow, class_, _, fileDir, _, _, _, _, _, _, _, _) equation
System.tmpTickReset(0);

//Create TaskGraph
HpcOmTaskGraph.createTaskGraph(inBackendDAE,filenamePrefix);
(taskGraph,taskGraphData) = HpcOmTaskGraph.createTaskGraph(inBackendDAE);
//HpcOmTaskGraph.printTaskGraph(taskGraph);
//HpcOmTaskGraph.printTaskGraphMeta(taskGraphData);
fileName = ("taskGraph"+&filenamePrefix+&".graphml");
//HpcOmTaskGraph.dumpAsGraphML_SccLevel(taskGraph, taskGraphData, fileName);

// get the task graph for the ODEsystem
(taskGraphOde,taskGraphDataOde) = HpcOmTaskGraph.getOdeSystem(taskGraph,taskGraphData,inBackendDAE);
//HpcOmTaskGraph.printTaskGraph(taskGraphOde);
//HpcOmTaskGraph.printTaskGraphMeta(taskGraphDataOde);
fileName = ("taskGraphODE"+&filenamePrefix+&".graphml");
//HpcOmTaskGraph.dumpAsGraphML_SccLevel(taskGraphOde, taskGraphDataOde, fileName);

uniqueEqIndex = 1;
ifcpp = stringEqual(Config.simCodeTarget(), "Cpp");
Expand Down Expand Up @@ -186,7 +203,8 @@ algorithm
// equation generation for euler, dassl2, rungekutta
(uniqueEqIndex, odeEquations, algebraicEquations, allEquations, tempvars) = SimCodeUtil.createEquationsForSystems(systs, shared, uniqueEqIndex, {}, {}, {}, tempvars);
//print("from "+&intString(listLength(allEquations))+&" we have "+&intString(listLength(List.flatten(odeEquations)))+& " ode eqs and "+&intString(listLength(List.flatten(algebraicEquations)))+&" algebraic eqs\n");
//HpcOmTaskGraph.createTaskGraphODE(odeEquations,dlow,filenamePrefix);
print("correct odeNum: "+&intString(listLength(List.flatten(odeEquations)))+&"\n");
print("my odeNumn: "+&intString(arrayLength(taskGraphOde))+&"\n");
// modelInfo = SimCodeUtil.addTempVars(tempvars, modelInfo);
//
// // Assertions and crap
Expand Down

0 comments on commit 1dea272

Please sign in to comment.