"git@developer.sourcefind.cn:modelzoo/resnet50_tensorflow.git" did not exist on "2d51c3f1a1d628ccc0ff23a1a65a3b2c410daee7"
Commit e4e1c76f authored by Hejing Li's avatar Hejing Li Committed by Antoine Kaufmann
Browse files

add switch hierarchy

parent 3422e5ec
...@@ -144,6 +144,67 @@ run_switch_chain(){ ...@@ -144,6 +144,67 @@ run_switch_chain(){
return return
} }
# - number of hosts
# - number of layers should >= 2
run_switch_hierarchy(){
echo "Starting switch hierarchy"
SWITCH_EXE=/DS/endhost-networking/work/sim/hejing/simbricks/sims/net/switch/net_switch
layer=1
#leave switch
iface=0
while [ $iface -lt $1 ]
do
$SWITCH_EXE -m 0 -S 500 -E 500 \
-h $RUN_DIR/s${layer}.$iface -s $RUN_DIR/eth.${iface}> $RUN_DIR/s${layer}.${iface}.log &
pid=$!
ALL_PIDS="$ALL_PIDS $pid"
SWITCH_PIDS="$SWITCH_PIDS $pid"
((iface++))
done
((layer++))
sleep 2
#node switch
while [ $layer -lt $2 ]
do
iface=0
layer_dec=$(($layer-1))
while [ $iface -lt $1 ]
do
$SWITCH_EXE -m 0 -S 500 -E 500 \
-s $RUN_DIR/s${layer_dec}.$iface -h $RUN_DIR/s${layer}.$iface > $RUN_DIR/s${layer}.${iface}.log &
pid=$!
ALL_PIDS="$ALL_PIDS $pid"
SWITCH_PIDS="$SWITCH_PIDS $pid"
((iface++))
done
((layer++))
sleep 2
done
#root switch
args=""
iface=0
layer_dec=$(($layer-1))
while [ $iface -lt $1 ]
do
args="$args -s $RUN_DIR/s${layer_dec}.$iface"
((iface++))
done
$SWITCH_EXE -m 0 -S 500 -E 500 \
$args > $RUN_DIR/root_switch.log &
pid=$!
ALL_PIDS="$ALL_PIDS $pid"
SWITCH_PIDS="$SWITCH_PIDS $pid"
}
cleanup() { cleanup() {
echo "Cleaning up" echo "Cleaning up"
...@@ -175,9 +236,10 @@ done ...@@ -175,9 +236,10 @@ done
sleep 2 sleep 2
#run_switch $1 #run_switch $1
#run_switch_dumbbell $1
run_switch_chain $1 $2
#SWITCH_PID=$! #SWITCH_PID=$!
#run_switch_dumbbell $1
#run_switch_chain $1 $2
run_switch_hierarchy $1 $2
for p in $PKTGEN_PIDS ; do for p in $PKTGEN_PIDS ; do
wait $p wait $p
......
...@@ -6,11 +6,13 @@ RUN=5 ...@@ -6,11 +6,13 @@ RUN=5
itr=0 itr=0
while [ $itr -lt $RUN ] while [ $itr -lt $RUN ]
do do
nswitch=2 #nswitch=2
while [ $nswitch -lt 6 ] #while [ $nswitch -lt 6 ]
do #do
bash -x pyexps/pktgen.sh 2 $nswitch &> out/pktgen/chain/s${nswitch}-h2-${itr}.out #bash -x pyexps/pktgen.sh 2 $nswitch &> out/pktgen/chain/s${nswitch}-h2-${itr}.out
((nswitch++)) # ((nswitch++))
done #done
#bash -x pyexps/pktgen.sh 10 &> out/pktgen/star/s1-h10-${itr}.out
bash -x pyexps/pktgen.sh 10 3 &> out/pktgen/star/s3-h10-${itr}.out
((itr++)) ((itr++))
done done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment