| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 | #!/bin/bash# StarPU --- Runtime system for heterogeneous multicore architectures.# # Copyright (C) 2009, 2010  Université de Bordeaux 1# Copyright (C) 2010  Centre National de la Recherche Scientifique# # StarPU 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.# # StarPU 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.DIR=$PWDROOTDIR=$DIR/../..BUILDDIR=$PWD/build/INSTALLDIR=$PWD/local/PERFDIR=$DIR/sampling/make -C ../../ distcleanmkdir -p $PERFDIRmkdir -p $BUILDDIRcd $BUILDDIR$DIR/../../configure -C --prefix=$INSTALLDIR --with-goto-dir=/home/gonnet/These/Libs/GotoBLAS/GotoBLAS/ --enable-verbosemake -j 10make installsizelist="16 32 48 64 96 128 192 256 384 512 1024 2048 4096"cpu_output=$DIR/output.cpugpu_output=$DIR/output.gpurm -f $cpu_outputrm -f $gpu_outputexport STARPU_WORKERS_CPUID="2"export STARPU_CALIBRATE=1export STARPU_SCHED="dm"# benchmark GotoBLASfor size in $sizelist;do	niter=1000	if test $size -ge 512; then		niter=20	fi	if test $size -ge 2048; then		niter=5	fi	echo "GotoBLAS -> size $size niter $niter"	timing=`STARPU_NCPUS=1 STARPU_NCUDA=0 $INSTALLDIR/lib/starpu/examples/dw_mult_no_filters -x $size -y $size -z $size -nblocks 1 -iter $niter 2> /dev/null`	echo "$size	$timing	$niter" >> $cpu_outputdone# benchmark CUBLASfor size in $sizelist;do	niter=2500	if test $size -ge 512; then		niter=250	fi	if test $size -ge 2048; then		niter=25	fi	echo "CUBLAS -> size $size niter $niter"	timing=`STARPU_NCPUS=0 STARPU_NCUDA=1 $INSTALLDIR/lib/starpu/examples/dw_mult_no_filters -x $size -y $size -z $size -nblocks 1 -iter $niter 2 -pin 2> /dev/null`	echo "$size	$timing	$niter" >> $gpu_outputdonegnuplot > /dev/null << EOFset term postscript eps enhanced colorset output "bench_sgemm.eps"set logscale xset logscale yplot "$cpu_output" usi 1:(\$2/\$3) with linespoint, \	"$gpu_output" usi 1:(\$2/\$3) with linespointEOF
 |