blob: 7997e83117cd65e534618e5601add6d41b02afe4 [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 {
bartee17ad62008-06-18 13:31:05 +000010 local tmp avg1 stddev1 avg2 stddev2 avg4 stddev4
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"
barta5a95dd2008-06-18 14:15:11 +000016 read avg1 stddev1 vsz1 vszdev1 < "$tmp"
17 echo "Average time: ${avg1} +/- ${stddev1} seconds." \
18 " VSZ: ${vsz1} +/- ${vszdev1} KB"
bart8785c122008-05-29 08:34:27 +000019
bartcf801352008-06-15 09:13:28 +000020 test_output="${1}.out" measure_runtime "$@" -p2 | avgstddev > "$tmp"
barta5a95dd2008-06-18 14:15:11 +000021 read avg2 stddev2 vsz2 vszdev2 < "$tmp"
22 echo "Average time: ${avg2} +/- ${stddev2} seconds." \
23 " VSZ: ${vsz2} +/- ${vszdev2} KB"
bart0d4e5c22008-06-07 10:42:52 +000024
bartcf801352008-06-15 09:13:28 +000025 test_output="${1}.out" measure_runtime "$@" -p4 | avgstddev > "$tmp"
barta5a95dd2008-06-18 14:15:11 +000026 read avg4 stddev4 vsz4 vszdev4 < "$tmp"
27 echo "Average time: ${avg4} +/- ${stddev4} seconds." \
28 " VSZ: ${vsz4} +/- ${vszdev4} KB"
bartd1763bc2008-06-08 14:44:41 +000029
bartf16de382008-06-18 08:47:06 +000030 test_output="/dev/null" \
barta5a95dd2008-06-18 14:15:11 +000031 print_runtime_ratio ${avg1} ${stddev1} ${vsz1} ${vszdev1} $VG --tool=none "$@" -p1
bartf16de382008-06-18 08:47:06 +000032
33 test_output="/dev/null" \
barta5a95dd2008-06-18 14:15:11 +000034 print_runtime_ratio ${avg4} ${stddev4} ${vsz4} ${vszdev4} $VG --tool=none "$@" -p4
barta9952832008-06-17 14:20:26 +000035
bartcf801352008-06-15 09:13:28 +000036 test_output="${1}-drd-with-stack-var-${p}.out" \
barta5a95dd2008-06-18 14:15:11 +000037 print_runtime_ratio ${avg4} ${stddev4} ${vsz4} ${vszdev4} \
bartee17ad62008-06-18 13:31:05 +000038 $VG --tool=exp-drd --check-stack-var=yes "$@" -p4
bartcf801352008-06-15 09:13:28 +000039
40 test_output="${1}-drd-without-stack-var-${p}.out" \
barta5a95dd2008-06-18 14:15:11 +000041 print_runtime_ratio ${avg4} ${stddev4} ${vsz4} ${vszdev4} \
bartee17ad62008-06-18 13:31:05 +000042 $VG --tool=exp-drd --check-stack-var=no "$@" -p4
bartcf801352008-06-15 09:13:28 +000043
44 test_output="${1}-helgrind-${p}.out" \
barta5a95dd2008-06-18 14:15:11 +000045 print_runtime_ratio ${avg4} ${stddev4} ${vsz4} ${vszdev4} $VG --tool=helgrind "$@" -p4
bart8785c122008-05-29 08:34:27 +000046
47 echo ''
48
49 rm -f "$tmp"
50}
51
52
bart9cdd1782008-06-08 11:22:23 +000053########################
54# Script body #
55########################
bart8785c122008-05-29 08:34:27 +000056
bart32811502008-06-03 15:12:59 +000057DRD_SCRIPTS_DIR="$(dirname $0)"
bart7acf3802008-06-06 10:17:26 +000058if [ "${DRD_SCRIPTS_DIR:0:1}" != "/" ]; then
59 DRD_SCRIPTS_DIR="$PWD/$DRD_SCRIPTS_DIR"
bart32811502008-06-03 15:12:59 +000060fi
61
62SPLASH2="${DRD_SCRIPTS_DIR}/../splash2"
bartc4a174f2008-06-03 11:41:19 +000063if [ ! -e "${SPLASH2}" ]; then
64 echo "Error: splash2 directory not found (${SPLASH2})."
bart8785c122008-05-29 08:34:27 +000065 exit 1
66fi
67
68if [ "$VG" = "" ]; then
bart32811502008-06-03 15:12:59 +000069 VG="${DRD_SCRIPTS_DIR}/../../vg-in-place"
bart8785c122008-05-29 08:34:27 +000070fi
71
72if [ ! -e "$VG" ]; then
73 echo "Could not find $VG."
74 exit 1
75fi
76
bartee17ad62008-06-18 13:31:05 +000077######################################################################################################################
barta5a95dd2008-06-18 14:15:11 +000078# Meaning of the different colums:
79# 1. SPLASH2 test name.
80# 2. Execution time in seconds for native run with argument -p1.
81# 3. Virtual memory size in KB for the native run with argument -p1.
82# 4. Execution time in seconds for native run with argument -p2.
83# 5. Virtual memory size in KB for the native run with argument -p2.
84# 6. Execution time in seconds for native run with argument -p4.
85# 7. Virtual memory size in KB for the native run with argument -p4.
86# 8. Execution time ratio for --tool=none -p1 versus -p1.
87# 9. Virtual memory size ratio for --tool=none -p1 versus -p1.
88# 10. Execution time ratio for --tool=none -p4 versus -p4.
89# 11. Virtual memory size ratio for --tool=none -p4 versus -p4.
90# 12. Execution time ratio for --tool=exp-drd --check-stack-var=yes -p4 versus -p4.
91# 13. Virtual memory size ratio for --tool=exp-drd --check-stack-var=yes -p4 versus -p4.
92# 14. Execution time ratio for --tool=exp-drd --check-stack-var=no -p4 versus -p4.
93# 15. Virtual memory size ratio for --tool=exp-drd --check-stack-var=no -p4 versus -p4.
94# 16. Execution time ratio for --tool=helgrind -p4 versus -p4.
95# 17. Virtual memory size ratio for --tool=helgrind -p4 versus -p4.
96# 18. Execution time ratio for Intel Thread Checker -p4 versus -p4.
97# 19. Execution time ratio for Intel Thread Checker -p4 versus -p4.
98#
99# 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
100#########################################################################################################################
101# Results: native native native none none DRD DRD HG ITC ITC
102# -p1 -p2 -p4 -p1 -p4 -p4 -p4+f -p4 -p4 -p4+f
103# .......................................................................................................................
104# Cholesky 0.37 45867 0.25 55965 0.20 96789 8.3 2.08 17.3 1.29 173 .... 118 .... 57 .... 239 82
105# FFT 0.23 ..... 0.14 ..... 0.10 ..... 7.5 .... 16.2 .... 119 .... 80 .... 2336 .... 90 41
106# LU, contiguous 0.95 ..... 0.64 ..... 0.43 ..... 7.9 .... 18.0 .... 119 .... 113 .... 223 .... 428 128
107# LU, non-contiguous 1.18 ..... 0.69 ..... 0.41 ..... 6.7 .... 19.5 .... 204 .... 187 .... 164 .... 428 128
108# Ocean, contiguous 24.53 ..... 13.97 ..... 9.28 ..... 2.4 .... 6.5 .... 89 .... 76 .... 147 .... 90 28
109# Ocean, non-contiguous 0.36 ..... 0.19 ..... 0.17 ..... 4.2 .... 10.0 .... 56 .... 68 .... 121 .... 90 28
110# Radiosity 4.77 ..... 4.77 ..... 4.75 ..... 16.6 .... 16.6 .... 116 .... 50 .... 56 .... 485 163
111# Radix 5.03 ..... 2.57 ..... 1.36 ..... 6.1 .... 22.5 .... .. .... .. .... ... .... 222 56
112# Raytrace .... ..... .... ..... .... ..... ... .... ... .... ... .... .. .... .. .... 172 53
113# Water-n2 .... ..... .... ..... .... ..... .... .... .... .... ... .... .. .... .. .... 189 39
114# Water-sp .... ..... .... ..... .... ..... .... .... .... .... .. .... .. .... .. .... 183 34
115# .......................................................................................................................
bartee17ad62008-06-18 13:31:05 +0000116# Hardware: Two quad-core Intel Xeon L5130, 1.6 GHz, 4 MB L2 cache, 16 GB RAM.
117# Software: Ubuntu 8.04 server, 64-bit, gcc 4.3.1.
barta5a95dd2008-06-18 14:15:11 +0000118#########################################################################################################################
119# Results: native native native none none DRD DRD HG ITC ITC
120# -p1 -p2 -p4 -p1 -p4 -p4 -p4+f -p4 -p4 -p4+f
121# .......................................................................................................................
122# Cholesky 0.29 45835 0.21 55933 4.60 74944 8.6 2.21 1.0 1.75 5 2.05 4 2.16 2 3.22 239 82
123# FFT 0.19 6 GB 0.12 6 GB 0.12 6 GB 7.0 1.01 11.3 1.01 87 1.02 59 1.02 .... .... 90 41
124# LU, contiguous 0.79 16752 0.54 ..... 0.53 ..... 8.3 4.27 11.7 2.33 79 .... 75 .... 148 .... 428 128
125# LU, non-contiguous 0.86 ..... 0.47 ..... 0.49 ..... 7.5 .... 12.6 .... 136 .... 124 .... 109 .... 428 128
126# Ocean, contiguous 19.46 ..... 12.59 ..... 12.61 ..... 2.4 .... 3.7 .... 53 .... 47 .... 86 .... 90 28
127# Ocean, non-contiguous 0.30 ..... 0.19 ..... 0.19 ..... 4.0 .... 6.8 .... 38 .... 47 .... 84 .... 90 28
128# Radiosity 3.86 ..... 3.84 ..... 3.84 ..... 16.3 .... 16.4 .... ... .... .. .... .. .... 485 163
129# Radix 4.07 ..... 2.12 ..... 2.12 ..... 5.7 .... 10.9 .... .. .... .. .... ... .... 222 56
130# Raytrace 2.22 ..... 2.19 ..... 2.20 ..... 7.8 .... 7.9 .... ... .... .. .... .. .... 172 53
131# Water-n2 0.18 ..... 0.17 ..... 0.17 ..... 11.4 .... 11.5 .... ... .... .. .... .. .... 189 39
132# Water-sp 0.19 ..... 0.18 ..... 0.18 ..... 10.4 .... 10.2 .... .. .... .. .... .. .... 183 34
133# .......................................................................................................................
bartb08ca702008-06-12 13:50:40 +0000134# Hardware: dual-core Intel Xeon 5130, 2.0 GHz, 4 MB L2 cache, 4 GB RAM.
135# Software: Ubuntu 7.10 server, 64-bit, gcc 4.3.1, xload -update 1 running.
barta5a95dd2008-06-18 14:15:11 +0000136#########################################################################################################################
137# Results: native native native none none DRD DRD HG ITC ITC
138# -p1 -p2 -p4 -p1 -p4 -p4 -p4+f -p4 -p4 -p4+f
139# .......................................................................................................................
bartc7eb5912008-06-18 16:07:00 +0000140# Cholesky 0.21 45565 0.14 55658 4.49 74667 9.05 2.31 0.64 1.80 4 2.11 3 2.22 1 3.28 239 82
barta5a95dd2008-06-18 14:15:11 +0000141# FFT 0.11 ..... 0.08 ..... 0.07 ..... .... .... .... .... 138 .... 66 .... 380 .... 90 41
142# LU, contiguous 0.56 ..... 0.34 ..... 0.34 ..... .... .... .... .... 72 .... 68 .... 96 .... 428 128
143# LU, non-contiguous 0.59 ..... 0.32 ..... 0.35 ..... .... .... .... .... 92 .... 109 .... 60 .... 428 128
144# Ocean, contiguous 14.30 ..... 9.54 ..... 9.56 ..... .... .... .... .... 61 .... 48 .... 89 .... 90 28
145# Ocean, non-contiguous 0.20 ..... 0.12 ..... 0.12 ..... .... .... .... .... 45 .... 51 .... 93 .... 90 28
146# Radiosity 2.33 ..... 2.32 ..... 2.33 ..... .... .... .... .... 175 .... 61 .... 60 .... 485 163
147# Radix 2.81 ..... 1.45 ..... 1.46 ..... .... .... .... .... 32 .... 29 .... 153 .... 222 56
148# Raytrace 1.65 ..... 1.64 ..... 1.64 ..... .... .... .... .... 230 .... 55 .... 89 .... 172 53
149# Water-n2 0.14 ..... 0.12 ..... 0.12 ..... .... .... .... .... 129 .... 35 .... 55 .... 189 39
150# Water-sp 0.14 ..... 0.12 ..... 0.12 ..... .... .... .... .... 121 .... 36 .... 54 .... 183 34
151# .......................................................................................................................
bartcf801352008-06-15 09:13:28 +0000152# Hardware: dual-core Intel Core2 Duo E6750, 2.66 GHz, 4 MB L2 cache, 2 GB RAM.
153# Software: openSUSE 10.3, 64-bit, gcc 4.3.1, runlevel 5, X screensaver: blank
barta5a95dd2008-06-18 14:15:11 +0000154#########################################################################################################################
bart8785c122008-05-29 08:34:27 +0000155
bart66bb75c2008-06-17 06:19:29 +0000156cache_size=$(get_cache_size)
bart32811502008-06-03 15:12:59 +0000157log2_cache_size=$(log2 ${cache_size})
158
159# Cholesky
bart32811502008-06-03 15:12:59 +0000160(
bart868d73a2008-06-04 13:02:22 +0000161 cd ${SPLASH2}/codes/kernels/cholesky/inputs
162 for f in *Z
163 do
164 gzip -cd <$f >${f%.Z}
165 done
barta9952832008-06-17 14:20:26 +0000166 run_test ../CHOLESKY -C$((cache_size)) tk29.O
bart32811502008-06-03 15:12:59 +0000167)
bart32811502008-06-03 15:12:59 +0000168
169# FFT
barta9952832008-06-17 14:20:26 +0000170run_test ${SPLASH2}/codes/kernels/fft/FFT -t -l$((log2_cache_size)) -m18
bart32811502008-06-03 15:12:59 +0000171
172# LU, contiguous blocks.
bartc4a174f2008-06-03 11:41:19 +0000173run_test ${SPLASH2}/codes/kernels/lu/contiguous_blocks/LU -n1024
bart8785c122008-05-29 08:34:27 +0000174
bart32811502008-06-03 15:12:59 +0000175# LU, non-contiguous blocks.
bartc4a174f2008-06-03 11:41:19 +0000176run_test ${SPLASH2}/codes/kernels/lu/non_contiguous_blocks/LU -n1024
bart8785c122008-05-29 08:34:27 +0000177
bart868d73a2008-06-04 13:02:22 +0000178# Ocean
179run_test ${SPLASH2}/codes/apps/ocean/contiguous_partitions/OCEAN -n2050
180run_test ${SPLASH2}/codes/apps/ocean/non_contiguous_partitions/OCEAN -n258
181
bart32811502008-06-03 15:12:59 +0000182# Radiosity.
bartc4a174f2008-06-03 11:41:19 +0000183run_test ${SPLASH2}/codes/apps/radiosity/RADIOSITY -batch -room
184
bart868d73a2008-06-04 13:02:22 +0000185# Radix
186run_test ${SPLASH2}/codes/kernels/radix/RADIX -n$((2**24))
187
188# Raytrace
189(
190 cd ${SPLASH2}/codes/apps/raytrace/inputs
191 rm -f *.env *.geo *.rl
192 for f in *Z
193 do
194 gzip -cd <$f >${f%.Z}
195 done
196 run_test ../RAYTRACE balls4.env
197)
bart334db5e2008-06-05 10:14:53 +0000198
bart868d73a2008-06-04 13:02:22 +0000199# Water-n2
bart334db5e2008-06-05 10:14:53 +0000200(
201 cd ${SPLASH2}/codes/apps/water-nsquared
202 test_input=input run_test ./WATER-NSQUARED
203)
bart868d73a2008-06-04 13:02:22 +0000204
205# Water-sp
bart334db5e2008-06-05 10:14:53 +0000206(
207 cd ${SPLASH2}/codes/apps/water-spatial
208 test_input=input run_test ./WATER-SPATIAL
209)
bart868d73a2008-06-04 13:02:22 +0000210
211
bartc4a174f2008-06-03 11:41:19 +0000212
213# Local variables:
214# compile-command: "./run-splash2"
215# End: