@@ -1157,7 +1157,7 @@ algorithm
11571157 // generate a serial section
11581158 compLst = List . flatten(List . map1(section,Util . arrayGetIndexFirst,inComps));
11591159 simEqSysIdcs = getSimEqSysIdcsForCompLst(compLst,iSccSimEqMapping);
1160- task = HpcOmSimCode . CALCTASK_LEVEL (simEqSysIdcs,section);
1160+ task = HpcOmSimCode . CALCTASK_LEVEL_SERIAL (simEqSysIdcs,section);
11611161 then {task};
11621162 case (section::_,HpcOmTaskGraph . TASKGRAPHMETA (inComps= inComps),_)
11631163 equation
@@ -3926,7 +3926,7 @@ algorithm
39263926 levelSectionCosts = List . mapList1_1(levels, getLevelTaskCosts,taskGraphMetaIn);
39273927 serTime = realSum(List . map(levelSectionCosts,realSum));
39283928 serTime = HpcOmTaskGraph . roundReal(serTime,2 );
3929- levelCosts = List . map1(levelSectionCosts,getLevelParallelTime,arrayCreate( numProcIn, 0 . 0 ) );
3929+ levelCosts = List . map1(levelSectionCosts,getLevelParallelTime,numProcIn);
39303930 parTime = List . fold(levelCosts,realAdd,0 . 0 );
39313931 parTime = HpcOmTaskGraph . roundReal(parTime,2 );
39323932 criticalPathInfo = HpcOmTaskGraph . dumpCriticalPathInfo((criticalPaths,cpCosts),(criticalPathsWoC,cpCostsWoC));
@@ -3962,19 +3962,19 @@ end analyseScheduledTaskGraph;
39623962protected function getLevelParallelTime"computes the the time for the parallel computation of a parallel section
39633963author:Waurich TUD 2014-06"
39643964 input list< Real > sectionCosts;
3965- input array < Real > threadWorkLoadIn ;
3965+ input Integer numProc ;
39663966 output Real levelCost;
39673967protected
39683968 array< Real > workload;
39693969algorithm
3970- workload := List . fold1(sectionCosts,getLevelParallelTime1,arrayLength(threadWorkLoadIn),threadWorkLoadIn);
3971- levelCost := Util . arrayFold(workload,realMax,0 . 0 );
3970+ workload := arrayCreate(numProc,0 . 0 );
3971+ workload := List . fold(sectionCosts,getLevelParallelTime1,workload);
3972+ levelCost := Util . arrayFold(workload,realMax,0 . 0 );
39723973end getLevelParallelTime;
39733974
39743975protected function getLevelParallelTime1"helper function for getLevelParallelTime. distributes the current section to the thread with the least workload
39753976author:Waurich TUD 2014-06"
39763977 input Real sectionCost;
3977- input Integer size;
39783978 input array< Real > threadWorkLoadIn;
39793979 output array< Real > threadWorkLoadOut;
39803980protected
@@ -4001,6 +4001,16 @@ algorithm
40014001 nodeCosts = List . map1(nodeIdc,HpcOmTaskGraph . getExeCostReqCycles,iMeta);
40024002 costs = List . fold(nodeCosts,realAdd,0 . 0 );
40034003 then costs;
4004+ case (HpcOmSimCode . CALCTASK_LEVEL_SERIAL (nodeIdc= nodeIdc),_)
4005+ equation
4006+ nodeCosts = List . map1(nodeIdc,HpcOmTaskGraph . getExeCostReqCycles,iMeta);
4007+ costs = List . fold(nodeCosts,realAdd,0 . 0 );
4008+ then costs;
4009+ else
4010+ equation
4011+ print("getLevelTaskCosts failed! \n " );
4012+ then
4013+ fail();
40044014 end match;
40054015end getLevelTaskCosts;
40064016
0 commit comments