Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > VCilk > VCilk__Blocked_Matrix_Mult__Bench
changeset 3:12bcb9728e1c
Added DEBUG statements for debuggine
author | Me |
---|---|
date | Mon, 15 Nov 2010 12:08:19 -0800 |
parents | 5311bd32c3cb |
children | ecba4ae0be7a |
files | src/Application/VCilk__Matrix_Mult/Divide_Pr.c src/Application/VCilk__Matrix_Mult/Vector_Pr.c src/Application/VCilk__Matrix_Mult/subMatrix_Pr.c src/Application/main.c |
diffstat | 4 files changed, 20 insertions(+), 11 deletions(-) [+] |
line diff
1.1 --- a/src/Application/VCilk__Matrix_Mult/Divide_Pr.c Mon Nov 08 03:59:51 2010 -0800 1.2 +++ b/src/Application/VCilk__Matrix_Mult/Divide_Pr.c Mon Nov 15 12:08:19 2010 -0800 1.3 @@ -208,7 +208,7 @@ 1.4 // system, by entry-point Fn, and passed in through dividerParams. 1.5 //So, nothing to do to send results back -- they're seen by side-effect 1.6 1.7 - DEBUG( dbgAppFlow, "end divide\n") 1.8 + DEBUG( dbgAppFlow, "*** end divide ***\n") 1.9 1.10 VMS__record_interval_end_in_probe( divideProbe ); 1.11 VMS__print_stats_of_all_probes(); 1.12 @@ -287,6 +287,9 @@ 1.13 slicingStrucCarrier->vecSlices = vecSlices; 1.14 slicingStrucCarrier->rightColSlices = rightColSlices; 1.15 1.16 + DEBUG1( dbgAppFlow, "leftRowSlices %d | ", leftRowSlices->numVals ); 1.17 + DEBUG1( dbgAppFlow, "rightColSlices %d | ",rightColSlices->numVals); 1.18 + DEBUG1( dbgAppFlow, "vecSlices %d\n", vecSlices->numVals ); 1.19 return slicingStrucCarrier; 1.20 } 1.21
2.1 --- a/src/Application/VCilk__Matrix_Mult/Vector_Pr.c Mon Nov 08 03:59:51 2010 -0800 2.2 +++ b/src/Application/VCilk__Matrix_Mult/Vector_Pr.c Mon Nov 15 12:08:19 2010 -0800 2.3 @@ -9,6 +9,7 @@ 2.4 2.5 #include "VCilk__Matrix_Mult.h" 2.6 #include <math.h> 2.7 +#include <stdlib.h> 2.8 2.9 2.10 void inline 2.11 @@ -33,6 +34,7 @@ 2.12 2.13 vecParams = (VecParams *)_vecParams; 2.14 2.15 + DEBUG1( dbgAppFlow, "start vector %d\n", animPr->procrID) 2.16 #ifdef TURN_ON_DEBUG_PROBES 2.17 int32 subMatrixVectorProbe = 2.18 VMS__create_single_interval_probe( "subMtxVect", animPr ); 2.19 @@ -70,7 +72,9 @@ 2.20 vecOfSubMatrixParams[ vecIdx ] = subMatrixPairParams; 2.21 } 2.22 2.23 + DEBUG1( dbgAppFlow, "before sync in vector %d\n", animPr->procrID) 2.24 VCilk__sync( animPr ); 2.25 + DEBUG1( dbgAppFlow, "**after sync in vector %d\n", animPr->procrID) 2.26 2.27 //now accumulate individual result matrices into final result matrix 2.28 for( vecIdx = 0; vecIdx < numVecIdxs; vecIdx++ ) 2.29 @@ -99,6 +103,7 @@ 2.30 VMS__record_interval_end_in_probe( subMatrixVectorProbe ); 2.31 #endif 2.32 2.33 + DEBUG1( dbgAppFlow, "end vector %d\n", animPr->procrID) 2.34 VCilk__dissipate_procr( animPr ); 2.35 } 2.36
3.1 --- a/src/Application/VCilk__Matrix_Mult/subMatrix_Pr.c Mon Nov 08 03:59:51 2010 -0800 3.2 +++ b/src/Application/VCilk__Matrix_Mult/subMatrix_Pr.c Mon Nov 15 12:08:19 2010 -0800 3.3 @@ -43,7 +43,7 @@ 3.4 *When done, it sends the result to the result processor 3.5 */ 3.6 void 3.7 -calcSubMatrixProduct( void *data, VirtProcr *animatingPr ) 3.8 +calcSubMatrixProduct( void *data, VirtProcr *animPr ) 3.9 { 3.10 SMPairParams *params; 3.11 VirtProcr *resultPr; 3.12 @@ -51,11 +51,11 @@ 3.13 SubMatrix *leftSubMatrix, *rightSubMatrix; 3.14 3.15 3.16 - DEBUG( dbgAppFlow, "start sub-matrix mult\n") 3.17 + DEBUG1( dbgAppFlow, "start sub-matrix mult %d\n", animPr->procrID) 3.18 #ifdef TURN_ON_DEBUG_PROBES 3.19 int32 subMatrixProbe = 3.20 - VMS__create_single_interval_probe( "subMtx", animatingPr); 3.21 - VMS__record_sched_choice_into_probe( subMatrixProbe, animatingPr ); 3.22 + VMS__create_single_interval_probe( "subMtx", animPr); 3.23 + VMS__record_sched_choice_into_probe( subMatrixProbe, animPr ); 3.24 VMS__record_interval_start_in_probe( subMatrixProbe ); 3.25 #endif 3.26 3.27 @@ -65,8 +65,8 @@ 3.28 rightSubMatrix = params->rightSubMatrix; 3.29 3.30 //make sure the input sub-matrices have been copied out of orig 3.31 - copyFromOrig( leftSubMatrix, animatingPr ); 3.32 - copyTransposeFromOrig( rightSubMatrix, animatingPr ); 3.33 + copyFromOrig( leftSubMatrix, animPr ); 3.34 + copyTransposeFromOrig( rightSubMatrix, animPr ); 3.35 3.36 leftArray = leftSubMatrix->array; 3.37 rightArray = rightSubMatrix->array; 3.38 @@ -85,7 +85,7 @@ 3.39 //This is freed in the vector processor 3.40 int32 3.41 resSize = leftSubMatrix->numRows * rightSubMatrix->numCols * sizeof(float32); 3.42 - resArray = VCilk__malloc( resSize, animatingPr ); 3.43 + resArray = VCilk__malloc( resSize, animPr ); 3.44 memset( resArray, 0, resSize ); 3.45 3.46 3.47 @@ -106,7 +106,8 @@ 3.48 VMS__record_interval_end_in_probe( subMatrixProbe ); 3.49 #endif 3.50 3.51 - VCilk__dissipate_procr( animatingPr ); 3.52 + DEBUG1( dbgAppFlow, "end sub-matrix mult %d\n", animPr->procrID) 3.53 + VCilk__dissipate_procr( animPr ); 3.54 } 3.55 3.56
4.1 --- a/src/Application/main.c Mon Nov 08 03:59:51 2010 -0800 4.2 +++ b/src/Application/main.c Mon Nov 15 12:08:19 2010 -0800 4.3 @@ -26,10 +26,10 @@ 4.4 4.5 resultMatrix = multiplyTheseMatrices( leftMatrix, rightMatrix ); 4.6 4.7 - printf("\nresult matrix: \n"); 4.8 +// printf("\nresult matrix: \n"); \ 4.9 printMatrix( resultMatrix ); 4.10 4.11 // VCilk__print_stats(); 4.12 - 4.13 + fflush(stdin); 4.14 exit(0); //cleans up 4.15 }