error while running simple example
mtahrawi opened this issue · 10 comments
import sem
ns_path = '/home/ns3/Desktop/ns-allinone-3.30.1/ns-3.30.1/'
script = 'wifi-multi-tos'
campaign_dir = 'temp'
campaign = sem.CampaignManager.new(ns_path, script, campaign_dir, overwrite=True)
print(campaign)
Building ns-3: 57%|█████▋ | 1382/2441 [00:04<13:10, 1.34file/s]
Exception Traceback (most recent call last)
in
3 script = 'wifi-multi-tos'
4 campaign_dir = 'temp'
----> 5 campaign = sem.CampaignManager.new(ns_path, script, campaign_dir, overwrite=True)
6 print(campaign)
~/.local/lib/python3.6/site-packages/sem/manager.py in new(cls, ns_path, script, campaign_dir, runner_type, overwrite, optimized, check_repo)
116 runner = CampaignManager.create_runner(ns_path, script,
117 runner_type=runner_type,
--> 118 optimized=optimized)
119
120 # Get list of parameters to save in the DB
~/.local/lib/python3.6/site-packages/sem/manager.py in create_runner(ns_path, script, runner_type, optimized)
209 return locals().get(runner_type,
210 globals().get(runner_type))(
--> 211 ns_path, script, optimized=optimized)
212
213 ######################
~/.local/lib/python3.6/site-packages/sem/runner.py in init(self, path, script, optimized)
54
55 # Configure and build ns-3
---> 56 self.configure_and_build(path, optimized=optimized)
57
58 # ns-3's build status output is used to get the executable path for the
~/.local/lib/python3.6/site-packages/sem/runner.py in configure_and_build(self, show_progress, optimized, skip_configuration)
146 pbar = tqdm(line_iterator, initial=initial, total=total,
147 unit='file', desc='Building ns-3', smoothing=0)
--> 148 for current, total in pbar:
149 pbar.n = current
150 except (StopIteration):
~/.local/lib/python3.6/site-packages/tqdm/std.py in iter(self)
1174
1175 try:
-> 1176 for obj in iterable:
1177 yield obj
1178 # Update and possibly print the progressbar.
~/.local/lib/python3.6/site-packages/sem/runner.py in get_build_output(self, process)
170 ".\nSTDERR\n%s\nSTDOUT\n%s" %
171 (process.stderr.read(),
--> 172 process.stdout.read()))
173 return
174 if output:
Exception: Compilation ended with an error.
STDERR
b"../../src/csma/model/csma-net-device.cc: In member function 'void ns3::CsmaNetDevice::Receive(ns3::Ptrns3::Packet, ns3::Ptrns3::CsmaNetDevice)':\n../../src/csma/model/csma-net-device.cc:801:8: error: 'm_openFlowRxCallback' was not declared in this scope\n if (!m_openFlowRxCallback.IsNull ())\n ^~~~~~~~~~~~~~~~~~~~\n../../src/csma/model/csma-net-device.cc:801:8: note: suggested alternative: 'm_promiscRxCallback'\n if (!m_openFlowRxCallback.IsNull ())\n ^~~~~~~~~~~~~~~~~~~~\n m_promiscRxCallback\n../../src/csma/model/csma-net-device.cc:825:8: error: 'm_openFlowRxCallback' was not declared in this scope\n if (!m_openFlowRxCallback.IsNull ())\n ^~~~~~~~~~~~~~~~~~~~\n../../src/csma/model/csma-net-device.cc:825:8: note: suggested alternative: 'm_promiscRxCallback'\n if (!m_openFlowRxCallback.IsNull ())\n ^~~~~~~~~~~~~~~~~~~~\n m_promiscRxCallback\n../../src/csma/model/csma-net-device.cc: At global scope:\n../../src/csma/model/csma-net-device.cc:1071:80: error: no 'void ns3::CsmaNetDevice::SetOpenFlowReceiveCallback(ns3::NetDevice::PromiscReceiveCallback)' member function declared in class 'ns3::CsmaNetDevice'\n CsmaNetDevice::SetOpenFlowReceiveCallback (NetDevice::PromiscReceiveCallback cb)\n ^\n../../src/csma/model/csma-net-device.cc:1078:80: error: no 'void ns3::CsmaNetDevice::SetOpenFlowReceiveCallback(ns3::NetDevice::PromiscReceiveCallback)' member function declared in class 'ns3::CsmaNetDevice'\n CsmaNetDevice::SetOpenFlowReceiveCallback (NetDevice::PromiscReceiveCallback cb)\n ^\n\nBuild failed\n -> task in 'ns3-csma' failed with exit status 1 (run with -v to display more information)\n"
STDOUT
b''
This looks like an error in ns-3 - do you get any errors when you call ./waf
from your ns-3 installation?
Ok! Just to make sure: if you get the error in SEM, and then immediately go to the ns-3 installation and run python3 waf
, it gives no error, right? I'm asking because it might be the case that SEM applies some configurations that you wouldn't normally - this ensures that we are running ns-3 in the exact same way.
If this is still the case, I would like to reproduce this error: can you send a series of commands / code that would allow me to replicate this on my machine?
As for the WNS3 presentation: I don't have the video yet, but it should be published shortly here! You can access the notebook we created during the tutorial by going here: https://magr.in/wns3binder
Attached also series of print screen error for your reference.
It looks like when sending attachments via email they are not included on the github issue - can you post them here from your browser?
It looks like your specific error in the attached screenshots has to do with code that is not included in ns-3.31, so it's impossible for me to replicate the issue...
Also, I realized I didn't ask: how did you install SEM? If you haven't done so, a potential solution could be to install the develop
branch with the following command:
pip3 install --user https://github.com/signetlabdei/sem/archive/develop.zip
Closing for now - let me know if this issue is still bothering you!