blob: 5a1201ca15ccef62b9e9472704fc6becffeb46fd [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 {
bart8a2cd9b2008-06-19 07:49:49 +000010 local tmp avg1 stddev1 avg2 stddev2 avg4 stddev4 p
bart8785c122008-05-29 08:34:27 +000011
12 tmp="/tmp/test-timing.$$"
bart334db5e2008-06-05 10:14:53 +000013 rm -f "${tmp}"
14
bart8a2cd9b2008-06-19 07:49:49 +000015 p=1
16 test_output="${1}.out" measure_runtime "$@" -p${psep}${p} "${test_args}" | avgstddev > "$tmp"
barta5a95dd2008-06-18 14:15:11 +000017 read avg1 stddev1 vsz1 vszdev1 < "$tmp"
18 echo "Average time: ${avg1} +/- ${stddev1} seconds." \
19 " VSZ: ${vsz1} +/- ${vszdev1} KB"
bart8785c122008-05-29 08:34:27 +000020
bart8a2cd9b2008-06-19 07:49:49 +000021 p=2
22 test_output="${1}.out" measure_runtime "$@" -p${psep}${p} "${test_args}" | avgstddev > "$tmp"
barta5a95dd2008-06-18 14:15:11 +000023 read avg2 stddev2 vsz2 vszdev2 < "$tmp"
24 echo "Average time: ${avg2} +/- ${stddev2} seconds." \
25 " VSZ: ${vsz2} +/- ${vszdev2} KB"
bart0d4e5c22008-06-07 10:42:52 +000026
bart8a2cd9b2008-06-19 07:49:49 +000027 p=4
28 test_output="${1}.out" measure_runtime "$@" -p${psep}${p} "${test_args}" | avgstddev > "$tmp"
barta5a95dd2008-06-18 14:15:11 +000029 read avg4 stddev4 vsz4 vszdev4 < "$tmp"
30 echo "Average time: ${avg4} +/- ${stddev4} seconds." \
31 " VSZ: ${vsz4} +/- ${vszdev4} KB"
bartd1763bc2008-06-08 14:44:41 +000032
bart8a2cd9b2008-06-19 07:49:49 +000033 p=1
bartf16de382008-06-18 08:47:06 +000034 test_output="/dev/null" \
bart8a2cd9b2008-06-19 07:49:49 +000035 print_runtime_ratio ${avg1} ${stddev1} ${vsz1} ${vszdev1} $VG --tool=none "$@" -p${psep}${p} "${test_args}"
bartf16de382008-06-18 08:47:06 +000036
bart8a2cd9b2008-06-19 07:49:49 +000037 p=4
bartf16de382008-06-18 08:47:06 +000038 test_output="/dev/null" \
bart8a2cd9b2008-06-19 07:49:49 +000039 print_runtime_ratio ${avg4} ${stddev4} ${vsz4} ${vszdev4} $VG --tool=none "$@" -p${psep}${p} "${test_args}"
barta9952832008-06-17 14:20:26 +000040
bart8a2cd9b2008-06-19 07:49:49 +000041 p=4
42 test_output="${1}-drd-with-stack-var-4.out" \
barta5a95dd2008-06-18 14:15:11 +000043 print_runtime_ratio ${avg4} ${stddev4} ${vsz4} ${vszdev4} \
bart8a2cd9b2008-06-19 07:49:49 +000044 $VG --tool=exp-drd --check-stack-var=yes "$@" -p${psep}${p} "${test_args}"
bartcf801352008-06-15 09:13:28 +000045
bart8a2cd9b2008-06-19 07:49:49 +000046 p=4
47 test_output="${1}-drd-without-stack-var-4.out" \
barta5a95dd2008-06-18 14:15:11 +000048 print_runtime_ratio ${avg4} ${stddev4} ${vsz4} ${vszdev4} \
bart8a2cd9b2008-06-19 07:49:49 +000049 $VG --tool=exp-drd --check-stack-var=no "$@" -p${psep}${p} "${test_args}"
bartcf801352008-06-15 09:13:28 +000050
bart8a2cd9b2008-06-19 07:49:49 +000051 p=4
52 test_output="${1}-helgrind-4.out" \
53 print_runtime_ratio ${avg4} ${stddev4} ${vsz4} ${vszdev4} $VG --tool=helgrind "$@" -p${psep}${p} "${test_args}"
bart8785c122008-05-29 08:34:27 +000054
55 echo ''
56
57 rm -f "$tmp"
58}
59
60
bart9cdd1782008-06-08 11:22:23 +000061########################
62# Script body #
63########################
bart8785c122008-05-29 08:34:27 +000064
bart32811502008-06-03 15:12:59 +000065DRD_SCRIPTS_DIR="$(dirname $0)"
bart7acf3802008-06-06 10:17:26 +000066if [ "${DRD_SCRIPTS_DIR:0:1}" != "/" ]; then
67 DRD_SCRIPTS_DIR="$PWD/$DRD_SCRIPTS_DIR"
bart32811502008-06-03 15:12:59 +000068fi
69
70SPLASH2="${DRD_SCRIPTS_DIR}/../splash2"
bartc4a174f2008-06-03 11:41:19 +000071if [ ! -e "${SPLASH2}" ]; then
72 echo "Error: splash2 directory not found (${SPLASH2})."
bart8785c122008-05-29 08:34:27 +000073 exit 1
74fi
75
76if [ "$VG" = "" ]; then
bart32811502008-06-03 15:12:59 +000077 VG="${DRD_SCRIPTS_DIR}/../../vg-in-place"
bart8785c122008-05-29 08:34:27 +000078fi
79
80if [ ! -e "$VG" ]; then
81 echo "Could not find $VG."
82 exit 1
83fi
84
bartee17ad62008-06-18 13:31:05 +000085######################################################################################################################
barta5a95dd2008-06-18 14:15:11 +000086# Meaning of the different colums:
87# 1. SPLASH2 test name.
88# 2. Execution time in seconds for native run with argument -p1.
89# 3. Virtual memory size in KB for the native run with argument -p1.
90# 4. Execution time in seconds for native run with argument -p2.
91# 5. Virtual memory size in KB for the native run with argument -p2.
92# 6. Execution time in seconds for native run with argument -p4.
93# 7. Virtual memory size in KB for the native run with argument -p4.
94# 8. Execution time ratio for --tool=none -p1 versus -p1.
95# 9. Virtual memory size ratio for --tool=none -p1 versus -p1.
96# 10. Execution time ratio for --tool=none -p4 versus -p4.
97# 11. Virtual memory size ratio for --tool=none -p4 versus -p4.
98# 12. Execution time ratio for --tool=exp-drd --check-stack-var=yes -p4 versus -p4.
99# 13. Virtual memory size ratio for --tool=exp-drd --check-stack-var=yes -p4 versus -p4.
100# 14. Execution time ratio for --tool=exp-drd --check-stack-var=no -p4 versus -p4.
101# 15. Virtual memory size ratio for --tool=exp-drd --check-stack-var=no -p4 versus -p4.
102# 16. Execution time ratio for --tool=helgrind -p4 versus -p4.
103# 17. Virtual memory size ratio for --tool=helgrind -p4 versus -p4.
104# 18. Execution time ratio for Intel Thread Checker -p4 versus -p4.
105# 19. Execution time ratio for Intel Thread Checker -p4 versus -p4.
106#
bart8a2cd9b2008-06-19 07:49:49 +0000107# 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
barta5a95dd2008-06-18 14:15:11 +0000108#########################################################################################################################
bart8a2cd9b2008-06-19 07:49:49 +0000109# Results: native native native none none DRD DRD HG ITC ITC
110# -p1 -p2 -p4 -p1 -p4 -p4 -p4+f -p4 -p4 -p4+f
barta5a95dd2008-06-18 14:15:11 +0000111# .......................................................................................................................
bart8a2cd9b2008-06-19 07:49:49 +0000112# Cholesky 0.37 45867 0.25 55965 0.20 74944 8.3 2.08 17.3 1.66 173 1.96 118 2.07 54 3.16 239 82
113# FFT 0.23 6 GB 0.14 6 GB 0.10 6 GB 7.5 1.01 15.3 1.00 112 1.01 74 1.01 2201 1.76 90 41
114# LU, contiguous 0.95 16784 0.64 24984 0.43 41392 7.9 3.88 18.0 2.17 117 2.84 111 3.04 219 4.36 428 128
115# LU, non-contiguous 1.18 16792 0.69 24984 0.41 41376 6.7 3.88 19.2 2.17 197 3.04 176 3.24 158 4.26 428 128
116# Ocean, contiguous 24.53 918016 13.97 927732 9.28 945664 2.4 1.05 6.5 1.05 89 1.92 76 1.91 145 1.88 90 28
117# Ocean, non-contiguous 0.36 32120 0.19 40320 0.17 56728 4.2 2.51 9.8 1.86 55 2.27 67 2.43 119 3.54 90 28
118# Radiosity 4.73 56120 4.71 56120 4.71 56120 16.6 1.86 16.6 1.86 116 7.68 50 7.39 56 5.04 485 163
119# Radix 4.98 279744 2.55 287936 1.36 304448 6.1 1.17 21.3 1.16 54 1.90 50 1.92 212 2.09 222 56
120# Raytrace 2.77 320526 2.77 320526 2.77 320526 7.6 1.15 7.6 1.15 202 1.26 53 1.26 87 2.09 172 53
121# Water-n2 0.19 17304 0.19 17304 0.19 17304 12.3 3.85 12.3 3.85 66 5.13 34 5.13 45 7.68 189 39
122# Water-sp 0.20 10976 0.21 10976 0.21 10976 11.5 5.41 10.9 5.41 72 5.85 33 5.85 43 10.90 183 34
barta5a95dd2008-06-18 14:15:11 +0000123# .......................................................................................................................
bartee17ad62008-06-18 13:31:05 +0000124# Hardware: Two quad-core Intel Xeon L5130, 1.6 GHz, 4 MB L2 cache, 16 GB RAM.
125# Software: Ubuntu 8.04 server, 64-bit, gcc 4.3.1.
barta5a95dd2008-06-18 14:15:11 +0000126#########################################################################################################################
bart8a2cd9b2008-06-19 07:49:49 +0000127# Results: native native native none none DRD DRD HG ITC ITC
128# -p1 -p2 -p4 -p1 -p4 -p4 -p4+f -p4 -p4 -p4+f
barta5a95dd2008-06-18 14:15:11 +0000129# .......................................................................................................................
bart8a2cd9b2008-06-19 07:49:49 +0000130# 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
131# 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
132# LU, contiguous 0.76 16752 0.47 24957 0.51 41365 8.5 4.27 11.9 2.33 81 3.00 78 3.20 151 4.51 428 128
133# LU, non-contiguous 0.86 16760 0.47 24957 0.49 41352 7.6 4.26 11.9 2.33 133 3.20 120 3.39 104 4.41 428 128
134# Ocean, contiguous 19.46 918016 12.59 927232 12.61 945664 2.4 1.06 3.7 1.06 53 1.92 47 1.93 86 1.88 90 28
135# Ocean, non-contiguous 0.30 32088 0.19 40293 0.19 56696 4.0 2.71 6.8 1.97 38 2.43 47 2.57 84 3.66 90 28
136# Radiosity 3.84 56088 3.84 56088 3.84 56088 16.3 1.98 16.4 1.98 112 7.80 49 7.51 55 5.16 485 163
137# Radix 4.07 279680 2.12 287872 2.12 304427 6.0 1.20 11.5 1.18 29 1.92 27 1.94 141 2.12 222 56
138# Raytrace 2.22 320192 2.19 ...... 2.20 ...... 7.4 1.17 7.4 1.17 165 1.28 54 1.28 92 2.11 172 53
139# Water-n2 0.15 17272 0.10 33656 0.12 66432 12.4 4.22 16.1 1.84 ... .... .. .... .. .... 189 39
140# Water-sp 0.18 10947 .... ..... .... ..... 10.4 0.58 11.1 6.00 ... .... .. .... .. .... 183 34
barta5a95dd2008-06-18 14:15:11 +0000141# .......................................................................................................................
bartb08ca702008-06-12 13:50:40 +0000142# Hardware: dual-core Intel Xeon 5130, 2.0 GHz, 4 MB L2 cache, 4 GB RAM.
143# Software: Ubuntu 7.10 server, 64-bit, gcc 4.3.1, xload -update 1 running.
barta5a95dd2008-06-18 14:15:11 +0000144#########################################################################################################################
bart8a2cd9b2008-06-19 07:49:49 +0000145# Results: native native native none none DRD DRD HG ITC ITC
barta5a95dd2008-06-18 14:15:11 +0000146# -p1 -p2 -p4 -p1 -p4 -p4 -p4+f -p4 -p4 -p4+f
147# .......................................................................................................................
bart8a2cd9b2008-06-19 07:49:49 +0000148# 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
149# FFT 0.11 ..... 0.08 ..... 0.07 ..... .... .... .... .... 138 .... 66 .... 380 .... 90 41
150# LU, contiguous 0.56 ..... 0.34 ..... 0.34 ..... .... .... .... .... 72 .... 68 .... 96 .... 428 128
151# LU, non-contiguous 0.59 ..... 0.32 ..... 0.35 ..... .... .... .... .... 92 .... 109 .... 60 .... 428 128
152# Ocean, contiguous 14.30 ..... 9.54 ..... 9.56 ..... .... .... .... .... 61 .... 48 .... 89 .... 90 28
153# Ocean, non-contiguous 0.20 ..... 0.12 ..... 0.12 ..... .... .... .... .... 45 .... 51 .... 93 .... 90 28
154# Radiosity 2.33 ..... 2.32 ..... 2.33 ..... .... .... .... .... 175 .... 61 .... 60 .... 485 163
155# Radix 2.81 ..... 1.45 ..... 1.46 ..... .... .... .... .... 32 .... 29 .... 153 .... 222 56
156# Raytrace 1.65 ..... 1.64 ..... 1.64 ..... .... .... .... .... 230 .... 55 .... 89 .... 172 53
157# Water-n2 0.14 ..... 0.12 ..... 0.12 ..... .... .... .... .... 129 .... 35 .... 55 .... 189 39
158# Water-sp 0.14 ..... 0.12 ..... 0.12 ..... .... .... .... .... 121 .... 36 .... 54 .... 183 34
barta5a95dd2008-06-18 14:15:11 +0000159# .......................................................................................................................
bartcf801352008-06-15 09:13:28 +0000160# Hardware: dual-core Intel Core2 Duo E6750, 2.66 GHz, 4 MB L2 cache, 2 GB RAM.
161# Software: openSUSE 10.3, 64-bit, gcc 4.3.1, runlevel 5, X screensaver: blank
barta5a95dd2008-06-18 14:15:11 +0000162#########################################################################################################################
bart8785c122008-05-29 08:34:27 +0000163
bart66bb75c2008-06-17 06:19:29 +0000164cache_size=$(get_cache_size)
bart32811502008-06-03 15:12:59 +0000165log2_cache_size=$(log2 ${cache_size})
166
167# Cholesky
bart32811502008-06-03 15:12:59 +0000168(
bart868d73a2008-06-04 13:02:22 +0000169 cd ${SPLASH2}/codes/kernels/cholesky/inputs
170 for f in *Z
171 do
172 gzip -cd <$f >${f%.Z}
173 done
bart8a2cd9b2008-06-19 07:49:49 +0000174 test_args=tk29.O run_test ../CHOLESKY -C$((cache_size))
bart32811502008-06-03 15:12:59 +0000175)
bart32811502008-06-03 15:12:59 +0000176
177# FFT
barta9952832008-06-17 14:20:26 +0000178run_test ${SPLASH2}/codes/kernels/fft/FFT -t -l$((log2_cache_size)) -m18
bart32811502008-06-03 15:12:59 +0000179
180# LU, contiguous blocks.
bartc4a174f2008-06-03 11:41:19 +0000181run_test ${SPLASH2}/codes/kernels/lu/contiguous_blocks/LU -n1024
bart8785c122008-05-29 08:34:27 +0000182
bart32811502008-06-03 15:12:59 +0000183# LU, non-contiguous blocks.
bartc4a174f2008-06-03 11:41:19 +0000184run_test ${SPLASH2}/codes/kernels/lu/non_contiguous_blocks/LU -n1024
bart8785c122008-05-29 08:34:27 +0000185
bart868d73a2008-06-04 13:02:22 +0000186# Ocean
187run_test ${SPLASH2}/codes/apps/ocean/contiguous_partitions/OCEAN -n2050
188run_test ${SPLASH2}/codes/apps/ocean/non_contiguous_partitions/OCEAN -n258
189
bart32811502008-06-03 15:12:59 +0000190# Radiosity.
bart8a2cd9b2008-06-19 07:49:49 +0000191run_test ${SPLASH2}/codes/apps/radiosity/RADIOSITY -batch
bartc4a174f2008-06-03 11:41:19 +0000192
bart868d73a2008-06-04 13:02:22 +0000193# Radix
bart8a2cd9b2008-06-19 07:49:49 +0000194run_test ${SPLASH2}/codes/kernels/radix/RADIX -n $((2**24))
bart868d73a2008-06-04 13:02:22 +0000195
196# Raytrace
bart8a2cd9b2008-06-19 07:49:49 +0000197if false; then
bart868d73a2008-06-04 13:02:22 +0000198(
199 cd ${SPLASH2}/codes/apps/raytrace/inputs
200 rm -f *.env *.geo *.rl
201 for f in *Z
202 do
203 gzip -cd <$f >${f%.Z}
204 done
bart8a2cd9b2008-06-19 07:49:49 +0000205 test_args=balls4.env psep=' ' run_test ../RAYTRACE
bart868d73a2008-06-04 13:02:22 +0000206)
bart8a2cd9b2008-06-19 07:49:49 +0000207fi
bart334db5e2008-06-05 10:14:53 +0000208
bart868d73a2008-06-04 13:02:22 +0000209# Water-n2
bart334db5e2008-06-05 10:14:53 +0000210(
211 cd ${SPLASH2}/codes/apps/water-nsquared
bart8a2cd9b2008-06-19 07:49:49 +0000212 test_input=${DRD_SCRIPTS_DIR}/run-splash2-water-input psep=' ' run_test ./WATER-NSQUARED
bart334db5e2008-06-05 10:14:53 +0000213)
bart868d73a2008-06-04 13:02:22 +0000214
215# Water-sp
bart334db5e2008-06-05 10:14:53 +0000216(
217 cd ${SPLASH2}/codes/apps/water-spatial
bart8a2cd9b2008-06-19 07:49:49 +0000218 test_input=${DRD_SCRIPTS_DIR}/run-splash2-water-input psep=' ' run_test ./WATER-SPATIAL
bart334db5e2008-06-05 10:14:53 +0000219)
bart868d73a2008-06-04 13:02:22 +0000220
221
bartc4a174f2008-06-03 11:41:19 +0000222
223# Local variables:
224# compile-command: "./run-splash2"
225# End: