Commit bbd232d7 authored by Hejing Li's avatar Hejing Li
Browse files

nopaxos.py: add multi client parameter

parent 5a3b22e0
......@@ -5,15 +5,17 @@ import modes.nodeconfig as node
host_configs = ['qemu', 'gt']
seq_configs = ['swseq', 'ehseq']
nic_configs = ['ib', 'cb', 'cv']
num_client_configs = [1, 2, 3, 4]
experiments = []
link_rate_opt = '--LinkRate=100Gb/s ' # don't forget space at the end
link_latency_opt = '--LinkLatency=500ns '
for host_config in host_configs:
for num_c in num_client_configs:
for host_config in host_configs:
for seq_config in seq_configs:
for nic_config in nic_configs:
e = exp.Experiment('nopaxos-' + host_config + '-' + nic_config + '-' + seq_config)
e = exp.Experiment('nopaxos-' + host_config + '-' + nic_config + '-' + seq_config + f'-{num_c}')
net = sim.NS3SequencerNet()
net.opt = link_rate_opt + link_latency_opt
e.add_network(net)
......@@ -28,8 +30,11 @@ for host_config in host_configs:
elif nic_config == 'cb':
nic_class = sim.CorundumBMNIC
nc_class = node.CorundumLinuxNode
elif nic_config == 'cv':
nic_class = sim.CorundumVerilatorNIC
nc_class = node.CorundumLinuxNode
else:
continue
raise NameError(nic_config)
elif host_config == 'gt':
host_class = sim.Gem5Host
......@@ -63,10 +68,17 @@ for host_config in host_configs:
replicas[i].node_config.app.index = i
replicas[i].sleep = 1
clients = sim.create_basic_hosts(e, 1, 'client', net, nic_class,
clients = sim.create_basic_hosts(e, num_c, '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
clients[num_c - 1].wait = True
clients[num_c - 1].node_config.app = node.NOPaxosClientLast()
print(e.name)
#print (len(experiments))
experiments.append(e)
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