Skip to content

Commit

Permalink
- use scheduled task graph to get scheduleInfo and CriticalPathInfo
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@21067 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Volker Waurich committed Jun 12, 2014
1 parent 4f5525a commit 41abe64
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Compiler/BackEnd/HpcOmSimCodeMain.mo
Expand Up @@ -139,8 +139,8 @@ algorithm
list<BackendDAE.TimeEvent> timeEvents;
BackendDAE.StrongComponents allComps, initComps;

HpcOmTaskGraph.TaskGraph taskGraph, taskGraphOde, taskGraphSimplified, taskGraphDuplicatedTasks, taskGraphInit;
HpcOmTaskGraph.TaskGraphMeta taskGraphData, taskGraphDataOde, taskGraphDataSimplified,taskGraphDataDuplicatedTasks, taskGraphDataInit;
HpcOmTaskGraph.TaskGraph taskGraph, taskGraphOde, taskGraphSimplified, taskGraphScheduled, taskGraphInit;
HpcOmTaskGraph.TaskGraphMeta taskGraphData, taskGraphDataOde, taskGraphDataSimplified,taskGraphDataScheduled, taskGraphDataInit;
String fileName, fileNamePrefix;
Integer numProc;
list<list<Integer>> parallelSets;
Expand Down Expand Up @@ -247,22 +247,22 @@ algorithm
//Debug.fcall(Flags.HPCOM_DUMP,HpcOmTaskGraph.printTaskGraph,taskGraphSimplified);
//Debug.fcall(Flags.HPCOM_DUMP,HpcOmTaskGraph.printTaskGraphMeta,taskGraphDataSimplified);


fileName = ("taskGraph"+&filenamePrefix+&"ODE_merged.graphml");
HpcOmTaskGraph.dumpAsGraphMLSccLevel(taskGraphSimplified, taskGraphDataSimplified, inBackendDAE, fileName, criticalPathInfo, HpcOmTaskGraph.convertNodeListToEdgeTuples(List.first(criticalPaths)), HpcOmTaskGraph.convertNodeListToEdgeTuples(List.first(criticalPathsWoC)), sccSimEqMapping, schedulerInfo);

//Create schedule
//---------------
numProc = Flags.getConfigInt(Flags.NUM_PROC);
(numProc,_) = setNumProc(numProc,cpCostsWoC,taskGraphDataOde);//in case n-flag is not set
(schedule,simCode,taskGraphDuplicatedTasks,taskGraphDataDuplicatedTasks,sccSimEqMapping) = createSchedule(taskGraphSimplified,taskGraphDataSimplified,sccSimEqMapping,filenamePrefix,numProc,simCode);
(schedule,simCode,taskGraphScheduled,taskGraphDataScheduled,sccSimEqMapping) = createSchedule(taskGraphSimplified,taskGraphDataSimplified,sccSimEqMapping,filenamePrefix,numProc,simCode);
//(schedule,numProc) = repeatScheduleWithOtherNumProc(taskGraphSimplified,taskGraphDataSimplified,sccSimEqMapping,filenamePrefix,cpCostsWoC,schedule,numProc,numFixed);
numProc = Flags.getConfigInt(Flags.NUM_PROC);
criticalPathInfo = HpcOmScheduler.analyseScheduledTaskGraph(schedule,numProc,taskGraphSimplified,taskGraphDataSimplified);
schedulerInfo = HpcOmScheduler.convertScheduleStrucToInfo(schedule,arrayLength(taskGraphSimplified));
criticalPathInfo = HpcOmScheduler.analyseScheduledTaskGraph(schedule,numProc,taskGraphScheduled,taskGraphDataScheduled);
schedulerInfo = HpcOmScheduler.convertScheduleStrucToInfo(schedule,arrayLength(taskGraphScheduled));
Debug.execStat("hpcom create schedule", GlobalScript.RT_CLOCK_EXECSTAT_HPCOM_MODULES);

fileName = ("taskGraph"+&filenamePrefix+&"ODE_schedule_duplic.graphml");
HpcOmTaskGraph.dumpAsGraphMLSccLevel(taskGraphDuplicatedTasks, taskGraphDataDuplicatedTasks, inBackendDAE, fileName, criticalPathInfo, HpcOmTaskGraph.convertNodeListToEdgeTuples(List.first(criticalPaths)), HpcOmTaskGraph.convertNodeListToEdgeTuples(List.first(criticalPathsWoC)), sccSimEqMapping, schedulerInfo);
fileName = ("taskGraph"+&filenamePrefix+&"ODE_schedule.graphml");
HpcOmTaskGraph.dumpAsGraphMLSccLevel(taskGraphSimplified, taskGraphDataSimplified, inBackendDAE, fileName, criticalPathInfo, HpcOmTaskGraph.convertNodeListToEdgeTuples(List.first(criticalPaths)), HpcOmTaskGraph.convertNodeListToEdgeTuples(List.first(criticalPathsWoC)), sccSimEqMapping, schedulerInfo);
HpcOmTaskGraph.dumpAsGraphMLSccLevel(taskGraphScheduled, taskGraphDataScheduled, inBackendDAE, fileName, criticalPathInfo, HpcOmTaskGraph.convertNodeListToEdgeTuples(List.first(criticalPaths)), HpcOmTaskGraph.convertNodeListToEdgeTuples(List.first(criticalPathsWoC)), sccSimEqMapping, schedulerInfo);
//HpcOmScheduler.printSchedule(schedule);

Debug.execStat("hpcom dump schedule TaskGraph", GlobalScript.RT_CLOCK_EXECSTAT_HPCOM_MODULES);
Expand Down

0 comments on commit 41abe64

Please sign in to comment.