blob: 3d0dadb8231d7faca8af70b7bef1236edbc8775e [file] [log] [blame]
#!/bin/bash
########################
# Function definitions #
########################
source "$(dirname $0)/measurement-functions"
function run_test {
local tmp avg1=1 stddev1=1 avg2=1 stddev2=1 p=4
tmp="/tmp/test-timing.$$"
rm -f "${tmp}"
test_output="${1}.out" measure_runtime "$@" -p1 | avgstddev > "$tmp"
read avg1 stddev1 < "$tmp"
echo "Average time: ${avg1} +/- ${stddev1} seconds"
test_output="${1}.out" measure_runtime "$@" -p2 | avgstddev > "$tmp"
read avg1 stddev1 < "$tmp"
echo "Average time: ${avg1} +/- ${stddev1} seconds"
test_output="${1}.out" measure_runtime "$@" -p4 | avgstddev > "$tmp"
read avg1 stddev1 < "$tmp"
echo "Average time: ${avg1} +/- ${stddev1} seconds"
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
test_output="${1}-helgrind-${p}.out" \
print_runtime_ratio $VG --tool=helgrind "$@" -p$p
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 (-p4): native DRD DRD HG ITC ITC
# (-p1) w/ filter w/ filter
# ............................................................................
# Cholesky 0.29 89 64 37 239 82
# FFT 0.19 50 32 556 90 41
# LU, contiguous blocks 0.76 41 38 97 428 128
# LU, non-contiguous blocks 0.80 49 47 59 428 128
# Ocean, contiguous partitions 19.40 39 33 54 90 28
# Ocean, non-contiguous partns 0.29 25 29 53 90 28
# Radiosity 3.11 164 60 58 485 163
# Radix 4.05 16 14 85 222 56
# Raytrace 2.21 169 56 89 172 53
# Water-n2 0.17 118 32 52 189 39
# Water-sp 0.18 94 33 51 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.3.1, xload -update 1 running.
##############################################################################
# Results: native DRD DRD HG ITC ITC
# -p1 -p2 -p4 -p4 -p4, f -p4 -p4 -p4, f
# ............................................................................
# Cholesky 0.21 0.14 4.49 4 3 2 239 82
# FFT 0.11 0.08 0.07 138 66 380 90 41
# LU, contiguous 0.56 0.34 0.34 72 68 96 428 128
# LU, non-contiguous 0.59 0.32 0.35 92 109 60 428 128
# Ocean, contiguous 14.30 9.54 9.56 61 48 89 90 28
# Ocean, non-contiguous 0.20 0.12 0.12 45 51 93 90 28
# Radiosity 2.33 2.32 2.33 175 61 60 485 163
# Radix 2.81 1.45 1.46 32 29 153 222 56
# Raytrace 1.65 1.64 1.64 230 55 89 172 53
# Water-n2 0.14 0.12 0.12 129 35 55 189 39
# Water-sp 0.14 0.12 0.12 121 36 54 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.3.1, runlevel 5, X screensaver: blank
##############################################################################
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: