Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
e4e1c76f
"git@developer.sourcefind.cn:modelzoo/resnet50_tensorflow.git" did not exist on "2d51c3f1a1d628ccc0ff23a1a65a3b2c410daee7"
Commit
e4e1c76f
authored
Sep 15, 2021
by
Hejing Li
Committed by
Antoine Kaufmann
Jan 17, 2022
Browse files
add switch hierarchy
parent
3422e5ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
8 deletions
+72
-8
experiments/pyexps/pktgen.sh
experiments/pyexps/pktgen.sh
+64
-2
experiments/pyexps/run_pktgen.sh
experiments/pyexps/run_pktgen.sh
+8
-6
No files found.
experiments/pyexps/pktgen.sh
View file @
e4e1c76f
...
@@ -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
...
...
experiments/pyexps/run_pktgen.sh
View file @
e4e1c76f
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment