Files
ftmemsim-valgrind/exp-drd/scripts/run-splash2
Bart Van Assche f895b20c0c Reorganized SPLASH-2 benchmarking script.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8200
2008-06-07 11:40:14 +00:00

154 lines
5.0 KiB
Bash
Executable File

#!/bin/bash
########################
# Function definitions #
########################
source "$(dirname $0)/measurement-functions"
function run_test {
local tmp avg1=1 stddev1=1 avg2=1 stddev2=1
tmp="/tmp/test-timing.$$"
rm -f "${tmp}"
test_output="${1}.out" measure_runtime "$@" | avgstddev > "$tmp"
read avg1 stddev1 < "$tmp"
echo "Average time: ${avg1} +/- ${stddev1} seconds"
for p in 1 2 4
do
test_output="${1}-drd-with-stack-var-${p}.out" \
print_runtime_ratio $VG --tool=exp-drd --check-stack-var=yes "$@" -p$p
test_output="${1}-drd-without-stack-var-${p}.out" \
print_runtime_ratio $VG --tool=exp-drd --check-stack-var=no "$@" -p$p
done
echo ''
rm -f "$tmp"
}
# Script body
DRD_SCRIPTS_DIR="$(dirname $0)"
if [ "${DRD_SCRIPTS_DIR:0:1}" != "/" ]; then
DRD_SCRIPTS_DIR="$PWD/$DRD_SCRIPTS_DIR"
fi
SPLASH2="${DRD_SCRIPTS_DIR}/../splash2"
if [ ! -e "${SPLASH2}" ]; then
echo "Error: splash2 directory not found (${SPLASH2})."
exit 1
fi
if [ "$VG" = "" ]; then
VG="${DRD_SCRIPTS_DIR}/../../vg-in-place"
fi
if [ ! -e "$VG" ]; then
echo "Could not find $VG."
exit 1
fi
##############################################################################
# Results: (-p1) (-p2) (-p4) ITC (-p4) ITC (-p4)
# original w/ filter
# ............................................................................
# Cholesky 40 47 82 239 82
# FFT 16 17 47 90 41
# LU, contiguous blocks 39 41 45 428 128
# LU, non-contiguous blocks 39 41 49 428 128
# Ocean, contiguous partitions 17 19 25 90 28
# Ocean, non-continguous partns 18 21 30 90 28
# Radiosity 78 78 78 485 163
# Radix 10 12 15 222 56
# Raytrace 56 56 56 172 53
# Water-n2 34 34 34 189 39
# Water-sp 33 33 33 183 34
# ............................................................................
# Hardware: dual-core Intel Xeon 5130, 2.0 GHz, 4 MB L2 cache, 4 GB RAM.
# Software: Ubuntu 7.10 server, 64-bit, gcc 4.1.3, runlevel 3.
##############################################################################
# Results: native DRD (-p4) DRD (-p4) ITC (-p4) ITC (-p4)
# time original w/ filter original w/ filter
# ............................................................................
# Cholesky 0.21 115 72 239 82
# FFT 0.11 92 17 90 41
# LU, contiguous blocks 0.56 57 49 428 128
# LU, non-contiguous blocks 0.59 60 53 428 128
# Ocean, contiguous partitions 14.32 .. 24 90 28
# Ocean, non-continguous partns 0.21 .. 30 90 28
# Radiosity 2.35 .. 76 485 163
# Radix 2.80 .. 16 222 56
# Raytrace 90.79 .. 54 172 53
# Water-n2 0.15 .. 27 189 39
# Water-sp 0.15 .. 26 183 34
# ............................................................................
# Hardware: dual-core Intel Core2 Duo E6750, 2.66 GHz, 4 MB L2 cache, 2 GB RAM.
# Software: openSUSE 10.3, 64-bit, gcc 4.2.1, runlevel 5, X server running.
##############################################################################
cache_size=$(($(get_cache_size)/2))
log2_cache_size=$(log2 ${cache_size})
# Cholesky
(
cd ${SPLASH2}/codes/kernels/cholesky/inputs
for f in *Z
do
gzip -cd <$f >${f%.Z}
done
run_test ../CHOLESKY -C${cache_size} tk29.O
)
# FFT
run_test ${SPLASH2}/codes/kernels/fft/FFT -t -l${log2_cache_size} -m18
# LU, contiguous blocks.
run_test ${SPLASH2}/codes/kernels/lu/contiguous_blocks/LU -n1024
# LU, non-contiguous blocks.
run_test ${SPLASH2}/codes/kernels/lu/non_contiguous_blocks/LU -n1024
# Ocean
run_test ${SPLASH2}/codes/apps/ocean/contiguous_partitions/OCEAN -n2050
run_test ${SPLASH2}/codes/apps/ocean/non_contiguous_partitions/OCEAN -n258
# Radiosity.
run_test ${SPLASH2}/codes/apps/radiosity/RADIOSITY -batch -room
# Radix
run_test ${SPLASH2}/codes/kernels/radix/RADIX -n$((2**24))
# Raytrace
(
cd ${SPLASH2}/codes/apps/raytrace/inputs
rm -f *.env *.geo *.rl
for f in *Z
do
gzip -cd <$f >${f%.Z}
done
run_test ../RAYTRACE balls4.env
)
# Water-n2
(
cd ${SPLASH2}/codes/apps/water-nsquared
test_input=input run_test ./WATER-NSQUARED
)
# Water-sp
(
cd ${SPLASH2}/codes/apps/water-spatial
test_input=input run_test ./WATER-SPATIAL
)
# Local variables:
# compile-command: "./run-splash2"
# End: