Eleni, this calls for a proper configure check and conditionals to reduce/eliminate (extra) code maintenance overhead ;-) Feel free to ask in case you need more detailed pointers ... Stefan ----- Original Message -----
Changeset: da0067120542 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=da0067120542 Modified Files: monetdb5/extras/crackers/crackers_selectholpl_ops.mx Branch: holindex Log Message:
Comment lines that use papi in order to measure hardware events.
diffs (59 lines):
diff --git a/monetdb5/extras/crackers/crackers_selectholpl_ops.mx b/monetdb5/extras/crackers/crackers_selectholpl_ops.mx --- a/monetdb5/extras/crackers/crackers_selectholpl_ops.mx +++ b/monetdb5/extras/crackers/crackers_selectholpl_ops.mx @@ -77,6 +77,7 @@ crackers_export str CRKrandomholpl_@1(in */ #include "monetdb_config.h" #include "crackers.h" +//#include
/* Local support functions and macros */ @:TypeSwitch(crackOperations)@ @@ -384,7 +385,7 @@ CRKrandomholpl_@1(int *bid, bit *inclusi FN->c = FN->c + incr_pieces; if(FN->weight > 0) FN->weight = changeWeight(FN,countBatElements,L1); - fprintf(ofp,"Idle_Query \t 0 \t Bat_id= \t %d \t Pieces= \t %d \t Wait_time\t %9.6lf \t Selection_time\t %9.6lf \t Low= \t %d \t Thread_id= \t" SZFMT "\n",FN->bid,FN->c,wt,ct,(int)*low,MT_getpid()); + fprintf(ofp,"Idle_Query \t 0 \t Bat_id= \t %d \t Pieces= \t %d \t Wait_time\t %9.6lf \t Selection_time\t %9.6lf \t Thread_id= \t" SZFMT "\n",FN->bid,FN->c,wt,ct,MT_getpid()); fclose(ofp); MT_lock_unset(&frequencylock, "getFrequencyStruct");
@@ -1371,6 +1372,12 @@ CRKRangeLeftNilTree_@1(int *vid, int *bi FrequencyNode *FrequencyStructA = getFrequencyStruct('A'); FILE *ofp; char *outputFilename1; + //long long counters[2]; + //int PAPI_events[] = { + // PAPI_L2_DCA, + // PAPI_L2_DCM}; + + //PAPI_start_counters(PAPI_events, 2);
gettimeofday(&tv0,0);
@@ -1444,8 +1451,10 @@ CRKRangeLeftNilTree_@1(int *vid, int *bi FN->c = FN->c + incr_pieces; FN->weight = changeWeight(FN,countBatElements,L1); gettimeofday(&tv1,0); ct+=dt(tv0,tv1); tv0=tv1; - fprintf(ofp,"User_Query \t 0 \t Bat_id= \t %d \t Pieces= \t %d \t Wait_time\t %9.6lf \t Selection_time\t %9.6lf \t Hgh= \t %d \t Thread_id= \t" SZFMT "\n",FN->bid,FN->c,wt,ct,(int)*hgh,MT_getpid()); -+ fclose(ofp); + //PAPI_read_counters(counters, 2); + //fprintf(ofp,"User_Query \t 0 \t Bat_id= \t %d \t Pieces= \t %d \t Wait_time\t %9.6lf \t Selection_time\t %9.6lf \t Thread_id= \t" SZFMT "\t L2_DCA= \t %lld \t L2_DCM \t %lld\n",FN->bid,FN->c,wt,ct,MT_getpid(),counters[0],counters[1]); + fprintf(ofp,"User_Query \t 0 \t Bat_id= \t %d \t Pieces= \t %d \t Wait_time\t %9.6lf \t Selection_time\t %9.6lf \t Thread_id= \t" SZFMT "\n",FN->bid,FN->c,wt,ct,MT_getpid()); + fclose(ofp); MT_lock_unset(&frequencylock, "getFrequencyStruct");
BBPincref(b->batCacheid,TRUE); @@ -1552,8 +1561,10 @@ CRKRangeLeftNilTree_@1(int *vid, int *bi if(FN->weight > 0) FN->weight = changeWeight(FN,countBatElements,L1); gettimeofday(&tv1,0); ct+=dt(tv0,tv1); tv0=tv1; - fprintf(ofp,"User_Query \t 0 \t Bat_id= \t %d \t Pieces= \t %d \t Wait_time\t %9.6lf \t Selection_time\t %9.6lf \t Hgh= \t %d \t Thread_id= \t" SZFMT "\n",FN->bid,FN->c,wt,ct,(int)*hgh,MT_getpid()); -+ fclose(ofp); + //PAPI_read_counters(counters, 2); + //fprintf(ofp,"User_Query \t 0 \t Bat_id= \t %d \t Pieces= \t %d \t Wait_time\t %9.6lf \t Selection_time\t %9.6lf \t Thread_id= \t" SZFMT "\t L2_DCA \t %lld \t L2_DCM= \t %lld \n",FN->bid,FN->c,wt,ct,MT_getpid(),counters[0],counters[1]); + fprintf(ofp,"User_Query \t 0 \t Bat_id= \t %d \t Pieces= \t %d \t Wait_time\t %9.6lf \t Selection_time\t %9.6lf \t Thread_id= \t" SZFMT "\n",FN->bid,FN->c,wt,ct,MT_getpid()); + fclose(ofp); MT_lock_unset(&frequencylock, "getFrequencyStruct");
_______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
-- | Stefan.Manegold@CWI.nl | DB Architectures (DA) | | www.CWI.nl/~manegold/ | Science Park 123 (L321) | | +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) |