| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 | #!/bin/bash# StarPU --- Runtime system for heterogeneous multicore architectures.## Copyright (C) 2008-2011,2014                           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/../..TIMINGDIR=$DIR/timings/mkdir -p $TIMINGDIRcd $ROOTDIRmake clean 1> /dev/null 2> /dev/nullmake STARPU_ATLAS=1 CUDA=1 CPUS=4 1> /dev/null 2> /dev/nullBLOCKS=8THETALIST="32 64 128 192 256 384"echo "absolute wall time ..."# perform all measurments first for theta in $THETALISTdo	size=$(($theta*32))	for cpus in 0	do		for cublas in 1		do			blocks=$BLOCKS			filename=$TIMINGDIR/timing.$cpus.$cublas.$size.$blocks			export STARPU_NCPUS=$cpus			export STARPU_NCUDA=$cublas			echo "size $size cpus $cpus cublas $cublas blocks $blocks" 			$ROOTDIR/examples/heat -nthick 34 -ntheta $(($theta+2)) -nblocks $BLOCKS 2>/dev/null| tee $filename		done	done	for cpus in 1 2 3 4	do		for cublas in 0 1		do			blocks=$BLOCKS			filename=$TIMINGDIR/timing.$cpus.$cublas.$size.$blocks			export STARPU_NCPUS=$cpus			export STARPU_NCUDA=$cublas			echo "size $size cpus $cpus cublas $cublas blocks $blocks" 			$ROOTDIR/examples/heat -nthick 34 -ntheta $(($theta+2)) -nblocks $BLOCKS 2>/dev/null| tee $filename		done	donedone# timerm -f $DIR/timefor theta in $THETALISTdo	size=$(($theta*32))	line=`cat  $TIMINGDIR/timing.0.1.$size.$BLOCKS $TIMINGDIR/timing.4.0.$size.$BLOCKS $TIMINGDIR/timing.1.1.$size.$BLOCKS $TIMINGDIR/timing.3.1.$size.$BLOCKS $TIMINGDIR/timing.4.1.$size.$BLOCKS | tr '\n' '\t'`	echo "$size	$line" >> $DIR/timedoneecho "speedup ..."for blocks in 2 4 8 16 32do		for theta in $THETALIST	do		size=$(($theta*32))		export STARPU_NCPUS=4		export STARPU_NCUDA=0		echo "size $size cpus 4 cublas 0 blocks $blocks"		filename=$TIMINGDIR/timing.4.0.$size.$blocks		$ROOTDIR/examples/heat -nthick 34 -ntheta $(($theta+2)) -nblocks $blocks 2>/dev/null| tee $filename		export STARPU_NCPUS=3		export STARPU_NCUDA=1		echo "size $size cpus 3 cublas 1 blocks $blocks"		filename=$TIMINGDIR/timing.3.1.$size.$blocks		$ROOTDIR/examples/heat -nthick 34 -ntheta $(($theta+2)) -nblocks $blocks 2>/dev/null| tee $filename	donedone# speedups for blocks in 2 4 8 16 32do	rm -f $DIR/speedup.$blocks	for theta in $THETALIST	do		size=$(($theta*32))		echo "$size	`cat $TIMINGDIR/timing.3.1.$size.$blocks`	`cat  $TIMINGDIR/timing.4.0.$size.$blocks`" >> $DIR/speedup.$blocks 	donedone
 |