Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > SSR > SSR__Blocked_Matrix_Mult__Bench
changeset 19:233fe8a5208f
better load balance
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Mon, 16 Apr 2012 18:27:12 +0200 |
| parents | 5671f96e0b5f |
| children | bf6a4474f0e0 8972c00c00dd |
| files | SSR_Matrix_Mult/Divide_Pr.c |
| diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line diff
1.1 --- a/SSR_Matrix_Mult/Divide_Pr.c Mon Mar 19 10:29:43 2012 -0700 1.2 +++ b/SSR_Matrix_Mult/Divide_Pr.c Mon Apr 16 18:27:12 2012 +0200 1.3 @@ -196,7 +196,7 @@ 1.4 1.5 DEBUG__printf(dbgAppFlow,"**create result Pr**") 1.6 resultPr = 1.7 - SSR__create_procr_with( &gatherResults, resultsParams, animPr); 1.8 + SSR__create_procr_with_affinity( &gatherResults, resultsParams, animPr,0); 1.9 1.10 //Make the sub-matrices, and pair them up, and make processor to 1.11 // calc product of each pair. 1.12 @@ -261,7 +261,7 @@ 1.13 idealNumWorkUnits = SSR__giveIdealNumWorkUnits(); 1.14 1.15 idealSizeOfSide2 = leftMatrix->numRows / rint(cbrt( idealNumWorkUnits )); 1.16 - idealSizeOfSide2 *= 0.6; //finer granularity to help load balance 1.17 + idealSizeOfSide2 *= 0.4; //finer granularity to help load balance 1.18 1.19 if( idealSizeOfSide1 > idealSizeOfSide2 ) 1.20 idealSizeOfSide = idealSizeOfSide1; 1.21 @@ -367,10 +367,10 @@ 1.22 1.23 numCores = SSR__give_number_of_cores_to_schedule_onto(); 1.24 1.25 - numToPutOntoEachCore = numRowIdxs*numColIdxs/numCores; 1.26 + numToPutOntoEachCore = numRowIdxs*numColIdxs/(numCores-1); 1.27 leftOverFraction = 0; 1.28 numVecOnCurrCore = 0; 1.29 - coreToAssignOnto = 0; 1.30 + coreToAssignOnto = 1; 1.31 1.32 for( resRowIdx = 0; resRowIdx < numRowIdxs; resRowIdx++ ) 1.33 { 1.34 @@ -412,7 +412,7 @@ 1.35 1.36 //Move to next core, max core-value to incr to is numCores -1 1.37 coreToAssignOnto += 1; 1.38 - if( coreToAssignOnto >= numCores ) coreToAssignOnto = 0; 1.39 + if( coreToAssignOnto >= numCores ) coreToAssignOnto = 1; 1.40 } //if 1.41 } //for( vecIdx 1.42 } //for( resColIdx
