histo + lines (only .dat are ready)
This commit is contained in:
parent
69417b1cfa
commit
31a2e59227
|
@ -2,12 +2,14 @@
|
||||||
|
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
#comList = `ls | perl -pi -e 's/.*-(\w+)_com/$1/' | sort | uniq`
|
#barriereList="jikes_barrier asm_cache c_cache fake"
|
||||||
|
barriereList="jikes_barrier asm_cache c_cache"
|
||||||
|
communicationList="asm_cache c_cache shared_mem shared_mem_opt pipe"
|
||||||
comList=`ls *.log | perl -ni -e '/-([^-]+)_comm/; $a{$1}=""; END { foreach ( sort keys %a ) {print "$_ "}}'`
|
comList=`ls *.log | perl -ni -e '/-([^-]+)_comm/; $a{$1}=""; END { foreach ( sort keys %a ) {print "$_ "}}'`
|
||||||
cacheList=`ls *log | perl -ni -e '/cache_([^-]+)-/; $a{$1}=""; END { foreach ( sort keys %a ) {print "$_ "}}'`
|
cacheList=`ls *log | perl -ni -e '/cache_([^-]+)-/; $a{$1}=""; END { foreach ( sort keys %a ) {print "$_ "}}'`
|
||||||
prodList=`ls *.log | perl -ni -e '/typeProd_([^-]+)-/; $a{$1}=""; END { foreach ( sort keys %a ) {print "$_ "}}'`
|
prodList=`ls *.log | perl -ni -e '/typeProd_([^-]+)-/; $a{$1}=""; END { foreach ( sort keys %a ) {print "$_ "}}'`
|
||||||
barriereList="jikes_barrier asm_cache c_cache fake"
|
barriereCommaList=`echo $barriereList | sed "s/ /,/g"`
|
||||||
communicationList="asm_cache c_cache shared_mem shared_mem_opt pipe"
|
argTypeProdList=`eval ls *typeProd_useless_loop*{$barriereCommaList}_comm.log | perl -ni -e '/argTypeProd_([\d]+)-/; $a{$1}=""; END { foreach ( sort { $a <=> $b } keys %a ) {print "$_ "}}'`
|
||||||
|
|
||||||
metriqueList="cache_hits cache_miss cycles total_time"
|
metriqueList="cache_hits cache_miss cycles total_time"
|
||||||
|
|
||||||
|
@ -20,40 +22,84 @@ echo "set bmargin 5" >> multicores.gnuplot
|
||||||
echo "set terminal postscript landscape color" >> multicores.gnuplot
|
echo "set terminal postscript landscape color" >> multicores.gnuplot
|
||||||
|
|
||||||
for prod in $prodList ; do
|
for prod in $prodList ; do
|
||||||
|
case "$prod" in
|
||||||
|
matrice) argTypeProd=16 ;;
|
||||||
|
*) argTypeProd=1 ;;
|
||||||
|
esac
|
||||||
for bench in "communication" "barriere" ; do
|
for bench in "communication" "barriere" ; do
|
||||||
for metrique in $metriqueList ; do
|
for metrique in $metriqueList ; do
|
||||||
> bench_$bench-prod_$prod-$metrique.dat
|
> bench_$bench-prod_$prod-metrique_$metrique.dat
|
||||||
for file in cache_$cache-*-typeProd_$prod-*-${com}_comm.log ; do
|
if [ $bench = "communication" -o $prod != "useless_loop" ] ; then
|
||||||
argTypeProd=`echo "$file" | sed -r "s/.*argTypeProd_([[:digit:]]+).*/\1/"`
|
echo -ne "Method\t\t" >> bench_$bench-prod_$prod-metrique_$metrique.dat
|
||||||
echo -ne "\t\t$argTypeProd" >> bench_$bench-prod_$prod-$metrique.dat
|
for cache in $cacheList ; do
|
||||||
|
echo -ne "\t$cache" >> bench_$bench-prod_$prod-metrique_$metrique.dat
|
||||||
done
|
done
|
||||||
|
else
|
||||||
|
echo -ne "argTypeProd\t\t" >> bench_$bench-prod_$prod-metrique_$metrique.dat
|
||||||
|
for com in `eval echo \\\$\${bench}List` ; do
|
||||||
|
echo -ne "\t$com" >> bench_$bench-prod_$prod-metrique_$metrique.dat
|
||||||
done
|
done
|
||||||
|
echo "" >> bench_$bench-prod_$prod-metrique_$metrique.dat
|
||||||
|
fi
|
||||||
|
# for file in cache_$cache-*-typeProd_$prod-*-${com}_comm.log ; do
|
||||||
|
# argTypeProd=`echo "$file" | sed -r "s/.*argTypeProd_([[:digit:]]+).*/\1/"`
|
||||||
|
# echo -ne "\t\t$argTypeProd" >> bench_$bench-prod_$prod-$metrique.dat
|
||||||
|
# done
|
||||||
|
done
|
||||||
|
if [ $bench = "communication" -o $prod != "useless_loop" ] ; then
|
||||||
for com in `eval echo \\\$\${bench}List` ; do
|
for com in `eval echo \\\$\${bench}List` ; do
|
||||||
for metrique in $metriqueList ; do
|
for metrique in $metriqueList ; do
|
||||||
echo -ne "\n$com\t\t" >> bench_$bench-prod_$prod-$metrique.dat
|
case "$metrique" in
|
||||||
done
|
cache_hits) metriquePattern="cache hits" ;;
|
||||||
|
cache_miss) metriquePattern="cache miss" ;;
|
||||||
|
cycles) metriquePattern="cycles" ;;
|
||||||
|
total_time) metriquePattern="total_time" ;;
|
||||||
|
*) echo "Pas de pattern pour cette métrique : $metrique" ; exit 1 ;;
|
||||||
|
esac
|
||||||
|
for i in 1 2 3 ; do # 1: total, 2: by loop, 3: by write
|
||||||
|
echo -ne "\n$com\t\t" >> bench_$bench-prod_$prod-metrique_$metrique.dat
|
||||||
for cache in $cacheList ; do
|
for cache in $cacheList ; do
|
||||||
for value in `perl -n -e 'print "$1 $2 $3 " if /cache hits.* (\d+) \/ (\S+) \/ (\S+)/' cache_$cache-*-typeProd_$prod-*-${com}_comm.log` ; do
|
if [ $i -eq 1 ]
|
||||||
echo -ne "\t$value " >> bench_$bench-prod_$prod-cache_hits.dat
|
|
||||||
done
|
|
||||||
for value in `perl -n -e 'print "$1 $2 $3 " if /cache miss.* (\d+) \/ (\S+) \/ (\S+)/' cache_$cache-*-typeProd_$prod-*-${com}_comm.log` ; do
|
|
||||||
echo -ne "\t$value" >> bench_$bench-prod_$prod-cache_miss.dat
|
|
||||||
done
|
|
||||||
for value in `perl -n -e 'print "$1 $2 $3 " if /cycles.* (\d+) \/ (\S+) \/ (\S+)/' cache_$cache-*-typeProd_$prod-*-${com}_comm.log` ; do
|
|
||||||
echo -ne "\t$value" >> bench_$bench-prod_$prod-cycles.dat
|
|
||||||
done
|
|
||||||
for value in `perl -n -e 'print "$1 $2 $3 " if /total_time.* (\S+) \/ (\S+) \/ (\S+)/' cache_$cache-*-typeProd_$prod-*-${com}_comm.log` ; do
|
|
||||||
echo -ne "\t$value" >> bench_$bench-prod_$prod-total_time.dat
|
|
||||||
done
|
|
||||||
|
|
||||||
done
|
|
||||||
done
|
|
||||||
if [ "${bench}" = "barriere" ] ;
|
|
||||||
then
|
then
|
||||||
echo "set style data lines" >> multicores.gnuplot
|
eval value$cache=\"`perl -n -e "print \"\\$1 \\$2 \\$3 \" if /$metriquePattern.* (\S+) \/ (\S+) \/ (\S+)/" cache_$cache-*-typeProd_$prod-argTypeProd_$argTypeProd-*-${com}_comm.log`\"
|
||||||
else
|
|
||||||
echo "set style data histogram" >> multicores.gnuplot
|
|
||||||
fi
|
fi
|
||||||
|
eval echo -ne "\${value$cache}" | cut -d ' ' -f $i | sed -r 's/(.*)/\t\1/' | tr -d '\n' >> bench_$bench-prod_$prod-metrique_$metrique.dat
|
||||||
|
done
|
||||||
|
done
|
||||||
|
done
|
||||||
|
done
|
||||||
|
else
|
||||||
|
for metrique in $metriqueList ; do
|
||||||
|
case "$metrique" in
|
||||||
|
cache_hits) metriquePattern="cache hits" ;;
|
||||||
|
cache_miss) metriquePattern="cache miss" ;;
|
||||||
|
cycles) metriquePattern="cycles" ;;
|
||||||
|
total_time) metriquePattern="total_time" ;;
|
||||||
|
*) echo "Pas de pattern pour cette métrique : $metrique" ; exit 1 ;;
|
||||||
|
esac
|
||||||
|
for argTypeProd in $argTypeProdList ; do
|
||||||
|
for cache in $cacheList ; do
|
||||||
|
echo "" >> bench_$bench-prod_$prod-metrique_$metrique.dat
|
||||||
|
for i in 1 2 3 ; do # 1: total, 2: by loop, 3: by write
|
||||||
|
echo -ne "\n$argTypeProd\t\t" >> bench_$bench-prod_$prod-metrique_$metrique.dat
|
||||||
|
for com in `eval echo \\\$\${bench}List` ; do
|
||||||
|
if [ $i -eq 1 ]
|
||||||
|
then
|
||||||
|
eval value$com=\"`perl -n -e "print \"\\$1 \\$2 \\$3 \" if /$metriquePattern.* (\S+) \/ (\S+) \/ (\S+)/" cache_$cache-*-typeProd_$prod-argTypeProd_$argTypeProd-*-${com}_comm.log`\"
|
||||||
|
fi
|
||||||
|
eval echo -ne "\${value$com}" | cut -d ' ' -f $i | sed -r 's/(.*)/\t\1/' | tr -d '\n' >> bench_$bench-prod_$prod-metrique_$metrique.dat
|
||||||
|
done
|
||||||
|
done
|
||||||
|
done
|
||||||
|
done
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ "${bench}" != "barriere" ] ;
|
||||||
|
then
|
||||||
|
# echo "set style data lines" >> multicores.gnuplot
|
||||||
|
#else
|
||||||
|
echo "set style data histogram" >> multicores.gnuplot
|
||||||
|
#fi
|
||||||
for metrique in $metriqueList ; do
|
for metrique in $metriqueList ; do
|
||||||
case "$metrique" in
|
case "$metrique" in
|
||||||
cache_hits) ylabel="Nb cache hit" ;;
|
cache_hits) ylabel="Nb cache hit" ;;
|
||||||
|
@ -70,15 +116,16 @@ for prod in $prodList ; do
|
||||||
echo "set title \"Producteur : $prod\"" >> multicores.gnuplot
|
echo "set title \"Producteur : $prod\"" >> multicores.gnuplot
|
||||||
echo "set ylabel \"$ylabel\"" >> multicores.gnuplot
|
echo "set ylabel \"$ylabel\"" >> multicores.gnuplot
|
||||||
echo "set output 'bench_$bench-prod_$prod-$metrique-total-$yscale.ps'" >> multicores.gnuplot
|
echo "set output 'bench_$bench-prod_$prod-$metrique-total-$yscale.ps'" >> multicores.gnuplot
|
||||||
echo "plot 'bench_$bench-prod_$prod-$metrique.dat' using 2:xtic(1) ti 'L2', '' u 5 ti 'MEM'" >> multicores.gnuplot
|
echo "plot 'bench_$bench-prod_$prod-metrique_$metrique.dat' every 3:1 using 2:xtic(1) title 2 , '' every 3:1 u 3 ti 3" >> multicores.gnuplot
|
||||||
echo "set ylabel \"$ylabel par boucle\"" >> multicores.gnuplot
|
echo "set ylabel \"$ylabel par boucle\"" >> multicores.gnuplot
|
||||||
echo "set output 'bench_$bench-prod_$prod-$metrique-byLoop-$yscale.ps'" >> multicores.gnuplot
|
echo "set output 'bench_$bench-prod_$prod-$metrique-byLoop-$yscale.ps'" >> multicores.gnuplot
|
||||||
echo "plot 'bench_$bench-prod_$prod-$metrique.dat' using 3:xtic(1) ti 'L2', '' u 6 ti 'MEM'" >> multicores.gnuplot
|
echo "plot 'bench_$bench-prod_$prod-metrique_$metrique.dat' every 3:2 using 2:xtic(1) title 2 , '' every 3:2 u 3 ti 3" >> multicores.gnuplot
|
||||||
echo "set ylabel \"$ylabel par ecriture\"" >> multicores.gnuplot
|
echo "set ylabel \"$ylabel par ecriture\"" >> multicores.gnuplot
|
||||||
echo "set output 'bench_$bench-prod_$prod-$metrique-byWrite-$yscale.ps'" >> multicores.gnuplot
|
echo "set output 'bench_$bench-prod_$prod-$metrique-byWrite-$yscale.ps'" >> multicores.gnuplot
|
||||||
echo "plot 'bench_$bench-prod_$prod-$metrique.dat' using 4:xtic(1) ti 'L2', '' u 7 ti 'MEM'" >> multicores.gnuplot
|
echo "plot 'bench_$bench-prod_$prod-metrique_$metrique.dat' every 3:3 using 2:xtic(1) title 2 , '' every 3:3 u 3 ti 3" >> multicores.gnuplot
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue