-
Notifications
You must be signed in to change notification settings - Fork 3
/
benchmark.sh
executable file
·115 lines (105 loc) · 3.71 KB
/
benchmark.sh
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#!/bin/bash
module load gcc/12.2.0
len=100000000
path=$(pwd)
itr=25
if [ $1 = "hifiveu" ]; then
itr=4
elif [ $1 = "star64" ]; then
itr=4
fi
for i in $(eval echo "{$itr..1}")
do
data=""
for j in {1..10}
do
if [ $1 = "star64" ]; then
result=$(${path}/build/src/taylor_future ${len} 0.5 $i)
elif [ $1 = "hifiveu" ]; then
result=$(srun --cpus-per-task=4 --ntasks-per-node=1 --ntasks-per-core=1 ${path}/build/src/taylor_future ${len} 0.5 $i)
else
result=$(srun ${path}/build/src/taylor_future ${len} 0.5 $i)
fi
array=($result)
IFS=',' read -ra my_array <<< "${array[0]}"
data="$data ${my_array[1]}"
done
list=(`for n in $data; do printf "%015.06f\n" $n; done | sort -n`)
echo "$i,${list[${#list[*]}/2]},${list[0]},${list[${#list[*]}-1]}" >> $1_taylor_future_median.csv
done
for i in $(eval echo "{$itr..1}")
do
data=""
for j in {1..10}
do
if [ $1 = "star64" ]; then
result=$(${path}/build/src/taylor_future_hpx ${len} 0.5 $i --hpx:threads=$i)
elif [ $1 = "hifiveu" ]; then
result=$(srun --cpus-per-task=4 --ntasks-per-node=1 --ntasks-per-core=1 ${path}/build/src/taylor_future ${len} 0.5 $i)
else
result=$(srun ${path}/build/src/taylor_future ${len} 0.5 $i)
fi
array=($result)
IFS=',' read -ra my_array <<< "${array[0]}"
data="$data ${my_array[1]}"
done
list=(`for n in $data; do printf "%015.06f\n" $n; done | sort -n`);
echo "$i,${list[${#list[*]}/2]},${list[0]},${list[${#list[*]}-1]}" >> $1_taylor_future_hpx_median.csv
done
for i in $(eval echo "{$itr..1}")
do
data=""
for j in {1..10}
do
if [ $1 = "star64" ]; then
result=$(${path}/build/src/taylor_par_hpx ${len} 0.5 --hpx:threads=$i)
elif [ $1 = "hifiveu" ]; then
result=$(srun --cpus-per-task=4 --ntasks-per-node=1 --ntasks-per-core=1 ${path}/build/src/taylor_future ${len} 0.5 $i)
else
result=$(srun ${path}/build/src/taylor_future ${len} 0.5 $i)
fi
array=($result)
IFS=',' read -ra my_array <<< "${array[0]}"
data="$data ${my_array[1]}"
done
list=(`for n in $data; do printf "%015.06f\n" $n; done | sort -n`);
echo "$i,${list[${#list[*]}/2]},${list[0]},${list[${#list[*]}-1]}" >> $1_taylor_par_hpx_median.csv
done
for i in $(eval echo "{$itr..1}")
do
data=""
for j in {1..10}
do
if [ $1 = "star64" ]; then
result=$(${path}/build/src/taylor_future_coroutine_hpx ${len} 0.5 $i --hpx:threads=$i)
elif [ $1 = "hifiveu" ]; then
result=$(srun --cpus-per-task=4 --ntasks-per-node=1 --ntasks-per-core=1 ${path}/build/src/taylor_future ${len} 0.5 $i)
else
result=$(srun ${path}/build/src/taylor_future ${len} 0.5 $i)
fi
array=($result)
IFS=',' read -ra my_array <<< "${array[0]}"
data="$data ${my_array[1]}"
done
list=(`for n in $data; do printf "%015.06f\n" $n; done | sort -n`);
echo "$i,${list[${#list[*]}/2]},${list[0]},${list[${#list[*]}-1]}" >> $1_taylor_coroutine_hpx_median.csv
done
for i in $(eval echo "{$itr..1}")
do
data=""
for j in {1..10}
do
if [ $1 = "star64" ]; then
result=$(${path}/build/src/taylor_sender_receiver_hpx ${len} 0.5 $i --hpx:threads=$i)
elif [ $1 = "hifiveu" ]; then
result=$(srun --cpus-per-task=4 --ntasks-per-node=1 --ntasks-per-core=1 ${path}/build/src/taylor_future ${len} 0.5 $i)
else
result=$(srun ${path}/build/src/taylor_future ${len} 0.5 $i)
fi
array=($result)
IFS=',' read -ra my_array <<< "${array[0]}"
data="$data ${my_array[1]}"
done
list=(`for n in $data; do printf "%015.06f\n" $n; done | sort -n`);
echo "$i,${list[${#list[*]}/2]},${list[0]},${list[${#list[*]}-1]}" >> $1_taylor_sender_receiver_hpx_median.csv
done