This repository has been archived by the owner on Jun 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
SwarmKBJBatchDist.sh
89 lines (83 loc) · 2.6 KB
/
SwarmKBJBatchDist.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
export PYTHONPATH=$(pwd)
thread_number=12
count=`expr $thread_number - 1`
for trial in 0
do
for comm in 2
do
for i in `seq 0 $count`
do
python3 KiloBotsJoinSwarm/MA3C-Distributed.py --comm_size="$comm" --slaves_per_url="$thread_number" --urls=localhost --task_index="$i" &
echo python3 KiloBotsJoinSwarm/MA3C-Distributed.py --task_max="$thread_number" --task_index="$i"
sleep 5
done
wait
sleep 5
mkdir KiloBotsJoinSwarm-"$comm"Comm-Trial"$trial"
mv dist_model train_* KiloBotsJoinSwarm-"$comm"Comm-Trial"$trial"/
done
done
for trial in 1
do
for comm in 2
do
for i in `seq 0 $count`
do
python3 KiloBotsJoinSwarm/MA3C-Distributed.py --swarm_type=ordered --comm_size="$comm" --slaves_per_url="$thread_number" --urls=localhost --task_index="$i" &
echo python3 KiloBotsJoinSwarm/MA3C-Distributed.py --task_max="$thread_number" --task_index="$i"
sleep 5
done
wait
sleep 5
mkdir KiloBotsJoinSwarm-"$comm"Comm-Trial"$trial"ordered
mv dist_model train_* KiloBotsJoinSwarm-"$comm"Comm-Trial"$trial"ordered/
done
done
for trial in 2
do
for comm in 2
do
for i in `seq 0 $count`
do
python3 KiloBotsJoinSwarm/MA3C-Distributed.py --swarm_type=max --comm_size="$comm" --slaves_per_url="$thread_number" --urls=localhost --task_index="$i" &
echo python3 KiloBotsJoinSwarm/MA3C-Distributed.py --task_max="$thread_number" --task_index="$i"
sleep 5
done
wait
sleep 5
mkdir KiloBotsJoinSwarm-"$comm"Comm-Trial"$trial"max
mv dist_model train_* KiloBotsJoinSwarm-"$comm"Comm-Trial"$trial"max/
done
done
for trial in 3
do
for comm in 2
do
for i in `seq 0 $count`
do
python3 KiloBotsJoinSwarm/MA3C-Distributed.py --swarm_type=mean --comm_size="$comm" --slaves_per_url="$thread_number" --urls=localhost --task_index="$i" &
echo python3 KiloBotsJoinSwarm/MA3C-Distributed.py --task_max="$thread_number" --task_index="$i"
sleep 5
done
wait
sleep 5
mkdir KiloBotsJoinSwarm-"$comm"Comm-Trial"$trial"mean
mv dist_model train_* KiloBotsJoinSwarm-"$comm"Comm-Trial"$trial"mean/
done
done
for trial in 4
do
for comm in 2
do
for i in `seq 0 $count`
do
python3 KiloBotsJoinSwarm/MA3C-Distributed.py --swarm_type=softmax --comm_size="$comm" --slaves_per_url="$thread_number" --urls=localhost --task_index="$i" &
echo python3 KiloBotsJoinSwarm/MA3C-Distributed.py --task_max="$thread_number" --task_index="$i"
sleep 5
done
wait
sleep 5
mkdir KiloBotsJoinSwarm-"$comm"Comm-Trial"$trial"softmax
mv dist_model train_* KiloBotsJoinSwarm-"$comm"Comm-Trial"$trial"softmax/
done
done