aboutsummaryrefslogtreecommitdiff
path: root/benchmark.sh
blob: 8f0ccc648d8eeb37d27f91a5c010285a139d1627 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
if [ -z "$1" ]; then
	echo "No argument provided. Possible values:"
	echo "  - performance"
	echo "  - architecture"
	echo "  - memory"
	echo "  - nodes"
	echo "  - multithread"
	exit 1
fi

input=$1
ARGS="h48h6k2"
THREADS=8

case $input in
	performance)
		echo "Performance Benchmark..."
		make clean
		THREADS=$THREADS ./configure.sh
		TOOL=benchmark_performance TOOLARGS="$ARGS" make tool
		;;
	architecture)
		echo "Architecture Benchmark..."
		make clean
		THREADS=$THREADS ./configure.sh
		TOOL=benchmark_common TOOLARGS="$ARGS" make tool
		make clean
		THREADS=$THREADS ARCH=PORTABLE ./configure.sh
		TOOL=benchmark_common TOOLARGS="$ARGS" make tool
		;;
	memory)
		echo "Memory Benchmark..."
		for i in {0..7}; do
			make clean
			THREADS=$THREADS ./configure.sh
			M_ARGS="h48h${i}k2"
			TOOL=benchmark_common TOOLARGS="$M_ARGS" make tool
		done
		;;
	nodes)
		echo "Nodes Benchmark..."
		make clean
		THREADS=1 ./configure.sh
		TOOL=benchmark_nodes TOOLARGS="$ARGS" make tool
		;;
	multithread)
		echo "Multithread Benchmark..."
		make clean
		for i in 1 2 4 8 16; do
			make clean
			THREADS=$i ./configure.sh
			TOOL=benchmark_common TOOLARGS="$ARGS" make tool
		done
		;;
	*)
	echo "Invalid argument. Possible values:"
	echo "  - performance"
	echo "  - architecture"
	echo "  - memory"
	echo "  - nodes"
	echo "  - multithread"
	exit 1
	;;
esac

Generated with cgit - Back to sebastiano.tronto.net