| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 | #!/bin/bash# StarPU --- Runtime system for heterogeneous multicore architectures.## Copyright (C) 2009-2011,2014,2019                      Université de Bordeaux# Copyright (C) 2010,2015,2017                           CNRS## 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" -a "$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 $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
 |