blob: 046e88f03b9dfe18441447bac339d249ee8578a2 [file] [log] [blame]
bart8785c122008-05-29 08:34:27 +00001#!/bin/bash
2
3########################
4# Function definitions #
5########################
6
bartf33ce892008-06-07 11:40:14 +00007source "$(dirname $0)/measurement-functions"
bart8785c122008-05-29 08:34:27 +00008
9function run_test {
10 local tmp avg1=1 stddev1=1 avg2=1 stddev2=1
11
12 tmp="/tmp/test-timing.$$"
bart334db5e2008-06-05 10:14:53 +000013 rm -f "${tmp}"
14
bartf33ce892008-06-07 11:40:14 +000015 test_output="${1}.out" measure_runtime "$@" | avgstddev > "$tmp"
bart8785c122008-05-29 08:34:27 +000016 read avg1 stddev1 < "$tmp"
17 echo "Average time: ${avg1} +/- ${stddev1} seconds"
18
bart868d73a2008-06-04 13:02:22 +000019 for p in 1 2 4
bart8785c122008-05-29 08:34:27 +000020 do
bartf33ce892008-06-07 11:40:14 +000021 test_output="${1}-drd-with-stack-var-${p}.out" \
22 print_runtime_ratio $VG --tool=exp-drd --check-stack-var=yes "$@" -p$p
bart0d4e5c22008-06-07 10:42:52 +000023
bartf33ce892008-06-07 11:40:14 +000024 test_output="${1}-drd-without-stack-var-${p}.out" \
25 print_runtime_ratio $VG --tool=exp-drd --check-stack-var=no "$@" -p$p
bartc4a174f2008-06-03 11:41:19 +000026 done
bart8785c122008-05-29 08:34:27 +000027
28 echo ''
29
30 rm -f "$tmp"
31}
32
33
34# Script body
35
bart32811502008-06-03 15:12:59 +000036DRD_SCRIPTS_DIR="$(dirname $0)"
bart7acf3802008-06-06 10:17:26 +000037if [ "${DRD_SCRIPTS_DIR:0:1}" != "/" ]; then
38 DRD_SCRIPTS_DIR="$PWD/$DRD_SCRIPTS_DIR"
bart32811502008-06-03 15:12:59 +000039fi
40
41SPLASH2="${DRD_SCRIPTS_DIR}/../splash2"
bartc4a174f2008-06-03 11:41:19 +000042if [ ! -e "${SPLASH2}" ]; then
43 echo "Error: splash2 directory not found (${SPLASH2})."
bart8785c122008-05-29 08:34:27 +000044 exit 1
45fi
46
47if [ "$VG" = "" ]; then
bart32811502008-06-03 15:12:59 +000048 VG="${DRD_SCRIPTS_DIR}/../../vg-in-place"
bart8785c122008-05-29 08:34:27 +000049fi
50
51if [ ! -e "$VG" ]; then
52 echo "Could not find $VG."
53 exit 1
54fi
55
bart0d4e5c22008-06-07 10:42:52 +000056##############################################################################
57# Results: (-p1) (-p2) (-p4) ITC (-p4) ITC (-p4)
58# original w/ filter
59# ............................................................................
60# Cholesky 40 47 82 239 82
61# FFT 16 17 47 90 41
62# LU, contiguous blocks 39 41 45 428 128
63# LU, non-contiguous blocks 39 41 49 428 128
64# Ocean, contiguous partitions 17 19 25 90 28
65# Ocean, non-continguous partns 18 21 30 90 28
66# Radiosity 78 78 78 485 163
67# Radix 10 12 15 222 56
68# Raytrace 56 56 56 172 53
69# Water-n2 34 34 34 189 39
70# Water-sp 33 33 33 183 34
71# ............................................................................
72# Hardware: dual-core Intel Xeon 5130, 2.0 GHz, 4 MB L2 cache, 4 GB RAM.
bartf33ce892008-06-07 11:40:14 +000073# Software: Ubuntu 7.10 server, 64-bit, gcc 4.1.3, runlevel 3.
bart0d4e5c22008-06-07 10:42:52 +000074##############################################################################
75# Results: native DRD (-p4) DRD (-p4) ITC (-p4) ITC (-p4)
76# time original w/ filter original w/ filter
77# ............................................................................
bartf33ce892008-06-07 11:40:14 +000078# Cholesky 0.21 115 72 239 82
79# FFT 0.11 92 17 90 41
80# LU, contiguous blocks 0.56 57 49 428 128
81# LU, non-contiguous blocks 0.59 60 53 428 128
82# Ocean, contiguous partitions 14.32 .. 24 90 28
83# Ocean, non-continguous partns 0.21 .. 30 90 28
84# Radiosity 2.35 .. 76 485 163
85# Radix 2.80 .. 16 222 56
86# Raytrace 90.79 .. 54 172 53
87# Water-n2 0.15 .. 27 189 39
88# Water-sp 0.15 .. 26 183 34
bart0d4e5c22008-06-07 10:42:52 +000089# ............................................................................
90# Hardware: dual-core Intel Core2 Duo E6750, 2.66 GHz, 4 MB L2 cache, 2 GB RAM.
bartf33ce892008-06-07 11:40:14 +000091# Software: openSUSE 10.3, 64-bit, gcc 4.2.1, runlevel 5, X server running.
bart0d4e5c22008-06-07 10:42:52 +000092##############################################################################
bart8785c122008-05-29 08:34:27 +000093
bart0d4e5c22008-06-07 10:42:52 +000094cache_size=$(($(get_cache_size)/2))
bart32811502008-06-03 15:12:59 +000095log2_cache_size=$(log2 ${cache_size})
96
97# Cholesky
bart32811502008-06-03 15:12:59 +000098(
bart868d73a2008-06-04 13:02:22 +000099 cd ${SPLASH2}/codes/kernels/cholesky/inputs
100 for f in *Z
101 do
102 gzip -cd <$f >${f%.Z}
103 done
bart0d4e5c22008-06-07 10:42:52 +0000104 run_test ../CHOLESKY -C${cache_size} tk29.O
bart32811502008-06-03 15:12:59 +0000105)
bart32811502008-06-03 15:12:59 +0000106
107# FFT
bart0d4e5c22008-06-07 10:42:52 +0000108run_test ${SPLASH2}/codes/kernels/fft/FFT -t -l${log2_cache_size} -m18
bart32811502008-06-03 15:12:59 +0000109
110# LU, contiguous blocks.
bartc4a174f2008-06-03 11:41:19 +0000111run_test ${SPLASH2}/codes/kernels/lu/contiguous_blocks/LU -n1024
bart8785c122008-05-29 08:34:27 +0000112
bart32811502008-06-03 15:12:59 +0000113# LU, non-contiguous blocks.
bartc4a174f2008-06-03 11:41:19 +0000114run_test ${SPLASH2}/codes/kernels/lu/non_contiguous_blocks/LU -n1024
bart8785c122008-05-29 08:34:27 +0000115
bart868d73a2008-06-04 13:02:22 +0000116# Ocean
117run_test ${SPLASH2}/codes/apps/ocean/contiguous_partitions/OCEAN -n2050
118run_test ${SPLASH2}/codes/apps/ocean/non_contiguous_partitions/OCEAN -n258
119
bart32811502008-06-03 15:12:59 +0000120# Radiosity.
bartc4a174f2008-06-03 11:41:19 +0000121run_test ${SPLASH2}/codes/apps/radiosity/RADIOSITY -batch -room
122
bart868d73a2008-06-04 13:02:22 +0000123# Radix
124run_test ${SPLASH2}/codes/kernels/radix/RADIX -n$((2**24))
125
126# Raytrace
127(
128 cd ${SPLASH2}/codes/apps/raytrace/inputs
129 rm -f *.env *.geo *.rl
130 for f in *Z
131 do
132 gzip -cd <$f >${f%.Z}
133 done
134 run_test ../RAYTRACE balls4.env
135)
bart334db5e2008-06-05 10:14:53 +0000136
bart868d73a2008-06-04 13:02:22 +0000137# Water-n2
bart334db5e2008-06-05 10:14:53 +0000138(
139 cd ${SPLASH2}/codes/apps/water-nsquared
140 test_input=input run_test ./WATER-NSQUARED
141)
bart868d73a2008-06-04 13:02:22 +0000142
143# Water-sp
bart334db5e2008-06-05 10:14:53 +0000144(
145 cd ${SPLASH2}/codes/apps/water-spatial
146 test_input=input run_test ./WATER-SPATIAL
147)
bart868d73a2008-06-04 13:02:22 +0000148
149
bartc4a174f2008-06-03 11:41:19 +0000150
151# Local variables:
152# compile-command: "./run-splash2"
153# End: