Skip to content

Commit

Permalink
- added flag +d=hpcomDump that outputs additional information for hpcom
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@18395 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Volker Waurich committed Dec 3, 2013
1 parent 5262530 commit c158263
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Compiler/BackEnd/HpcOmScheduler.mo
Expand Up @@ -40,6 +40,7 @@ public import HpcOmTaskGraph;

protected import BackendDAEUtil;
protected import Debug;
protected import Flags;
protected import HpcOmSchedulerExt;
protected import List;
protected import Util;
Expand Down Expand Up @@ -2079,9 +2080,6 @@ algorithm
serTime = getSerialExecutionTime(taskGraphMetaIn);
speedUp = serTime /. parTime;
speedUpMax = serTime /. cpCosts;
//print("the serialCosts: "+&realString(serTime)+&"\n");
//print("the parallelCosts: "+&realString(parTime)+&"\n");
//print("the cpCosts: "+&realString(cpCosts)+&"\n");
then
(serTime,parTime,speedUp,speedUpMax);
else
Expand Down Expand Up @@ -2119,6 +2117,8 @@ algorithm
isNotOkString = "Something is weird. The predicted SpeedUp is "+&realString(speedUp)+&" and the theoretical maximum speedUp is "+&realString(speedUpMax)+&"\n";
Debug.bcall(realGt(speedUp,speedUpMax),print,isNotOkString);
Debug.bcall(realLe(speedUp,speedUpMax),print,isOkString);
Debug.fcall(Flags.HPCOM_DUMP,print,"the serialCosts: "+&realString(serTime)+&"\n");
Debug.fcall(Flags.HPCOM_DUMP,print,"the parallelCosts: "+&realString(parTime)+&"\n");
then
();
end matchcontinue;
Expand Down
8 changes: 3 additions & 5 deletions Compiler/BackEnd/HpcOmSimCode.mo
Expand Up @@ -56,7 +56,6 @@ protected import ComponentReference;
protected import Debug;
protected import Error;
protected import Expression;
protected import ExpressionDump;
protected import Flags;
protected import GlobalScript;
protected import HpcOmTaskGraph;
Expand Down Expand Up @@ -233,8 +232,8 @@ algorithm
//Apply filters
//-------------
(taskGraph1,taskGraphData1) = applyFiltersToGraph(taskGraphOde,taskGraphDataOde,inBackendDAE,true);
//HpcOmTaskGraph.printTaskGraph(taskGraph1);
//HpcOmTaskGraph.printTaskGraphMeta(taskGraphData1);
Debug.fcall(Flags.HPCOM_DUMP,HpcOmTaskGraph.printTaskGraph,taskGraph1);
Debug.fcall(Flags.HPCOM_DUMP,HpcOmTaskGraph.printTaskGraphMeta,taskGraphData1);

//Create schedule
//---------------
Expand All @@ -247,12 +246,11 @@ algorithm
HpcOmScheduler.printPredictedExeTimeInfo(serTime,parTime,speedUp,speedUpMax,numProc);
((criticalPaths,cpCosts),(criticalPathsWoC,cpCostsWoC),parallelSets) = HpcOmTaskGraph.longestPathMethod(taskGraph1,taskGraphData1);
criticalPathInfo = HpcOmTaskGraph.dumpCriticalPathInfo((criticalPaths,cpCosts),(criticalPathsWoC,cpCostsWoC));

Debug.fcall(Flags.HPCOM_DUMP,print,criticalPathInfo);

taskScheduleSimCode = HpcOmScheduler.convertScheduleToSimCodeSchedule(schedule);
schedulerInfo = HpcOmScheduler.convertScheduleStrucToInfo(schedule,arrayLength(taskGraph));


fileName = ("taskGraph"+&filenamePrefix+&"ODE_schedule.graphml");
HpcOmTaskGraph.dumpAsGraphMLSccLevel(taskGraph1, taskGraphData1, fileName, criticalPathInfo, HpcOmTaskGraph.convertNodeListToEdgeTuples(List.first(criticalPaths)), HpcOmTaskGraph.convertNodeListToEdgeTuples(List.first(criticalPathsWoC)), sccSimEqMapping, schedulerInfo);
//HpcOmScheduler.printSchedule(schedule);
Expand Down
5 changes: 4 additions & 1 deletion Compiler/Util/Flags.mo
Expand Up @@ -371,6 +371,8 @@ constant DebugFlag ADDITIONAL_GRAPHVIZ_DUMP = DEBUG_FLAG(102, "graphvizDump", fa
Util.gettext("activates additional graphviz dumps (as *.dot files). It can be used in addition to one of the following flags: {dumpinitialsystems}."));
constant DebugFlag INFO_XML_OPERATIONS = DEBUG_FLAG(103, "infoXmlOperations", false,
Util.gettext("Enables output of the operations in the _info.xml file when translating models."));
constant DebugFlag HPCOM_DUMP = DEBUG_FLAG(104, "hpcomDump", false,
Util.gettext("dumps additional information on the parallel execution with hpcom"));

// This is a list of all debug flags, to keep track of which flags are used. A
// flag can not be used unless it's in this list, and the list is checked at
Expand Down Expand Up @@ -479,7 +481,8 @@ constant list<DebugFlag> allDebugFlags = {
PARTLINTORNSYSTEM,
DUMP_DISCRETEVARS_INFO,
ADDITIONAL_GRAPHVIZ_DUMP,
INFO_XML_OPERATIONS
INFO_XML_OPERATIONS,
HPCOM_DUMP
};

// CONFIGURATION FLAGS
Expand Down

0 comments on commit c158263

Please sign in to comment.