-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstats_run.sh
executable file
·59 lines (52 loc) · 1.44 KB
/
stats_run.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
#!/bin/bash
read_b4_match () {
match="ORTE was unable to reliably start one or more daemons"
while true; do
read line
if test -z "$line"; then break ; fi
if test -z "$(echo "$line" | grep "$match")" ; then
echo $line
else
echo "MPI hangs - restart"
vagrant halt --force
break
fi
done
}
rm all_exec_times
TOPO="fattree"
packets_loss=(0 5 10 15 20 25 30)
runs=(1 2 3 4 5)
if test ! -z "$1" && test "$1" = "single" ; then
packets_loss=(0)
runs=(1)
if test ! -z "$2" && (test "$2" = "fattree" || test "$2" = "dragonfly") ; then
TOPO="$2"
fi
elif test ! -z "$1" && (test "$1" = "fattree" || test "$1" = "dragonfly") ; then
TOPO="$1"
else
echo "Unknown option"
exit 1
fi
for PACKET_LOSS in ${packets_loss[@]}; do
echo "$PACKET_LOSS :" >> all_exec_times
for i in ${runs[@]} ; do
rm exec_time
if test "$CLUSTER" = "yes" ; then
export PACKET_LOSS=$PACKET_LOSS
sudo ./run.sh $TOPO
else
if test "$OVERRIDE_CONTAINERNET_VAGRANTFILE" = "yes"; then yes | cp ./Vagrantfile ./../; fi
pushd ..
vagrant halt --force ; vagrant up
vagrant ssh -c "export PACKET_LOSS=$PACKET_LOSS ; cd /home/ubuntu/containernet/mininet-mpi ; sudo -E ./run.sh $TOPO" | read_b4_match
popd
fi
cat exec_time >> all_exec_times
if test ! -f exec_time ; then echo inf >> all_exec_times ; fi
cat all_exec_times
done
done
rm exec_time
cat all_exec_times | python3 draw_graph.py