From e2642ed620d038a87114b6f9df98385f216b96cd Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 31 Jan 2011 12:45:18 +0100 Subject: clean the script to generate the plots --- bench/btl/data/gnuplot_common_settings.hh | 18 ++++++------- bench/btl/data/go_mean | 4 +-- bench/btl/data/mk_mean_script.sh | 43 +++++++++++++++++-------------- bench/btl/data/mk_new_gnuplot.sh | 6 ++--- 4 files changed, 37 insertions(+), 34 deletions(-) (limited to 'bench/btl') diff --git a/bench/btl/data/gnuplot_common_settings.hh b/bench/btl/data/gnuplot_common_settings.hh index 00ae2867b..6f677df60 100644 --- a/bench/btl/data/gnuplot_common_settings.hh +++ b/bench/btl/data/gnuplot_common_settings.hh @@ -21,7 +21,7 @@ set key title "" set key left top Right noreverse box linetype -2 linewidth 1.000 samplen 4 spacing 1 width 0 set nolabel set noarrow -set nolinestyle +# set nolinestyle # deprecated set nologscale set logscale x 10 set offsets 0, 0, 0, 0 @@ -43,8 +43,8 @@ set cntrparam levels auto 5 set cntrparam points 5 set size ratio 0 1,1 set origin 0,0 -set data style lines -set function style lines +# set data style lines +# set function style lines set xzeroaxis lt -2 lw 1.000 set x2zeroaxis lt -2 lw 1.000 set yzeroaxis lt -2 lw 1.000 @@ -61,21 +61,21 @@ set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics -set timestamp "" bottom norotate 0.000000,0.000000 "" +set timestamp "" bottom norotate offset 0,0 set rrange [ * : * ] noreverse nowriteback # (currently [-0:10] ) set trange [ * : * ] noreverse nowriteback # (currently [-5:5] ) set urange [ * : * ] noreverse nowriteback # (currently [-5:5] ) set vrange [ * : * ] noreverse nowriteback # (currently [-5:5] ) -set xlabel "matrix size" 0.000000,0.000000 -set x2label "" 0.000000,0.000000 +set xlabel "matrix size" offset 0,0 +set x2label "" offset 0,0 set timefmt "%d/%m/%y\n%H:%M" set xrange [ 10 : 1000 ] noreverse nowriteback set x2range [ * : * ] noreverse nowriteback # (currently [-10:10] ) -set ylabel "MFLOPS" 0.000000,0.000000 -set y2label "" 0.000000,0.000000 +set ylabel "MFLOPS" offset 0,0 +set y2label "" offset 0,0 set yrange [ * : * ] noreverse nowriteback # (currently [-10:10] ) set y2range [ * : * ] noreverse nowriteback # (currently [-10:10] ) -set zlabel "" 0.000000,0.000000 +set zlabel "" offset 0,0 set zrange [ * : * ] noreverse nowriteback # (currently [-10:10] ) set zero 1e-08 set lmargin -1 diff --git a/bench/btl/data/go_mean b/bench/btl/data/go_mean index fdc8d8c75..37f29fa17 100755 --- a/bench/btl/data/go_mean +++ b/bench/btl/data/go_mean @@ -38,8 +38,8 @@ source mk_mean_script.sh atv $1 11 50 300 1000 $mode $prefix source mk_mean_script.sh matrix_matrix $1 11 100 300 1000 $mode $prefix source mk_mean_script.sh aat $1 11 100 300 1000 $mode $prefix source mk_mean_script.sh ata $1 11 100 300 1000 $mode $prefix -source mk_mean_script.sh trisolve $1 11 100 300 1000 $mode $prefix -source mk_mean_script.sh matrix_trisolve $1 11 100 300 1000 $mode $prefix +source mk_mean_script.sh trisolve_vector $1 11 100 300 1000 $mode $prefix +source mk_mean_script.sh trisolve_matrix $1 11 100 300 1000 $mode $prefix source mk_mean_script.sh cholesky $1 11 100 300 1000 $mode $prefix source mk_mean_script.sh complete_lu_decomp $1 11 100 300 1000 $mode $prefix source mk_mean_script.sh partial_lu_decomp $1 11 100 300 1000 $mode $prefix diff --git a/bench/btl/data/mk_mean_script.sh b/bench/btl/data/mk_mean_script.sh index 43bab559a..b10df0240 100644 --- a/bench/btl/data/mk_mean_script.sh +++ b/bench/btl/data/mk_mean_script.sh @@ -13,34 +13,37 @@ WORK_DIR=tmp mkdir $WORK_DIR DATA_FILE=`find $DIR -name "*.dat" | grep _${WHAT}` -echo "" -echo "$1..." -for FILE in $DATA_FILE -do - ##echo hello world - ##echo "mk_mean_script1" ${FILE} - BASE=${FILE##*/} ; BASE=${FILE##*/} ; AVANT=bench_${WHAT}_ ; REDUC=${BASE##*$AVANT} ; TITLE=${REDUC%.dat} - ##echo "mk_mean_script1" ${TITLE} - cp $FILE ${WORK_DIR}/${TITLE} +if [ -n "$DATA_FILE" ]; then -done + echo "" + echo "$1..." + for FILE in $DATA_FILE + do + ##echo hello world + ##echo "mk_mean_script1" ${FILE} + BASE=${FILE##*/} ; BASE=${FILE##*/} ; AVANT=bench_${WHAT}_ ; REDUC=${BASE##*$AVANT} ; TITLE=${REDUC%.dat} -cd $WORK_DIR -../main $1 $3 $4 $5 $6 * >> ../$meanstatsfilename -../mk_new_gnuplot.sh $1 $2 $7 -rm -f *.gnuplot -cd .. + ##echo "mk_mean_script1" ${TITLE} + cp $FILE ${WORK_DIR}/${TITLE} -rm -R $WORK_DIR + done + + cd $WORK_DIR + ../main $1 $3 $4 $5 $6 * >> ../$meanstatsfilename + ../mk_new_gnuplot.sh $1 $2 $7 + rm -f *.gnuplot + cd .. -echo '
' >> $meanstatsfilename + echo '
' >> $meanstatsfilename -webpagefilename=$2/index.html -# echo '

