Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running ns3-ai when using cmake to build ns3 #77

Open
Flunzmas opened this issue Sep 28, 2022 · 3 comments
Open

Running ns3-ai when using cmake to build ns3 #77

Flunzmas opened this issue Sep 28, 2022 · 3 comments

Comments

@Flunzmas
Copy link

Flunzmas commented Sep 28, 2022

I am using ns3.36.1 (mind: I'm new to ns3 and ns3-ai), and had to tweak this repo's code in a few ways before I could get the a_plus_b example to work:

  1. From ns3.36, the build system shifted from waf to cmake (see here, the ns3 command replaces the waf command), meaning that contrib modules have to be shipped with CMakeLists.txt files. I noticed that the cmake branch took care of just that, although with the new ns3 run command introduced in their commits so far I could not solve the issue introduced below in point 3.
  2. Additionally, it seems as if the string check for successful builds in build_ns3 (link) is invalid since that line is not printed (anymore?). Is it a good idea to simply do ok = proc.returncode == 0?
  3. Running the a_plus_b example as indicated in the README failed with the output /bin/sh: ./a_plus_b: No such file or directory. Changing line 59 of a_plus_b/run.py to exp = Experiment(mempool_key, mem_size, 'a_plus_b/ns3.36.1-sim-debug', '../../') (i.e. appending the /ns3.36.1-sim-debug to the path makes it work (EDIT: also applies to the rl-tcp example). Is this a bug or a result of changes in the ns3 code?
@Mauriyin
Copy link
Member

Mauriyin commented Oct 3, 2022

Hi, Flunzmas,

Thanks for pointing out point 2. For 3, where did you run the a_plus_b example? If you copy the scripts to the scratch/, please remove the CMakeLists.txt and try it again. The making system is a little bit different, so we are trying to continue to work on fixing those issues and provide the documents.

@Flunzmas Flunzmas changed the title Running ns3-ai on ns3.36 Running ns3-ai when using cmake to build ns3 Dec 10, 2022
@Flunzmas
Copy link
Author

Flunzmas commented Dec 10, 2022

I am running the scripts as indicated in your readme, e.g. copying a_plus_b to the scratch folder and running run.py from scratch/a_plus_b. Removing the CMakeLists.txt and then running the examples leads to a build failure for me:
run_single_ns3(): requested to build ns3, but build failed!

EDIT: I have implemented a small hotfix for my local fork that deals with these changes executable paths, see here. That commit is probably breaking the functionality for other use cases, though, so not yet ready for a pull request.

EDIT 2: This issue is related to #66 (which is closed already)

@Mauriyin
Copy link
Member

Mauriyin commented Mar 9, 2023

We've made some new commits on the cmake branch. Please try to reinstall the python_interface as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants