-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCAFrun
More file actions
executable file
·76 lines (66 loc) · 2.77 KB
/
CAFrun
File metadata and controls
executable file
·76 lines (66 loc) · 2.77 KB
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
#!/bin/sh -
hostname=`hostname`
if [ "${hostname}" = "plg2" ] ; then
startcore=0
elif [ "${hostname}" = "plg7b" ] ; then
startcore=0
elif [ "${hostname}" = "nasus" ] ; then
startcore=128
elif [ "${hostname}" = "jax" ] ; then
startcore=24
elif [ "${hostname}" = "pyke" ] ; then
startcore=0
else
echo "unsupported host" ${hostname}
exit 1
fi
sed -i 's/max-threads = .*/max-threads = 1/g' caf-application.conf
#cat caf-application.conf
for benchmark in SendStatic SendDynamic Become ; do
echo "CAF${benchmark}"
g++ -O3 -Wall -std=c++17 -ICAF/actor-framework/libcaf_core -ICAF/actor-framework/libcaf_core/caf -ICAF/actor-framework/build/libcaf_core -LCAF/actor-framework/build/libcaf_core -LCAF/actor-framework/build/libcaf_io CAF${benchmark}.cpp -lcaf_io -lcaf_core -Wl,-rpath=CAF/actor-framework/build/libcaf_core
cat /dev/null > CAF${benchmark} # empty file
i=1
while [ ${i} -le 11 ] ; do
taskset -c ${startcore} /usr/bin/time -f "%Uu %Ss %Er %Mkb" a.out d >> CAF${benchmark} 2>&1
i=`expr ${i} + 1`
done
done
mkdir -p CAFBatch
g++ -O3 -Wall -std=c++17 -ICAF/actor-framework/libcaf_core -ICAF/actor-framework/libcaf_core/caf -ICAF/actor-framework/build/libcaf_core -LCAF/actor-framework/build/libcaf_core -LCAF/actor-framework/build/libcaf_io CAFExecutor.cpp -lcaf_io -lcaf_core -Wl,-rpath=CAF/actor-framework/build/libcaf_core
for bt in 1 10 100 ; do
echo "CAFBatch ${bt}"
#p=1
#while [ ${p} -le 32 ] ; do
cat /dev/null > CAFBatch/CAFExecutor_${bt} # empty file
for p in 1 2 4 8 16 24 32 ; do #
i=1
while [ ${i} -le 11 ] ; do
sed -i "s/max-threads = .*/max-threads = ${p}/g" caf-application.conf #reset
#/usr/bin/time -f "%Uu %Ss %Er %Mkb" a.out d d d ${p}
taskset -c ${startcore}-`expr ${startcore} + ${p} - 1` /usr/bin/time -f "%Uu %Ss %Er %Mkb" a.out d d d ${p} ${bt} >> CAFBatch/CAFExecutor_${bt} 2>&1
i=`expr ${i} + 1`
done
echo "" >> CAFBatch/CAFExecutor_${bt} 2>&1
#p=`expr ${p} + 1`
done
done
g++ -O3 -Wall -std=c++17 -ICAF/actor-framework/libcaf_core -ICAF/actor-framework/libcaf_core/caf -ICAF/actor-framework/build/libcaf_core -LCAF/actor-framework/build/libcaf_core -LCAF/actor-framework/build/libcaf_io CAFMatrix.cpp -lcaf_io -lcaf_core -Wl,-rpath=CAF/actor-framework/build/libcaf_core
cat /dev/null > CAFMatrix # empty file
for p in 1 2 4 8 16 24 32 ; do #
echo "CAFMatrix ${p}"
i=1
while [ ${i} -le 11 ] ; do
sed -i "s/max-threads = .*/max-threads = ${p}/g" caf-application.conf # reset
#/usr/bin/time -f "%Uu %Ss %Er %Mkb" a.out d d d ${p}
taskset -c ${startcore}-`expr ${startcore} + ${p} - 1` /usr/bin/time -f "%Uu %Ss %Er %Mkb" a.out d d d ${p} >> CAFMatrix 2>&1
i=`expr ${i} + 1`
done
echo "" >> CAFMatrix
done
# reset
sed -i 's/max-threads = .*/max-threads = 1/g' caf-application.conf
rm a.out
# Local Variables: #
# tab-width: 4 #
# End: #