'${WHAT}'

' >> $webpagefilename -echo '
'${WHAT}'
' >> $webpagefilename + webpagefilename=$2/index.html + # echo '

'${WHAT}'

' >> $webpagefilename + echo '
'${WHAT}'
' >> $webpagefilename +fi +rm -R $WORK_DIR diff --git a/bench/btl/data/mk_new_gnuplot.sh b/bench/btl/data/mk_new_gnuplot.sh index 96a2a4e1a..fad3b23a4 100755 --- a/bench/btl/data/mk_new_gnuplot.sh +++ b/bench/btl/data/mk_new_gnuplot.sh @@ -5,11 +5,11 @@ DIR=$2 cat ../gnuplot_common_settings.hh > ${WHAT}.gnuplot echo "set title " `grep ${WHAT} ../action_settings.txt | head -n 1 | cut -d ";" -f 2` >> $WHAT.gnuplot -echo "set xlabel " `grep ${WHAT} ../action_settings.txt | head -n 1 | cut -d ";" -f 3` "0.000000,0.000000" >> $WHAT.gnuplot +echo "set xlabel " `grep ${WHAT} ../action_settings.txt | head -n 1 | cut -d ";" -f 3` " offset 0,0" >> $WHAT.gnuplot echo "set xrange [" `grep ${WHAT} ../action_settings.txt | head -n 1 | cut -d ";" -f 4` "]" >> $WHAT.gnuplot if [ $# > 3 ]; then - if [ $3 == "tiny" ]; then + if [ "$3" == "tiny" ]; then echo "set xrange [2:16]" >> $WHAT.gnuplot echo "set nologscale" >> $WHAT.gnuplot fi @@ -49,6 +49,6 @@ gnuplot -persist < $WHAT.gnuplot rm $WHAT.gnuplot ps2pdf ../${DIR}/$WHAT.ps ../${DIR}/$WHAT.pdf -convert -density 120 -rotate 90 -resize 800 +dither -colors 48 -quality 0 ../${DIR}/$WHAT.ps ../${DIR}/$WHAT.png +convert -background white -density 120 -rotate 90 -resize 800 +dither -colors 256 -quality 0 ../${DIR}/$WHAT.ps -background white -flatten ../${DIR}/$WHAT.png # pstoedit -rotate -90 -xscale 0.8 -yscale 0.8 -centered -yshift -50 -xshift -100 -f plot-svg aat.ps aat2.svg -- cgit v1.2.3