Skip to content

Commit

Permalink
- Additional attributes for GraphML-Edges are now supported
Browse files Browse the repository at this point in the history
- Measure time function for the HpcOmBenchmark updated
- HpcOm-Tests are now part of the testsuite 
- Added communication costs to graphml-taskgraph


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16663 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Marcus Walther committed Jul 24, 2013
1 parent 439531c commit 157d533
Show file tree
Hide file tree
Showing 6 changed files with 138 additions and 104 deletions.
2 changes: 1 addition & 1 deletion Compiler/BackEnd/HpcOmBenchmark.mo
Expand Up @@ -93,7 +93,7 @@ algorithm
oTuples := matchcontinue(iList, iTuples)
case(numOfCalcs::calcTimeSum::eqIdx::rest,_)
equation
print("readCalcTimesFromXml1 eqIdx: " +& intString(realInt(eqIdx)) +& " numOfCalcs: " +& intString(realInt(numOfCalcs)) +& " calcTime: " +& realString(calcTimeSum) +& " \n");
//print("readCalcTimesFromXml1 eqIdx: " +& intString(realInt(eqIdx)) +& " numOfCalcs: " +& intString(realInt(numOfCalcs)) +& " calcTime: " +& realString(calcTimeSum) +& " \n");
intNumOfCalcs = realInt(numOfCalcs);
intEqIdx = realInt(eqIdx);
tmpTuples = readCalcTimesFromXml1(rest, (intEqIdx,intNumOfCalcs,calcTimeSum)::iTuples);
Expand Down
25 changes: 13 additions & 12 deletions Compiler/BackEnd/HpcOmSimCode.mo
Expand Up @@ -145,18 +145,18 @@ algorithm
//Create mapping to SimEq
(equationSccMapping,lastEqMappingIdx) = createSimEqToSccMapping(inBackendDAE);
(allComps,_) = HpcOmTaskGraph.getSystemComponents(inBackendDAE);
print("createSimCode with " +& intString(listLength(allComps)) +& " Components\n");
//print("createSimCode with " +& intString(listLength(allComps)) +& " Components\n");
sccSimEqMapping = convertToSccSimEqMapping(equationSccMapping, listLength(allComps));
simEqSccMapping = convertToSimEqSccMapping(equationSccMapping, lastEqMappingIdx);

dumpSccSimEqMapping(sccSimEqMapping);
//dumpSccSimEqMapping(sccSimEqMapping);

//Create TaskGraph
(taskGraph,taskGraphData) = HpcOmTaskGraph.createTaskGraph(inBackendDAE,filenamePrefix);
//Append the costs to the taskGraphMeta
taskGraphData = HpcOmTaskGraph.createCosts(inBackendDAE, filenamePrefix +& "_prof.xml" , simEqSccMapping, taskGraphData);
HpcOmTaskGraph.printTaskGraph(taskGraph);
HpcOmTaskGraph.printTaskGraphMeta(taskGraphData);
//HpcOmTaskGraph.printTaskGraph(taskGraph);
//HpcOmTaskGraph.printTaskGraphMeta(taskGraphData);
fileName = ("taskGraph"+&filenamePrefix+&".graphml");
HpcOmTaskGraph.dumpAsGraphMLSccLevel(taskGraph, taskGraphData, fileName);

Expand All @@ -168,7 +168,10 @@ algorithm
//print("ODE-TASKGRAPH\n");
//HpcOmTaskGraph.printTaskGraph(taskGraphOde);
//HpcOmTaskGraph.printTaskGraphMeta(taskGraphDataOde);


//fileName = ("taskGraph"+&filenamePrefix+&"ODE.graphml");
//HpcOmTaskGraph.dumpAsGraphMLSccLevel(taskGraphOde, taskGraphDataOde, fileName);

//assign levels(as an node property in the .graphml) to the nodes in the taskGraph. all nodes in one level can be computed in parallel
//HpcOmTaskGraph.arrangeGraphInLevels(taskGraphOde,taskGraphDataOde);

Expand All @@ -182,8 +185,8 @@ algorithm
//HpcOmTaskGraph.printTaskGraphMeta(taskGraphData);
//HpcOmTaskGraph.printTaskGraph(taskGraphOde);
//HpcOmTaskGraph.printTaskGraphMeta(taskGraphDataOde);
fileName = ("taskGraph"+&filenamePrefix+&"ODE.graphml");
HpcOmTaskGraph.dumpAsGraphMLSccLevel(taskGraphOde, taskGraphDataOde, fileName);
//fileName = ("taskGraph"+&filenamePrefix+&"ODE.graphml");
//HpcOmTaskGraph.dumpAsGraphMLSccLevel(taskGraphOde, taskGraphDataOde, fileName);

uniqueEqIndex = 1;
ifcpp = stringEqual(Config.simCodeTarget(), "Cpp");
Expand Down Expand Up @@ -454,9 +457,7 @@ algorithm
symjacs=symJacs)) = inBackendDAE; //dlow

// equation generation for euler, dassl2, rungekutta
print("createSimCode_0\n");
(uniqueEqIndex, _, _, _, tempvars, equationSccMapping) = SimCodeUtil.createEquationsForSystems(systs, shared, uniqueEqIndex, {}, {}, {}, tempvars, 1, {});
print("createSimCode_1\n");
then (equationSccMapping,uniqueEqIndex);
else then fail();
end matchcontinue;
Expand All @@ -473,7 +474,7 @@ protected

algorithm
tmpMapping := arrayCreate(numOfSccs,{});
print("convertToSccSimEqMapping with " +& intString(numOfSccs) +& " sccs.\n");
//print("convertToSccSimEqMapping with " +& intString(numOfSccs) +& " sccs.\n");
_ := List.fold(iMapping, convertToSccSimEqMapping1, tmpMapping);
oMapping := tmpMapping;

Expand All @@ -490,7 +491,7 @@ protected

algorithm
(i1,i2) := iMapping;
print("convertToSccSimEqMapping1 accessing index " +& intString(i2) +& ".\n");
//print("convertToSccSimEqMapping1 accessing index " +& intString(i2) +& ".\n");
tmpList := arrayGet(iSccMapping,i2);
tmpList := i1 :: tmpList;
oSccMapping := arrayUpdate(iSccMapping,i2,tmpList);
Expand Down Expand Up @@ -521,7 +522,7 @@ protected

algorithm
(simEqIdx,sccIdx) := iSimEqTuple;
print("convertToSimEqSccMapping1 " +& intString(simEqIdx) +& " .. " +& intString(sccIdx) +& " iMapping_len: " +& intString(arrayLength(iMapping)) +& "\n");
//print("convertToSimEqSccMapping1 " +& intString(simEqIdx) +& " .. " +& intString(sccIdx) +& " iMapping_len: " +& intString(arrayLength(iMapping)) +& "\n");
oMapping := arrayUpdate(iMapping,simEqIdx,sccIdx);
end convertToSimEqSccMapping1;

Expand Down

0 comments on commit 157d533

Please sign in to comment.