| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 | 
							- #!/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.
 
- #
 
- maxiter=5
 
- calibrate_point()
 
- {
 
- 	strat=$1
 
- 	nblocks=$2
 
- 	prefetch=$3
 
- 	size=$(($nblocks * 1024))
 
- 	echo "CALIBRATE size : $size / blocks : $nblocks strat -> $strat prefetch -> $prefetch"
 
- 	rm -f $SAMPLINGDIR/*
 
- 	
 
- 	for iter in `seq 1 $maxiter`
 
- 	do
 
- 		echo "$iter / $maxiter"
 
- 		export SCHED=$strat
 
- 		export CALIBRATE=1
 
- 		export PREFETCH=$prefetch
 
- 		val=`$ROOTDIR/examples/heat/heat -pin -nblocks $nblocks -size $size -v3 2> /dev/null`
 
- 		echo "$val"
 
- 	done
 
- }
 
- trace_point()
 
- {
 
- 	strat=$1
 
- 	nblocks=$2
 
- 	docalibrate=$3
 
- 	prefetch=$4
 
- 	size=$(($nblocks * 1024))
 
- 	echo "size : $size ... docalibrate $docalibrate"
 
- 	
 
- 	filename=$TIMINGDIR/sched.$prefetch.$strat.$size
 
- 	if [ $docalibrate == 1 ];
 
- 	then
 
- 		calibrate_point $strat $nblocks $prefetch
 
- 	fi
 
- 	for iter in `seq 1 $maxiter`
 
- 	do
 
- 		echo "$iter / $maxiter"
 
- 		export SCHED=$strat
 
- 		export CALIBRATE=$docalibrate
 
- 		export PREFETCH=$prefetch
 
- 		val=`$ROOTDIR/examples/heat/heat -pin -nblocks $nblocks -size $size -v3  2> /dev/null`
 
- 		echo "$val"
 
- 		echo "$val" >> $filename
 
- 	done
 
- }
 
- trace_sched()
 
- {
 
- 	strat=$1
 
- 	prefetch=$2
 
- 	docalibrate=$3
 
- 	for nblocks in `seq 2 2 30`
 
- 	do
 
- 		trace_point $strat $nblocks $docalibrate $prefetch 
 
- 	done
 
- }
 
- DIR=$PWD
 
- ROOTDIR=$DIR/../..
 
- TIMINGDIR=$DIR/timings-sched/
 
- SAMPLINGDIR=$DIR/sampling/
 
- export PERF_MODEL_DIR=$SAMPLINGDIR
 
- mkdir -p $TIMINGDIR
 
- mkdir -p $SAMPLINGDIR
 
- #schedlist="ws no-prio greedy prio dm random"
 
- #schedlist="random random random random"
 
- export NCUDA=3
 
- export NCPUS=8 
 
- trace_sched "greedy" 0 0;
 
- trace_sched "dm" 0 1;
 
- trace_sched "dm" 1 1;
 
- trace_sched "dmda" 1 1;
 
 
  |