blob: b272bef91cdc929ccc77686384728b93302597cb [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
bartc4a174f2008-06-03 11:41:19 +000026 done
bart8785c122008-05-29 08:34:27 +000027
28 echo ''
29
30 rm -f "$tmp"
31}
32
33
bart9cdd1782008-06-08 11:22:23 +000034########################
35# Script body #
36########################
bart8785c122008-05-29 08:34:27 +000037
bart32811502008-06-03 15:12:59 +000038DRD_SCRIPTS_DIR="$(dirname $0)"
bart7acf3802008-06-06 10:17:26 +000039if [ "${DRD_SCRIPTS_DIR:0:1}" != "/" ]; then
40 DRD_SCRIPTS_DIR="$PWD/$DRD_SCRIPTS_DIR"
bart32811502008-06-03 15:12:59 +000041fi
42
43SPLASH2="${DRD_SCRIPTS_DIR}/../splash2"
bartc4a174f2008-06-03 11:41:19 +000044if [ ! -e "${SPLASH2}" ]; then
45 echo "Error: splash2 directory not found (${SPLASH2})."
bart8785c122008-05-29 08:34:27 +000046 exit 1
47fi
48
49if [ "$VG" = "" ]; then
bart32811502008-06-03 15:12:59 +000050 VG="${DRD_SCRIPTS_DIR}/../../vg-in-place"
bart8785c122008-05-29 08:34:27 +000051fi
52
53if [ ! -e "$VG" ]; then
54 echo "Could not find $VG."
55 exit 1
56fi
57
bart0d4e5c22008-06-07 10:42:52 +000058##############################################################################
59# Results: (-p1) (-p2) (-p4) ITC (-p4) ITC (-p4)
60# original w/ filter
61# ............................................................................
62# Cholesky 40 47 82 239 82
63# FFT 16 17 47 90 41
64# LU, contiguous blocks 39 41 45 428 128
65# LU, non-contiguous blocks 39 41 49 428 128
66# Ocean, contiguous partitions 17 19 25 90 28
67# Ocean, non-continguous partns 18 21 30 90 28
68# Radiosity 78 78 78 485 163
69# Radix 10 12 15 222 56
70# Raytrace 56 56 56 172 53
71# Water-n2 34 34 34 189 39
72# Water-sp 33 33 33 183 34
73# ............................................................................
74# Hardware: dual-core Intel Xeon 5130, 2.0 GHz, 4 MB L2 cache, 4 GB RAM.
bart9cdd1782008-06-08 11:22:23 +000075# Software: Ubuntu 7.10 server, 64-bit, gcc 4.1.3.
bart0d4e5c22008-06-07 10:42:52 +000076##############################################################################
77# Results: native DRD (-p4) DRD (-p4) ITC (-p4) ITC (-p4)
78# time original w/ filter original w/ filter
79# ............................................................................
bart9cdd1782008-06-08 11:22:23 +000080# Cholesky 0.21 107 70 239 82
81# FFT 0.11 90 17 90 41
82# LU, contiguous blocks 0.56 53 46 428 128
83# LU, non-contiguous blocks 0.59 57 49 428 128
84# Ocean, contiguous partitions 14.32 34 24 90 28
85# Ocean, non-continguous partns 0.21 28 30 90 28
bartf33ce892008-06-07 11:40:14 +000086# Radiosity 2.35 .. 76 485 163
87# Radix 2.80 .. 16 222 56
88# Raytrace 90.79 .. 54 172 53
89# Water-n2 0.15 .. 27 189 39
90# Water-sp 0.15 .. 26 183 34
bart0d4e5c22008-06-07 10:42:52 +000091# ............................................................................
92# Hardware: dual-core Intel Core2 Duo E6750, 2.66 GHz, 4 MB L2 cache, 2 GB RAM.
bart9cdd1782008-06-08 11:22:23 +000093# Software: openSUSE 10.3, 64-bit, gcc 4.2.1, runlevel 5, X screensaver: blank
bart0d4e5c22008-06-07 10:42:52 +000094##############################################################################
bart8785c122008-05-29 08:34:27 +000095
bart0d4e5c22008-06-07 10:42:52 +000096cache_size=$(($(get_cache_size)/2))
bart32811502008-06-03 15:12:59 +000097log2_cache_size=$(log2 ${cache_size})
98
99# Cholesky
bart32811502008-06-03 15:12:59 +0000100(
bart868d73a2008-06-04 13:02:22 +0000101 cd ${SPLASH2}/codes/kernels/cholesky/inputs
102 for f in *Z
103 do
104 gzip -cd <$f >${f%.Z}
105 done
bart0d4e5c22008-06-07 10:42:52 +0000106 run_test ../CHOLESKY -C${cache_size} tk29.O
bart32811502008-06-03 15:12:59 +0000107)
bart32811502008-06-03 15:12:59 +0000108
109# FFT
bart0d4e5c22008-06-07 10:42:52 +0000110run_test ${SPLASH2}/codes/kernels/fft/FFT -t -l${log2_cache_size} -m18
bart32811502008-06-03 15:12:59 +0000111
112# LU, contiguous blocks.
bartc4a174f2008-06-03 11:41:19 +0000113run_test ${SPLASH2}/codes/kernels/lu/contiguous_blocks/LU -n1024
bart8785c122008-05-29 08:34:27 +0000114
bart32811502008-06-03 15:12:59 +0000115# LU, non-contiguous blocks.
bartc4a174f2008-06-03 11:41:19 +0000116run_test ${SPLASH2}/codes/kernels/lu/non_contiguous_blocks/LU -n1024
bart8785c122008-05-29 08:34:27 +0000117
bart868d73a2008-06-04 13:02:22 +0000118# Ocean
119run_test ${SPLASH2}/codes/apps/ocean/contiguous_partitions/OCEAN -n2050
120run_test ${SPLASH2}/codes/apps/ocean/non_contiguous_partitions/OCEAN -n258
121
bart32811502008-06-03 15:12:59 +0000122# Radiosity.
bartc4a174f2008-06-03 11:41:19 +0000123run_test ${SPLASH2}/codes/apps/radiosity/RADIOSITY -batch -room
124
bart868d73a2008-06-04 13:02:22 +0000125# Radix
126run_test ${SPLASH2}/codes/kernels/radix/RADIX -n$((2**24))
127
128# Raytrace
129(
130 cd ${SPLASH2}/codes/apps/raytrace/inputs
131 rm -f *.env *.geo *.rl
132 for f in *Z
133 do
134 gzip -cd <$f >${f%.Z}
135 done
136 run_test ../RAYTRACE balls4.env
137)
bart334db5e2008-06-05 10:14:53 +0000138
bart868d73a2008-06-04 13:02:22 +0000139# Water-n2
bart334db5e2008-06-05 10:14:53 +0000140(
141 cd ${SPLASH2}/codes/apps/water-nsquared
142 test_input=input run_test ./WATER-NSQUARED
143)
bart868d73a2008-06-04 13:02:22 +0000144
145# Water-sp
bart334db5e2008-06-05 10:14:53 +0000146(
147 cd ${SPLASH2}/codes/apps/water-spatial
148 test_input=input run_test ./WATER-SPATIAL
149)
bart868d73a2008-06-04 13:02:22 +0000150
151
bartc4a174f2008-06-03 11:41:19 +0000152
153# Local variables:
154# compile-command: "./run-splash2"
155# End: