| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 | #!/bin/bash# StarPU --- Runtime system for heterogeneous multicore architectures.## Copyright (C) 2009-2020  Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria## 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/# Testing another specific scheduler, no need to run this[ -z "$STARPU_SCHED" -o "$STARPU_SCHED" = dm ] || exit 77make -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 $STARPU_LAUNCH $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 $STARPU_LAUNCH $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
 |