blob: d40ab7ef34f3f60b81d62c7aaa792881c08219a2 [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
bart9cdd1782008-06-08 11:22:23 +000019 for p in 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
bartd1763bc2008-06-08 14:44:41 +000026
27 test_output="${1}-helgrind-${p}.out" \
28 print_runtime_ratio $VG --tool=helgrind "$@" -p$p
bartc4a174f2008-06-03 11:41:19 +000029 done
bart8785c122008-05-29 08:34:27 +000030
31 echo ''
32
33 rm -f "$tmp"
34}
35
36
bart9cdd1782008-06-08 11:22:23 +000037########################
38# Script body #
39########################
bart8785c122008-05-29 08:34:27 +000040
bart32811502008-06-03 15:12:59 +000041DRD_SCRIPTS_DIR="$(dirname $0)"
bart7acf3802008-06-06 10:17:26 +000042if [ "${DRD_SCRIPTS_DIR:0:1}" != "/" ]; then
43 DRD_SCRIPTS_DIR="$PWD/$DRD_SCRIPTS_DIR"
bart32811502008-06-03 15:12:59 +000044fi
45
46SPLASH2="${DRD_SCRIPTS_DIR}/../splash2"
bartc4a174f2008-06-03 11:41:19 +000047if [ ! -e "${SPLASH2}" ]; then
48 echo "Error: splash2 directory not found (${SPLASH2})."
bart8785c122008-05-29 08:34:27 +000049 exit 1
50fi
51
52if [ "$VG" = "" ]; then
bart32811502008-06-03 15:12:59 +000053 VG="${DRD_SCRIPTS_DIR}/../../vg-in-place"
bart8785c122008-05-29 08:34:27 +000054fi
55
56if [ ! -e "$VG" ]; then
57 echo "Could not find $VG."
58 exit 1
59fi
60
bart0d4e5c22008-06-07 10:42:52 +000061##############################################################################
bart73867142008-06-09 12:43:20 +000062# Results (-p4): native DRD DRD HG ITC ITC
63# time w/ filter w/ filter
bart0d4e5c22008-06-07 10:42:52 +000064# ............................................................................
bartb08ca702008-06-12 13:50:40 +000065# Cholesky 0.29 103 64 37 239 82
bart8b4b2ee2008-06-11 13:17:56 +000066# FFT 0.19 65 32 556 90 41
bartb08ca702008-06-12 13:50:40 +000067# LU, contiguous blocks 0.76 44 36 97 428 128
68# LU, non-contiguous blocks 0.80 45 39 59 428 128
69# Ocean, contiguous partitions 19.40 39 32 54 90 28
bart8b4b2ee2008-06-11 13:17:56 +000070# Ocean, non-continguous partns 0.29 26 29 53 90 28
bartb08ca702008-06-12 13:50:40 +000071# Radiosity 3.11 223 61 58 485 163
bart8b4b2ee2008-06-11 13:17:56 +000072# Radix 4.05 16 14 85 222 56
bartb08ca702008-06-12 13:50:40 +000073# Raytrace 2.21 272 53 89 172 53
bart8b4b2ee2008-06-11 13:17:56 +000074# Water-n2 0.17 176 33 52 189 39
75# Water-sp 0.18 145 33 51 183 34
bart0d4e5c22008-06-07 10:42:52 +000076# ............................................................................
77# Hardware: dual-core Intel Xeon 5130, 2.0 GHz, 4 MB L2 cache, 4 GB RAM.
bartb08ca702008-06-12 13:50:40 +000078# Software: Ubuntu 7.10 server, 64-bit, gcc 4.1.3, xload -update 1 running.
79##############################################################################
80# Results (-p4): native DRD DRD HG ITC ITC
81# time w/ filter w/ filter
82# ............................................................................
83# Cholesky 0.29 89 64 37 239 82
84# FFT 0.19 50 32 556 90 41
85# LU, contiguous blocks 0.76 41 38 97 428 128
86# LU, non-contiguous blocks 0.80 49 47 59 428 128
87# Ocean, contiguous partitions 19.40 39 33 54 90 28
88# Ocean, non-continguous partns 0.29 25 29 53 90 28
89# Radiosity 3.11 164 60 58 485 163
90# Radix 4.05 16 14 85 222 56
91# Raytrace 2.21 169 56 89 172 53
92# Water-n2 0.17 118 32 52 189 39
93# Water-sp 0.18 94 33 51 183 34
94# ............................................................................
95# Hardware: dual-core Intel Xeon 5130, 2.0 GHz, 4 MB L2 cache, 4 GB RAM.
96# Software: Ubuntu 7.10 server, 64-bit, gcc 4.3.1, xload -update 1 running.
bart0d4e5c22008-06-07 10:42:52 +000097##############################################################################
bartd1763bc2008-06-08 14:44:41 +000098# Results (-p4): native DRD DRD HG ITC ITC
99# time w/ filter w/ filter
bart0d4e5c22008-06-07 10:42:52 +0000100# ............................................................................
bart4f192dc2008-06-11 18:37:34 +0000101# Cholesky 0.21 100 64 36 239 82
102# FFT 0.12 100 38 224 90 41
103# LU, contiguous blocks 0.57 58 50 96 428 128
104# LU, non-contiguous blocks 0.61 62 56 60 428 128
105# Ocean, contiguous partitions 14.33 43 34 58 90 28
106# Ocean, non-continguous partns 0.21 30 33 56 90 28
107# Radiosity 2.33 244 63 60 485 163
108# Radix 2.81 15 13 90 222 56
109# Raytrace 1.65 340 52 88 172 53
110# Water-n2 0.14 153 27 46 189 39
111# Water-sp 0.14 155 29 46 183 34
bart0d4e5c22008-06-07 10:42:52 +0000112# ............................................................................
113# Hardware: dual-core Intel Core2 Duo E6750, 2.66 GHz, 4 MB L2 cache, 2 GB RAM.
bart9cdd1782008-06-08 11:22:23 +0000114# Software: openSUSE 10.3, 64-bit, gcc 4.2.1, runlevel 5, X screensaver: blank
bart0d4e5c22008-06-07 10:42:52 +0000115##############################################################################
bart5501b0a2008-06-13 19:44:51 +0000116# Results (-p4): native DRD DRD HG ITC ITC
117# time w/ filter w/ filter
118# ............................................................................
119# Cholesky 0.21 85 62 36 239 82
120# FFT 0.12 82 41 224 90 41
121# LU, contiguous blocks 0.57 45 42 96 428 128
122# LU, non-contiguous blocks 0.61 53 53 60 428 128
123# Ocean, contiguous partitions 14.33 40 32 58 90 28
124# Ocean, non-continguous partns 0.21 28 32 56 90 28
125# Radiosity 2.33 175 62 60 485 163
126# Radix 2.81 17 15 90 222 56
127# Raytrace 1.65 233 29 88 172 53
128# Water-n2 0.14 105 29 46 189 39
129# Water-sp 0.14 105 31 46 183 34
130# ............................................................................
131# Hardware: dual-core Intel Core2 Duo E6750, 2.66 GHz, 4 MB L2 cache, 2 GB RAM.
132# Software: openSUSE 10.3, 64-bit, gcc 4.3.1, runlevel 5, X screensaver: blank
133##############################################################################
bart8785c122008-05-29 08:34:27 +0000134
bart0d4e5c22008-06-07 10:42:52 +0000135cache_size=$(($(get_cache_size)/2))
bart32811502008-06-03 15:12:59 +0000136log2_cache_size=$(log2 ${cache_size})
137
138# Cholesky
bart32811502008-06-03 15:12:59 +0000139(
bart868d73a2008-06-04 13:02:22 +0000140 cd ${SPLASH2}/codes/kernels/cholesky/inputs
141 for f in *Z
142 do
143 gzip -cd <$f >${f%.Z}
144 done
bart0d4e5c22008-06-07 10:42:52 +0000145 run_test ../CHOLESKY -C${cache_size} tk29.O
bart32811502008-06-03 15:12:59 +0000146)
bart32811502008-06-03 15:12:59 +0000147
148# FFT
bart0d4e5c22008-06-07 10:42:52 +0000149run_test ${SPLASH2}/codes/kernels/fft/FFT -t -l${log2_cache_size} -m18
bart32811502008-06-03 15:12:59 +0000150
151# LU, contiguous blocks.
bartc4a174f2008-06-03 11:41:19 +0000152run_test ${SPLASH2}/codes/kernels/lu/contiguous_blocks/LU -n1024
bart8785c122008-05-29 08:34:27 +0000153
bart32811502008-06-03 15:12:59 +0000154# LU, non-contiguous blocks.
bartc4a174f2008-06-03 11:41:19 +0000155run_test ${SPLASH2}/codes/kernels/lu/non_contiguous_blocks/LU -n1024
bart8785c122008-05-29 08:34:27 +0000156
bart868d73a2008-06-04 13:02:22 +0000157# Ocean
158run_test ${SPLASH2}/codes/apps/ocean/contiguous_partitions/OCEAN -n2050
159run_test ${SPLASH2}/codes/apps/ocean/non_contiguous_partitions/OCEAN -n258
160
bart32811502008-06-03 15:12:59 +0000161# Radiosity.
bartc4a174f2008-06-03 11:41:19 +0000162run_test ${SPLASH2}/codes/apps/radiosity/RADIOSITY -batch -room
163
bart868d73a2008-06-04 13:02:22 +0000164# Radix
165run_test ${SPLASH2}/codes/kernels/radix/RADIX -n$((2**24))
166
167# Raytrace
168(
169 cd ${SPLASH2}/codes/apps/raytrace/inputs
170 rm -f *.env *.geo *.rl
171 for f in *Z
172 do
173 gzip -cd <$f >${f%.Z}
174 done
175 run_test ../RAYTRACE balls4.env
176)
bart334db5e2008-06-05 10:14:53 +0000177
bart868d73a2008-06-04 13:02:22 +0000178# Water-n2
bart334db5e2008-06-05 10:14:53 +0000179(
180 cd ${SPLASH2}/codes/apps/water-nsquared
181 test_input=input run_test ./WATER-NSQUARED
182)
bart868d73a2008-06-04 13:02:22 +0000183
184# Water-sp
bart334db5e2008-06-05 10:14:53 +0000185(
186 cd ${SPLASH2}/codes/apps/water-spatial
187 test_input=input run_test ./WATER-SPATIAL
188)
bart868d73a2008-06-04 13:02:22 +0000189
190
bartc4a174f2008-06-03 11:41:19 +0000191
192# Local variables:
193# compile-command: "./run-splash2"
194# End: