| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 | #!/bin/bash## StarPU# Copyright (C) INRIA 2008-2009 (see AUTHORS file)## This program is free software; you can redistribute it and/or modify# it under the terms of the GNU Lesser General Public License as published by# the Free Software Foundation; either version 2.1 of the License, or (at# your option) any later version.## This program is distributed in the hope that it will be useful, but# WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.## See the GNU Lesser General Public License in COPYING.LGPL for more details.##suffix="-5800"suffix=""TIMINGDIR=$PWD/timing$suffix/sizelist=""schedlist=""outputfiles=""for file in `find $TIMINGDIR -type f`do	name=`basename $file`	size=`echo $name|sed -e "s/.*\.\(.*\)\..*/\1/"`	sched=`echo $name|sed -e "s/\(.*\)\..*\(\..*\)/\1/"`	sizelist="$sizelist $size"	schedlist="$schedlist $sched"donesizelist=`echo $sizelist|tr " " "\n" |sort -n|uniq`schedlist=`echo $schedlist|tr " " "\n" |sort|uniq`for prio in `seq 0 1`dofor sched in $schedlistdo	outputfile=output$suffix.$sched.$prio	outputfiles="$outputfiles $outputfile"	rm -f $outputfile	for size in $sizelist	do		filename=$TIMINGDIR/$sched.$size.$prio		if test -f $filename; then			# file exists			sum=0			nsample=0						for val in `cat $filename`			do				nsample=$(($nsample + 1))				sum=$(echo "$sum + $val"|bc -l)			done			avg=$(echo "$sum / $nsample"|bc -l)			gflops=$(echo "$size * $size * $size / ( $avg * 3000000)"|bc -l)			echo "$size	$gflops" >> $outputfile		else			# file does not exist			echo "$size	x" >> $outputfile 		fi	donedonedonegnuplotline=""for outputfile in $outputfilesdo	line=" \"$outputfile\" with linespoint"	gnuplotline="$gnuplotline $line @"donegnuplotarg=`echo $gnuplotline|tr '@' ','|sed -e "s/\(.*\),/\1/"`prefix=choleskygnuplot > /dev/null << EOFset term postscript eps enhanced colorset output "$prefix$suffix.eps"set datafile missing 'x'set pointsize 0.75#set title "Impact of granularity"set grid yset grid xset xrange [0:49152]#set logscale x#set xtics 8192,8192,65536#set key invert box right bottom title "Scheduling policy"#set size 0.65set xlabel "Matrix size"set ylabel "GFlop/s"plot $gnuplotargEOF
 |