bart | 8785c12 | 2008-05-29 08:34:27 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | ######################## |
| 4 | # Function definitions # |
| 5 | ######################## |
| 6 | |
bart | f33ce89 | 2008-06-07 11:40:14 +0000 | [diff] [blame] | 7 | source "$(dirname $0)/measurement-functions" |
bart | 8785c12 | 2008-05-29 08:34:27 +0000 | [diff] [blame] | 8 | |
| 9 | function run_test { |
bart | cf80135 | 2008-06-15 09:13:28 +0000 | [diff] [blame^] | 10 | local tmp avg1=1 stddev1=1 avg2=1 stddev2=1 p=4 |
bart | 8785c12 | 2008-05-29 08:34:27 +0000 | [diff] [blame] | 11 | |
| 12 | tmp="/tmp/test-timing.$$" |
bart | 334db5e | 2008-06-05 10:14:53 +0000 | [diff] [blame] | 13 | rm -f "${tmp}" |
| 14 | |
bart | cf80135 | 2008-06-15 09:13:28 +0000 | [diff] [blame^] | 15 | test_output="${1}.out" measure_runtime "$@" -p1 | avgstddev > "$tmp" |
bart | 8785c12 | 2008-05-29 08:34:27 +0000 | [diff] [blame] | 16 | read avg1 stddev1 < "$tmp" |
| 17 | echo "Average time: ${avg1} +/- ${stddev1} seconds" |
| 18 | |
bart | cf80135 | 2008-06-15 09:13:28 +0000 | [diff] [blame^] | 19 | test_output="${1}.out" measure_runtime "$@" -p2 | avgstddev > "$tmp" |
| 20 | read avg1 stddev1 < "$tmp" |
| 21 | echo "Average time: ${avg1} +/- ${stddev1} seconds" |
bart | 0d4e5c2 | 2008-06-07 10:42:52 +0000 | [diff] [blame] | 22 | |
bart | cf80135 | 2008-06-15 09:13:28 +0000 | [diff] [blame^] | 23 | test_output="${1}.out" measure_runtime "$@" -p4 | avgstddev > "$tmp" |
| 24 | read avg1 stddev1 < "$tmp" |
| 25 | echo "Average time: ${avg1} +/- ${stddev1} seconds" |
bart | d1763bc | 2008-06-08 14:44:41 +0000 | [diff] [blame] | 26 | |
bart | cf80135 | 2008-06-15 09:13:28 +0000 | [diff] [blame^] | 27 | 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 |
bart | 8785c12 | 2008-05-29 08:34:27 +0000 | [diff] [blame] | 35 | |
| 36 | echo '' |
| 37 | |
| 38 | rm -f "$tmp" |
| 39 | } |
| 40 | |
| 41 | |
bart | 9cdd178 | 2008-06-08 11:22:23 +0000 | [diff] [blame] | 42 | ######################## |
| 43 | # Script body # |
| 44 | ######################## |
bart | 8785c12 | 2008-05-29 08:34:27 +0000 | [diff] [blame] | 45 | |
bart | 3281150 | 2008-06-03 15:12:59 +0000 | [diff] [blame] | 46 | DRD_SCRIPTS_DIR="$(dirname $0)" |
bart | 7acf380 | 2008-06-06 10:17:26 +0000 | [diff] [blame] | 47 | if [ "${DRD_SCRIPTS_DIR:0:1}" != "/" ]; then |
| 48 | DRD_SCRIPTS_DIR="$PWD/$DRD_SCRIPTS_DIR" |
bart | 3281150 | 2008-06-03 15:12:59 +0000 | [diff] [blame] | 49 | fi |
| 50 | |
| 51 | SPLASH2="${DRD_SCRIPTS_DIR}/../splash2" |
bart | c4a174f | 2008-06-03 11:41:19 +0000 | [diff] [blame] | 52 | if [ ! -e "${SPLASH2}" ]; then |
| 53 | echo "Error: splash2 directory not found (${SPLASH2})." |
bart | 8785c12 | 2008-05-29 08:34:27 +0000 | [diff] [blame] | 54 | exit 1 |
| 55 | fi |
| 56 | |
| 57 | if [ "$VG" = "" ]; then |
bart | 3281150 | 2008-06-03 15:12:59 +0000 | [diff] [blame] | 58 | VG="${DRD_SCRIPTS_DIR}/../../vg-in-place" |
bart | 8785c12 | 2008-05-29 08:34:27 +0000 | [diff] [blame] | 59 | fi |
| 60 | |
| 61 | if [ ! -e "$VG" ]; then |
| 62 | echo "Could not find $VG." |
| 63 | exit 1 |
| 64 | fi |
| 65 | |
bart | 0d4e5c2 | 2008-06-07 10:42:52 +0000 | [diff] [blame] | 66 | ############################################################################## |
bart | 7386714 | 2008-06-09 12:43:20 +0000 | [diff] [blame] | 67 | # Results (-p4): native DRD DRD HG ITC ITC |
bart | cf80135 | 2008-06-15 09:13:28 +0000 | [diff] [blame^] | 68 | # (-p1) w/ filter w/ filter |
bart | 0d4e5c2 | 2008-06-07 10:42:52 +0000 | [diff] [blame] | 69 | # ............................................................................ |
bart | b08ca70 | 2008-06-12 13:50:40 +0000 | [diff] [blame] | 70 | # Cholesky 0.29 103 64 37 239 82 |
bart | 8b4b2ee | 2008-06-11 13:17:56 +0000 | [diff] [blame] | 71 | # FFT 0.19 65 32 556 90 41 |
bart | b08ca70 | 2008-06-12 13:50:40 +0000 | [diff] [blame] | 72 | # 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 |
bart | cf80135 | 2008-06-15 09:13:28 +0000 | [diff] [blame^] | 75 | # Ocean, non-contiguous partns 0.29 26 29 53 90 28 |
bart | b08ca70 | 2008-06-12 13:50:40 +0000 | [diff] [blame] | 76 | # Radiosity 3.11 223 61 58 485 163 |
bart | 8b4b2ee | 2008-06-11 13:17:56 +0000 | [diff] [blame] | 77 | # Radix 4.05 16 14 85 222 56 |
bart | b08ca70 | 2008-06-12 13:50:40 +0000 | [diff] [blame] | 78 | # Raytrace 2.21 272 53 89 172 53 |
bart | 8b4b2ee | 2008-06-11 13:17:56 +0000 | [diff] [blame] | 79 | # Water-n2 0.17 176 33 52 189 39 |
| 80 | # Water-sp 0.18 145 33 51 183 34 |
bart | 0d4e5c2 | 2008-06-07 10:42:52 +0000 | [diff] [blame] | 81 | # ............................................................................ |
| 82 | # Hardware: dual-core Intel Xeon 5130, 2.0 GHz, 4 MB L2 cache, 4 GB RAM. |
bart | b08ca70 | 2008-06-12 13:50:40 +0000 | [diff] [blame] | 83 | # 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 |
bart | cf80135 | 2008-06-15 09:13:28 +0000 | [diff] [blame^] | 86 | # (-p1) w/ filter w/ filter |
bart | b08ca70 | 2008-06-12 13:50:40 +0000 | [diff] [blame] | 87 | # ............................................................................ |
| 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 |
bart | cf80135 | 2008-06-15 09:13:28 +0000 | [diff] [blame^] | 93 | # Ocean, non-contiguous partns 0.29 25 29 53 90 28 |
bart | b08ca70 | 2008-06-12 13:50:40 +0000 | [diff] [blame] | 94 | # 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. |
bart | 0d4e5c2 | 2008-06-07 10:42:52 +0000 | [diff] [blame] | 102 | ############################################################################## |
bart | d1763bc | 2008-06-08 14:44:41 +0000 | [diff] [blame] | 103 | # Results (-p4): native DRD DRD HG ITC ITC |
bart | cf80135 | 2008-06-15 09:13:28 +0000 | [diff] [blame^] | 104 | # (-p1) w/ filter w/ filter |
bart | 0d4e5c2 | 2008-06-07 10:42:52 +0000 | [diff] [blame] | 105 | # ............................................................................ |
bart | 4f192dc | 2008-06-11 18:37:34 +0000 | [diff] [blame] | 106 | # 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 |
bart | cf80135 | 2008-06-15 09:13:28 +0000 | [diff] [blame^] | 111 | # Ocean, non-contiguous partns 0.21 30 33 56 90 28 |
bart | 4f192dc | 2008-06-11 18:37:34 +0000 | [diff] [blame] | 112 | # 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 |
bart | 0d4e5c2 | 2008-06-07 10:42:52 +0000 | [diff] [blame] | 117 | # ............................................................................ |
| 118 | # Hardware: dual-core Intel Core2 Duo E6750, 2.66 GHz, 4 MB L2 cache, 2 GB RAM. |
bart | 9cdd178 | 2008-06-08 11:22:23 +0000 | [diff] [blame] | 119 | # Software: openSUSE 10.3, 64-bit, gcc 4.2.1, runlevel 5, X screensaver: blank |
bart | 0d4e5c2 | 2008-06-07 10:42:52 +0000 | [diff] [blame] | 120 | ############################################################################## |
bart | 5501b0a | 2008-06-13 19:44:51 +0000 | [diff] [blame] | 121 | # Results (-p4): native DRD DRD HG ITC ITC |
bart | cf80135 | 2008-06-15 09:13:28 +0000 | [diff] [blame^] | 122 | # (-p1) w/ filter w/ filter |
bart | 5501b0a | 2008-06-13 19:44:51 +0000 | [diff] [blame] | 123 | # ............................................................................ |
| 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 |
bart | cf80135 | 2008-06-15 09:13:28 +0000 | [diff] [blame^] | 129 | # Ocean, non-contiguous partns 0.21 28 32 56 90 28 |
bart | 5501b0a | 2008-06-13 19:44:51 +0000 | [diff] [blame] | 130 | # 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 | ############################################################################## |
bart | cf80135 | 2008-06-15 09:13:28 +0000 | [diff] [blame^] | 139 | # 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 | ############################################################################## |
bart | 8785c12 | 2008-05-29 08:34:27 +0000 | [diff] [blame] | 157 | |
bart | 0d4e5c2 | 2008-06-07 10:42:52 +0000 | [diff] [blame] | 158 | cache_size=$(($(get_cache_size)/2)) |
bart | 3281150 | 2008-06-03 15:12:59 +0000 | [diff] [blame] | 159 | log2_cache_size=$(log2 ${cache_size}) |
| 160 | |
| 161 | # Cholesky |
bart | 3281150 | 2008-06-03 15:12:59 +0000 | [diff] [blame] | 162 | ( |
bart | 868d73a | 2008-06-04 13:02:22 +0000 | [diff] [blame] | 163 | cd ${SPLASH2}/codes/kernels/cholesky/inputs |
| 164 | for f in *Z |
| 165 | do |
| 166 | gzip -cd <$f >${f%.Z} |
| 167 | done |
bart | 0d4e5c2 | 2008-06-07 10:42:52 +0000 | [diff] [blame] | 168 | run_test ../CHOLESKY -C${cache_size} tk29.O |
bart | 3281150 | 2008-06-03 15:12:59 +0000 | [diff] [blame] | 169 | ) |
bart | 3281150 | 2008-06-03 15:12:59 +0000 | [diff] [blame] | 170 | |
| 171 | # FFT |
bart | 0d4e5c2 | 2008-06-07 10:42:52 +0000 | [diff] [blame] | 172 | run_test ${SPLASH2}/codes/kernels/fft/FFT -t -l${log2_cache_size} -m18 |
bart | 3281150 | 2008-06-03 15:12:59 +0000 | [diff] [blame] | 173 | |
| 174 | # LU, contiguous blocks. |
bart | c4a174f | 2008-06-03 11:41:19 +0000 | [diff] [blame] | 175 | run_test ${SPLASH2}/codes/kernels/lu/contiguous_blocks/LU -n1024 |
bart | 8785c12 | 2008-05-29 08:34:27 +0000 | [diff] [blame] | 176 | |
bart | 3281150 | 2008-06-03 15:12:59 +0000 | [diff] [blame] | 177 | # LU, non-contiguous blocks. |
bart | c4a174f | 2008-06-03 11:41:19 +0000 | [diff] [blame] | 178 | run_test ${SPLASH2}/codes/kernels/lu/non_contiguous_blocks/LU -n1024 |
bart | 8785c12 | 2008-05-29 08:34:27 +0000 | [diff] [blame] | 179 | |
bart | 868d73a | 2008-06-04 13:02:22 +0000 | [diff] [blame] | 180 | # Ocean |
| 181 | run_test ${SPLASH2}/codes/apps/ocean/contiguous_partitions/OCEAN -n2050 |
| 182 | run_test ${SPLASH2}/codes/apps/ocean/non_contiguous_partitions/OCEAN -n258 |
| 183 | |
bart | 3281150 | 2008-06-03 15:12:59 +0000 | [diff] [blame] | 184 | # Radiosity. |
bart | c4a174f | 2008-06-03 11:41:19 +0000 | [diff] [blame] | 185 | run_test ${SPLASH2}/codes/apps/radiosity/RADIOSITY -batch -room |
| 186 | |
bart | 868d73a | 2008-06-04 13:02:22 +0000 | [diff] [blame] | 187 | # Radix |
| 188 | run_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 | ) |
bart | 334db5e | 2008-06-05 10:14:53 +0000 | [diff] [blame] | 200 | |
bart | 868d73a | 2008-06-04 13:02:22 +0000 | [diff] [blame] | 201 | # Water-n2 |
bart | 334db5e | 2008-06-05 10:14:53 +0000 | [diff] [blame] | 202 | ( |
| 203 | cd ${SPLASH2}/codes/apps/water-nsquared |
| 204 | test_input=input run_test ./WATER-NSQUARED |
| 205 | ) |
bart | 868d73a | 2008-06-04 13:02:22 +0000 | [diff] [blame] | 206 | |
| 207 | # Water-sp |
bart | 334db5e | 2008-06-05 10:14:53 +0000 | [diff] [blame] | 208 | ( |
| 209 | cd ${SPLASH2}/codes/apps/water-spatial |
| 210 | test_input=input run_test ./WATER-SPATIAL |
| 211 | ) |
bart | 868d73a | 2008-06-04 13:02:22 +0000 | [diff] [blame] | 212 | |
| 213 | |
bart | c4a174f | 2008-06-03 11:41:19 +0000 | [diff] [blame] | 214 | |
| 215 | # Local variables: |
| 216 | # compile-command: "./run-splash2" |
| 217 | # End: |