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
0ffe3dc1
"...composable_kernel.git" did not exist on "4fe9c393b81914a8f66517b3eab5fbe926d837ab"
Commit
0ffe3dc1
authored
Nov 22, 2020
by
Jialin Li
Browse files
experiments: add nopaxos gem5 simulations
parent
6ad98ddb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
33 deletions
+44
-33
experiments/pyexps/nopaxos.py
experiments/pyexps/nopaxos.py
+44
-0
experiments/pyexps/qemu_nopaxos.py
experiments/pyexps/qemu_nopaxos.py
+0
-33
No files found.
experiments/pyexps/nopaxos.py
0 → 100644
View file @
0ffe3dc1
import
modes.experiments
as
exp
import
modes.simulators
as
sim
import
modes.nodeconfig
as
node
host_configs
=
[
'bm'
,
'emu'
]
seq_configs
=
[
'swseq'
,
'ehseq'
]
experiments
=
[]
for
host_config
in
host_configs
:
for
seq_config
in
seq_configs
:
e
=
exp
.
Experiment
(
'nopaxos-'
+
host_config
+
'-'
+
seq_config
)
net
=
sim
.
NS3SequencerNet
()
e
.
add_network
(
net
)
if
host_config
==
'bm'
:
host_class
=
sim
.
QemuHost
nic_class
=
sim
.
CorundumBMNIC
nc_class
=
node
.
CorundumLinuxNode
elif
host_config
==
'emu'
:
host_class
=
sim
.
Gem5Host
nic_class
=
sim
.
CorundumVerilatorNIC
nc_class
=
node
.
CorundumLinuxNode
else
:
raise
NameError
(
host_config
)
nc_class
.
disk_image
=
'nopaxos'
if
seq_config
==
'ehseq'
:
sequencer
=
sim
.
create_basic_hosts
(
e
,
1
,
'sequencer'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NOPaxosSequencer
,
ip_start
=
100
)
sequencer
[
0
].
sleep
=
1
replicas
=
sim
.
create_basic_hosts
(
e
,
3
,
'replica'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NOPaxosReplica
)
for
i
in
range
(
len
(
replicas
)):
replicas
[
i
].
node_config
.
app
.
index
=
i
replicas
[
i
].
sleep
=
1
clients
=
sim
.
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
nic_class
,
host_class
,
nc_class
,
node
.
NOPaxosClient
,
ip_start
=
4
)
for
c
in
clients
:
c
.
node_config
.
app
.
server_ips
=
[
'10.0.0.1'
,
'10.0.0.2'
,
'10.0.0.3'
]
c
.
wait
=
True
experiments
.
append
(
e
)
experiments/pyexps/qemu_nopaxos.py
deleted
100644 → 0
View file @
6ad98ddb
import
modes.experiments
as
exp
import
modes.simulators
as
sim
import
modes.nodeconfig
as
node
class
NOPaxosNodeConfig
(
node
.
CorundumLinuxNode
):
disk_image
=
'nopaxos'
config
=
[
'swseq'
,
'ehseq'
]
experiments
=
[]
for
c
in
config
:
e
=
exp
.
Experiment
(
'qemu-nopaxos-'
+
c
)
net
=
sim
.
NS3SequencerNet
()
e
.
add_network
(
net
)
if
c
==
'ehseq'
:
sequencer
=
sim
.
create_basic_hosts
(
e
,
1
,
'sequencer'
,
net
,
sim
.
CorundumBMNIC
,
sim
.
QemuHost
,
NOPaxosNodeConfig
,
node
.
NOPaxosSequencer
,
ip_start
=
100
)
sequencer
[
0
].
sleep
=
1
replicas
=
sim
.
create_basic_hosts
(
e
,
3
,
'replica'
,
net
,
sim
.
CorundumBMNIC
,
sim
.
QemuHost
,
NOPaxosNodeConfig
,
node
.
NOPaxosReplica
)
for
i
in
range
(
len
(
replicas
)):
replicas
[
i
].
node_config
.
app
.
index
=
i
replicas
[
i
].
sleep
=
1
clients
=
sim
.
create_basic_hosts
(
e
,
1
,
'client'
,
net
,
sim
.
CorundumBMNIC
,
sim
.
QemuHost
,
NOPaxosNodeConfig
,
node
.
NOPaxosClient
,
ip_start
=
4
)
for
c
in
clients
:
c
.
node_config
.
app
.
server_ips
=
[
'10.0.0.1'
,
'10.0.0.2'
,
'10.0.0.3'
]
c
.
wait
=
True
experiments
.
append
(
e
)
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