blob: fe49bbaa255df9198915788038fa904c8de8e891 [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 {
bartcf801352008-06-15 09:13:28 +000010 local tmp avg1=1 stddev1=1 avg2=1 stddev2=1 p=4
bart8785c122008-05-29 08:34:27 +000011
12 tmp="/tmp/test-timing.$$"
bart334db5e2008-06-05 10:14:53 +000013 rm -f "${tmp}"
14
bartcf801352008-06-15 09:13:28 +000015 test_output="${1}.out" measure_runtime "$@" -p1 | avgstddev > "$tmp"
bart8785c122008-05-29 08:34:27 +000016 read avg1 stddev1 < "$tmp"
17 echo "Average time: ${avg1} +/- ${stddev1} seconds"
18
bartcf801352008-06-15 09:13:28 +000019 test_output="${1}.out" measure_runtime "$@" -p2 | avgstddev > "$tmp"
20 read avg1 stddev1 < "$tmp"
21 echo "Average time: ${avg1} +/- ${stddev1} seconds"
bart0d4e5c22008-06-07 10:42:52 +000022
bartcf801352008-06-15 09:13:28 +000023 test_output="${1}.out" measure_runtime "$@" -p4 | avgstddev > "$tmp"
24 read avg1 stddev1 < "$tmp"
25 echo "Average time: ${avg1} +/- ${stddev1} seconds"
bartd1763bc2008-06-08 14:44:41 +000026
bartcf801352008-06-15 09:13:28 +000027 test_output="${1}-drd-with-stack-var-${p}.out" \
28 print_runtime_ratio $VG --tool=exp-drd --check-stack-var=yes "$@" -p$p
29
30 test_output="${1}-drd-without-stack-var-${p}.out" \
31 print_runtime_ratio $VG --tool=exp-drd --check-stack-var=no "$@" -p$p
32
33 test_output="${1}-helgrind-${p}.out" \
34 print_runtime_ratio $VG --tool=helgrind "$@" -p$p
bart8785c122008-05-29 08:34:27 +000035
36 echo ''
37
38 rm -f "$tmp"
39}
40
41
bart9cdd1782008-06-08 11:22:23 +000042########################
43# Script body #
44########################
bart8785c122008-05-29 08:34:27 +000045
bart32811502008-06-03 15:12:59 +000046DRD_SCRIPTS_DIR="$(dirname $0)"
bart7acf3802008-06-06 10:17:26 +000047if [ "${DRD_SCRIPTS_DIR:0:1}" != "/" ]; then
48 DRD_SCRIPTS_DIR="$PWD/$DRD_SCRIPTS_DIR"
bart32811502008-06-03 15:12:59 +000049fi
50
51SPLASH2="${DRD_SCRIPTS_DIR}/../splash2"
bartc4a174f2008-06-03 11:41:19 +000052if [ ! -e "${SPLASH2}" ]; then
53 echo "Error: splash2 directory not found (${SPLASH2})."
bart8785c122008-05-29 08:34:27 +000054 exit 1
55fi
56
57if [ "$VG" = "" ]; then
bart32811502008-06-03 15:12:59 +000058 VG="${DRD_SCRIPTS_DIR}/../../vg-in-place"
bart8785c122008-05-29 08:34:27 +000059fi
60
61if [ ! -e "$VG" ]; then
62 echo "Could not find $VG."
63 exit 1
64fi
65
bart0d4e5c22008-06-07 10:42:52 +000066##############################################################################
bart73867142008-06-09 12:43:20 +000067# Results (-p4): native DRD DRD HG ITC ITC
bartcf801352008-06-15 09:13:28 +000068# (-p1) w/ filter w/ filter
bart0d4e5c22008-06-07 10:42:52 +000069# ............................................................................
bartb08ca702008-06-12 13:50:40 +000070# Cholesky 0.29 103 64 37 239 82
bart8b4b2ee2008-06-11 13:17:56 +000071# FFT 0.19 65 32 556 90 41
bartb08ca702008-06-12 13:50:40 +000072# LU, contiguous blocks 0.76 44 36 97 428 128
73# LU, non-contiguous blocks 0.80 45 39 59 428 128
74# Ocean, contiguous partitions 19.40 39 32 54 90 28
bartcf801352008-06-15 09:13:28 +000075# Ocean, non-contiguous partns 0.29 26 29 53 90 28
bartb08ca702008-06-12 13:50:40 +000076# Radiosity 3.11 223 61 58 485 163
bart8b4b2ee2008-06-11 13:17:56 +000077# Radix 4.05 16 14 85 222 56
bartb08ca702008-06-12 13:50:40 +000078# Raytrace 2.21 272 53 89 172 53
bart8b4b2ee2008-06-11 13:17:56 +000079# Water-n2 0.17 176 33 52 189 39
80# Water-sp 0.18 145 33 51 183 34
bart0d4e5c22008-06-07 10:42:52 +000081# ............................................................................
82# Hardware: dual-core Intel Xeon 5130, 2.0 GHz, 4 MB L2 cache, 4 GB RAM.
bartb08ca702008-06-12 13:50:40 +000083# Software: Ubuntu 7.10 server, 64-bit, gcc 4.1.3, xload -update 1 running.
84##############################################################################
85# Results (-p4): native DRD DRD HG ITC ITC
bartcf801352008-06-15 09:13:28 +000086# (-p1) w/ filter w/ filter
bartb08ca702008-06-12 13:50:40 +000087# ............................................................................
88# Cholesky 0.29 89 64 37 239 82
89# FFT 0.19 50 32 556 90 41
90# LU, contiguous blocks 0.76 41 38 97 428 128
91# LU, non-contiguous blocks 0.80 49 47 59 428 128
92# Ocean, contiguous partitions 19.40 39 33 54 90 28
bartcf801352008-06-15 09:13:28 +000093# Ocean, non-contiguous partns 0.29 25 29 53 90 28
bartb08ca702008-06-12 13:50:40 +000094# Radiosity 3.11 164 60 58 485 163
95# Radix 4.05 16 14 85 222 56
96# Raytrace 2.21 169 56 89 172 53
97# Water-n2 0.17 118 32 52 189 39
98# Water-sp 0.18 94 33 51 183 34
99# ............................................................................
100# Hardware: dual-core Intel Xeon 5130, 2.0 GHz, 4 MB L2 cache, 4 GB RAM.
101# Software: Ubuntu 7.10 server, 64-bit, gcc 4.3.1, xload -update 1 running.
bart0d4e5c22008-06-07 10:42:52 +0000102##############################################################################
bartd1763bc2008-06-08 14:44:41 +0000103# Results (-p4): native DRD DRD HG ITC ITC
bartcf801352008-06-15 09:13:28 +0000104# (-p1) w/ filter w/ filter
bart0d4e5c22008-06-07 10:42:52 +0000105# ............................................................................
bart4f192dc2008-06-11 18:37:34 +0000106# Cholesky 0.21 100 64 36 239 82
107# FFT 0.12 100 38 224 90 41
108# LU, contiguous blocks 0.57 58 50 96 428 128
109# LU, non-contiguous blocks 0.61 62 56 60 428 128
110# Ocean, contiguous partitions 14.33 43 34 58 90 28
bartcf801352008-06-15 09:13:28 +0000111# Ocean, non-contiguous partns 0.21 30 33 56 90 28
bart4f192dc2008-06-11 18:37:34 +0000112# Radiosity 2.33 244 63 60 485 163
113# Radix 2.81 15 13 90 222 56
114# Raytrace 1.65 340 52 88 172 53
115# Water-n2 0.14 153 27 46 189 39
116# Water-sp 0.14 155 29 46 183 34
bart0d4e5c22008-06-07 10:42:52 +0000117# ............................................................................
118# Hardware: dual-core Intel Core2 Duo E6750, 2.66 GHz, 4 MB L2 cache, 2 GB RAM.
bart9cdd1782008-06-08 11:22:23 +0000119# Software: openSUSE 10.3, 64-bit, gcc 4.2.1, runlevel 5, X screensaver: blank
bart0d4e5c22008-06-07 10:42:52 +0000120##############################################################################
bart5501b0a2008-06-13 19:44:51 +0000121# Results (-p4): native DRD DRD HG ITC ITC
bartcf801352008-06-15 09:13:28 +0000122# (-p1) w/ filter w/ filter
bart5501b0a2008-06-13 19:44:51 +0000123# ............................................................................
124# Cholesky 0.21 85 62 36 239 82
125# FFT 0.12 82 41 224 90 41
126# LU, contiguous blocks 0.57 45 42 96 428 128
127# LU, non-contiguous blocks 0.61 53 53 60 428 128
128# Ocean, contiguous partitions 14.33 40 32 58 90 28
bartcf801352008-06-15 09:13:28 +0000129# Ocean, non-contiguous partns 0.21 28 32 56 90 28
bart5501b0a2008-06-13 19:44:51 +0000130# Radiosity 2.33 175 62 60 485 163
131# Radix 2.81 17 15 90 222 56
132# Raytrace 1.65 233 29 88 172 53
133# Water-n2 0.14 105 29 46 189 39
134# Water-sp 0.14 105 31 46 183 34
135# ............................................................................
136# Hardware: dual-core Intel Core2 Duo E6750, 2.66 GHz, 4 MB L2 cache, 2 GB RAM.
137# Software: openSUSE 10.3, 64-bit, gcc 4.3.1, runlevel 5, X screensaver: blank
138##############################################################################
bartcf801352008-06-15 09:13:28 +0000139# Results (-p4): native DRD DRD HG ITC ITC
140# (-p1) (-p2) (-p4) w/ filter w/ filter
141# ............................................................................
142# Cholesky 0.21 0.14 4.62 4 3 2 239 82
143# FFT 0.12 0.08 0.07 138 72 380 90 41
144# LU, contiguous 0.57 0.34 0.34 92 88 96 428 128
145# LU, non-contiguous 0.59 0.32 0.35 116 118 60 428 128
146# Ocean, contiguous 14.49 9.73 9.70 65 53 .. 90 28
147# Ocean, non-contiguous 0.21 0.12 0.12 60 65 105 90 28
148# Radiosity 2.33 2.32 2.33 177 62 60 485 163
149# Radix 2.81 1.45 1.46 37 35 171 222 56
150# Raytrace 1.65 1.64 1.64 235 55 89 172 53
151# Water-n2 0.14 0.12 0.12 129 36 55 189 39
152# Water-sp 0.14 0.13 0.12 124 36 54 183 34
153# ............................................................................
154# Hardware: dual-core Intel Core2 Duo E6750, 2.66 GHz, 4 MB L2 cache, 2 GB RAM.
155# Software: openSUSE 10.3, 64-bit, gcc 4.3.1, runlevel 5, X screensaver: blank
156##############################################################################
bart8785c122008-05-29 08:34:27 +0000157
bart0d4e5c22008-06-07 10:42:52 +0000158cache_size=$(($(get_cache_size)/2))
bart32811502008-06-03 15:12:59 +0000159log2_cache_size=$(log2 ${cache_size})
160
161# Cholesky
bart32811502008-06-03 15:12:59 +0000162(
bart868d73a2008-06-04 13:02:22 +0000163 cd ${SPLASH2}/codes/kernels/cholesky/inputs
164 for f in *Z
165 do
166 gzip -cd <$f >${f%.Z}
167 done
bart0d4e5c22008-06-07 10:42:52 +0000168 run_test ../CHOLESKY -C${cache_size} tk29.O
bart32811502008-06-03 15:12:59 +0000169)
bart32811502008-06-03 15:12:59 +0000170
171# FFT
bart0d4e5c22008-06-07 10:42:52 +0000172run_test ${SPLASH2}/codes/kernels/fft/FFT -t -l${log2_cache_size} -m18
bart32811502008-06-03 15:12:59 +0000173
174# LU, contiguous blocks.
bartc4a174f2008-06-03 11:41:19 +0000175run_test ${SPLASH2}/codes/kernels/lu/contiguous_blocks/LU -n1024
bart8785c122008-05-29 08:34:27 +0000176
bart32811502008-06-03 15:12:59 +0000177# LU, non-contiguous blocks.
bartc4a174f2008-06-03 11:41:19 +0000178run_test ${SPLASH2}/codes/kernels/lu/non_contiguous_blocks/LU -n1024
bart8785c122008-05-29 08:34:27 +0000179
bart868d73a2008-06-04 13:02:22 +0000180# Ocean
181run_test ${SPLASH2}/codes/apps/ocean/contiguous_partitions/OCEAN -n2050
182run_test ${SPLASH2}/codes/apps/ocean/non_contiguous_partitions/OCEAN -n258
183
bart32811502008-06-03 15:12:59 +0000184# Radiosity.
bartc4a174f2008-06-03 11:41:19 +0000185run_test ${SPLASH2}/codes/apps/radiosity/RADIOSITY -batch -room
186
bart868d73a2008-06-04 13:02:22 +0000187# Radix
188run_test ${SPLASH2}/codes/kernels/radix/RADIX -n$((2**24))
189
190# Raytrace
191(
192 cd ${SPLASH2}/codes/apps/raytrace/inputs
193 rm -f *.env *.geo *.rl
194 for f in *Z
195 do
196 gzip -cd <$f >${f%.Z}
197 done
198 run_test ../RAYTRACE balls4.env
199)
bart334db5e2008-06-05 10:14:53 +0000200
bart868d73a2008-06-04 13:02:22 +0000201# Water-n2
bart334db5e2008-06-05 10:14:53 +0000202(
203 cd ${SPLASH2}/codes/apps/water-nsquared
204 test_input=input run_test ./WATER-NSQUARED
205)
bart868d73a2008-06-04 13:02:22 +0000206
207# Water-sp
bart334db5e2008-06-05 10:14:53 +0000208(
209 cd ${SPLASH2}/codes/apps/water-spatial
210 test_input=input run_test ./WATER-SPATIAL
211)
bart868d73a2008-06-04 13:02:22 +0000212
213
bartc4a174f2008-06-03 11:41:19 +0000214
215# Local variables:
216# compile-command: "./run-splash2"
217# End: