run.sh 1.08 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
#!/bin/sh
# make sure we stop on errors, and log everything
set -e
set -x
set -u
DATE=$(date +%Y%m%d.%H%M%S)
LOGFILE="$DATE.log"
DELIMITER="################################################################################"

# have stdout redirected to our LOGFILE
exec > "$LOGFILE"

# remember this script in the log
printf '%s\n%s\n\n' "$DELIMITER" "$DELIMITER"
cat "$0"
printf '\n%s\n' "$DELIMITER"

# Setup environment
echo "Start: $DATE"
export PATH=../../benchmarks/:$PATH

# Gather some info on the system
uname -a
cat /proc/cmdline
numactl --hardware
git describe --always
env
printf '\n%s\n' "$DELIMITER"
printf "Parameters: %s" "$*"

PROG=$1
FAST_MEM=$2
SLOW_MEM=$3
REPEATS=$4
TH_MIN=$5
TH_STEP=$6
TH_MAX=$7
SZ_MIN=$8
SZ_MAX=$9
SZ_STEP=${10}

for th in $(seq $TH_MIN $TH_STEP $TH_MAX)
do
	export OMP_NUM_THREADS=$th
	export OMP_PLACES=cores
	export OMP_PROC_BIND=spread
	for sz in $(seq $SZ_MIN $SZ_STEP $SZ_MAX)
	do
		for times in $(seq 1 $REPEATS)
		do
			echo "$PROG $th $sz $times"
			$PROG $FAST_MEM $SLOW_MEM $sz
		done
	done
done

DONEDATE=$(date +%Y%m%d.%H%M%S)
echo "Done: $DONEDATE"