Ignore:
Timestamp:
08/30/10 14:14:29 (14 years ago)
Author:
lnalod
Message:

Update performance tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/berrada/MFLBC_RD_perfomanceMeasurement/scriptPerformance.sh

    r408 r411  
    3838 
    3939 
     40##### Speedups 
     41# Measure of the percentage of parallel code for the Amdahl law 
     42cp -f 2Y2_mflbc_rd_amdahl.h Yworkdir/Y2mflbc_rd.h  
     43YaoI +O3 mflbc_rd  
     44./mflbc_rd > resultAmdahlLaw.txt 
     45echo "Percentage of parallel code: " 
     46# cambiare il 4 per il 250--cambiato 
     47# PAR is the parallel code 
     48# PAR_percentage is the parallel code dived by 100 
     49PAR=`awk '/counter 250 percentage of parallel code/ {print $7}' resultAmdahlLaw.txt` 
     50echo $PAR 
     51PAR_percentage=`echo "scale=6;  $PAR/100" | bc` 
     52echo $PAR_percentage 
     53 
     54# not_PAR_percentage is 1-PAR_percentage 
     55not_PAR_percentage=`echo "1-$PAR_percentage" | bc` 
     56echo $not_PAR_percentage 
     57 
     58# P is the number of cores 
     59P2=2 
     60P4=4 
     61P8=8 
     62 
     63 
     64# S is the Amdahl speedup. S1 is the speedup for one thread. S2 is for 2 threads. S is for the serial version (always equals to 1). 
     65S=1 
     66S1=1 
     67S2=`echo "scale=6;  1/(($PAR_percentage/$P2)+ $not_PAR_percentage)" | bc` 
     68S4=`echo "scale=6;  1/(($PAR_percentage/$P4)+ $not_PAR_percentage)" | bc` 
     69S8=`echo "scale=6;  1/(($PAR_percentage/$P8)+ $not_PAR_percentage)" | bc` 
     70echo Amdahl speedup serial version 
     71echo $S 
     72echo Amdahl speedup 1 thread 
     73echo $S1 
     74echo Amdahl speedup 2 threads 
     75echo $S2 
     76echo Amdahl speedup 4 threads 
     77echo $S4 
     78echo Amdahl speedup 8 threads 
     79echo $S8 
     80echo  
     81 
     82# E elapsed time of the serial version. E1 for the 1 thread version. E2 for the 2 threads version. 
     83E=`awk '/counter 250/ {print $4}' resultNotParallelFile.txt` 
     84E1=`awk '/counter 250/ {print $4}' resultParallelFile_1thread.txt` 
     85E2=`awk '/counter 250/ {print $4}' resultParallelFile_2thread.txt` 
     86E4=`awk '/counter 250/ {print $4}' resultParallelFile_4thread.txt` 
     87E8=`awk '/counter 250/ {print $4}' resultParallelFile_8thread.txt` 
     88echo Elapsed time serial version 
     89echo $E 
     90echo Elapsed time 1 thread 
     91echo $E1 
     92echo Elapsed time 2 threads 
     93echo $E2 
     94echo Elapsed time 4 threads 
     95echo $E4 
     96echo Elapsed time 8 threads 
     97echo $E8 
     98echo  
     99 
     100 
     101 
     102 
     103 
    40104# Generate the matlab files 
    41105echo "A=[1; 2; 4; 8];" >> mflbc_rd_matlabFile.m 
     
    43107 
    44108echo "B=[" >> mflbc_rd_matlabFile.m 
    45 awk '/counter 250/ {print $4}' resultNotParallelFile.txt >> mflbc_rd_matlabFile.m 
     109#awk '/counter 250/ {print $4}' resultNotParallelFile.txt >> mflbc_rd_matlabFile.m 
     110echo $E >> mflbc_rd_matlabFile.m 
    46111echo "; " >> mflbc_rd_matlabFile.m 
    47 awk '/counter 250/ {print $4}' resultParallelFile_2thread.txt >> mflbc_rd_matlabFile.m 
     112#awk '/counter 250/ {print $4}' resultParallelFile_2thread.txt >> mflbc_rd_matlabFile.m 
     113echo $E2 >> mflbc_rd_matlabFile.m 
    48114echo "; " >> mflbc_rd_matlabFile.m 
    49 awk '/counter 250/ {print $4}' resultParallelFile_4thread.txt >> mflbc_rd_matlabFile.m 
     115#awk '/counter 250/ {print $4}' resultParallelFile_4thread.txt >> mflbc_rd_matlabFile.m 
     116echo $E4 >> mflbc_rd_matlabFile.m 
    50117echo "; " >> mflbc_rd_matlabFile.m 
    51 awk '/counter 250/ {print $4}' resultParallelFile_8thread.txt >> mflbc_rd_matlabFile.m 
     118#awk '/counter 250/ {print $4}' resultParallelFile_8thread.txt >> mflbc_rd_matlabFile.m 
     119echo $E8 >> mflbc_rd_matlabFile.m 
    52120echo "]; " >> mflbc_rd_matlabFile.m 
    53121 
     
    78146 
    79147 
     148echo "Elapsed time of the parallel 1 thread execution: " 
    80149awk '/counter 250/ {print $4}' resultParallelFile_1thread.txt 
    81150 
     
    86155 
    87156 
     157 
Note: See TracChangeset for help on using the changeset viewer.