[Error] - 3GPP NR ns-3 module

72 views
Skip to first unread message

Breno Melo

unread,
Sep 19, 2022, 11:11:39 AM9/19/22
to 5G-LENA-users
Hello,

I am following the tutorial provided by https://gitlab.com/cttc-lena/nr/-/blob/nr-v2x-dev/README.md to configure the  3GPP NR ns-3 module, but I got this error message.

Please, if anyone can help me with this, I would greatly appreciate it!

ns3_error.jpg

Biljana Bojovic

unread,
Sep 19, 2022, 12:14:51 PM9/19/22
to Breno Melo, 5G-LENA-users
Hi Breno,

on which ns-3 and nr release branches are you currently? 

Kind regards,
Biljana

--
You received this message because you are subscribed to the Google Groups "5G-LENA-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 5g-lena-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/5g-lena-users/89e2061c-06ac-44d4-a3a5-6b59e1433571n%40googlegroups.com.

Breno Melo

unread,
Sep 19, 2022, 1:21:19 PM9/19/22
to 5G-LENA-users
Hello  Biljana,

Thanks for your reply.

I'm using ns3-dev (3.36) and 5g-lena-v1.1.y.

As I said, I followed the steps of the tutorial.

Biljana Bojovic

unread,
Sep 19, 2022, 5:19:29 PM9/19/22
to Breno Melo, 5G-LENA-users
If I remember correctly 5g-lena-v1.1.y is compatible with ns-3.35, and not ns-3.36. You can check in nr RELEASE_NOTES what is the supported ns-3 release. In some older versions of nr we were not specifying which ns-3 to use, and that was for ns-3 releases before ns-3.36. So, for nr 1.1 should be ns-3.35.

Breno Melo

unread,
Sep 20, 2022, 5:14:21 AM9/20/22
to 5G-LENA-users
Thank you for your help! But in the tutorial, they are using ns-3.36. Again, as I said, I just followed the tutorial steps.

Biljana Bojovic

unread,
Sep 20, 2022, 5:49:22 AM9/20/22
to 5G-LENA-users
Hi Breno,

can you please tell me which instructions did you follow so I can fix them?

Thanks,
Biljana

Breno Melo

unread,
Sep 20, 2022, 9:26:41 AM9/20/22
to 5G-LENA-users
Hello,

Thank you so much for your help!

What did I do: 

      $ cd ns-3-dev

2 -  $ git checkout ns-3.36

3 -  $ git remote add nsnam https://gitlab.com/nsnam/ns-3-dev.git 
      $ git checkout master 
      $ git pull nsnam master

4 - $ ./ns3 configure --enable-examples --enable-tests 
     $ ./ns3 build

5 -  $ cd contrib 

6 -  $ ./ns3 configure --enable-examples --enable-tests
      $ ./ns3 (at this step, the errors reported occur)

Furthermore, I would like to enable the NR V2X code (5g-lena-v2x-v0.1.y), however, it uses ./waf .

I tried using ns-3.35 but got a different error after I ran $ ./waf build (I could not see what NS-3 version they are using on the tutorial https://gitlab.com/cttc-lena/nr/-/blob/5g-lena-v2x-v0.1.y/README.md)

-- They run $ git clone https://gitlab.com/nsnam/ns-3-dev.git, however, this link redirects to the latest version of NS-3.

ns3_error2.jpg

Biljana Bojovic

unread,
Sep 20, 2022, 12:17:11 PM9/20/22
to Breno Melo, 5G-LENA-users
Hi Breno,

Thanks for the details, that helped me understand where was the problem in the instructions. I will now first give a summary for the NR module and then for the NR V2X, separately.

In the following instructions, I will provide instructions according to which you will have 2 separate ns-3 project folders, one for ns3 + NR installation, and another for ns-3 + NR-V2X installation. I believe that it is much easier to start in this way, you can choose which of these installations want, or you can install both as in the following.

1. NR Installation. To install the NR module without V2X please follow the instructions: https://gitlab.com/cttc-lena/nr/-/blob/master/README.md

cd ns-3-dev 
When previous successful continue with:
cd contrib 
Checkout compatible NR and ns-3 releases:
cd nr
git checkout 5g-lena-v2.2.y
cd ../..
You can see in the NR RELEASE_NOTES what is the recommended ns-3 release, so you check out that release:
git checkout ns-3.36.1
Then you configure it again:
./ns3 configure --enable-examples --enable-tests
And try to build:
./ns3

2. NR V2X installation version v2x-v0.1. To install the NR V2X branch you should follow the link that Breno shared in the first email: https://gitlab.com/cttc-lena/nr/-/blob/nr-v2x-dev/README.md. However, these instructions are maybe too complex for someone who is starting with git, so I will here make a very brief summary of it:

Notice in the following line, we do not download official ns-3-dev, this is ns-3-dev adapted for NR V2X:
git clone https://gitlab.com/cttc-lena/ns-3-dev.git ns-3-dev-v2x
cd ns-3-dev-v2x
Specific feature development is never on master, we move now to the ns-3 V2X branch:
git checkout v2x-lte-dev
We are now on the correct ns-3 branch, but to make your life more complicated :-), this branch is at the same time a release and the development branch. So, in that case, you need to return to a specific ns-3 V2X release commit, which has been tested for the specific NR V2X release. These commit releases are normally tagged with git tags. If you want to see the list of available ns-3 v2x release tags run:
git tag -l "*v2x*"
You will see that for the moment, as of today 20/09/2022, the only available tag is: ns-3-dev-v2x-v0.1, to check it out run:
git checkout ns-3-dev-v2x-v0.1
Git will now warn you that you are in a 'detached HEAD' state. Don't worry that is OK. 
We continue. Now you navigate to your contrib folder.
cd contrib
cd nr
Now you need to move to your NR V2X branch, and I promise you are almost done ( :-) hahaha): 
git checkout 5g-lena-v2x-v0.1.y
cd ../..
./waf configure --disable-python --enable-tests --enable-examples
./waf build
I refer here to all 5G-LENA users who will read this thread. All this instructions is for all of you. If you notice that any of these two previous sequences for installation is not correct, please let us know by replying to this email. If finally these instructions are ok for everyone, I will try to propose to update soon V2X installation instructions to be a bit more simple and to include the explanation about checking out the correct release tag of the ns-3 V2X repo. 
I also think that ns-3-dev and NR V2X are upgraded to use the latest ns-3-dev release (ns-3.36.1), I will check with other V2X maintainers whether a new upgraded NR V2X version can be released soon. 
Kind regards,
Biljana 

Breno Melo

unread,
Sep 21, 2022, 7:40:57 AM9/21/22
to 5G-LENA-users
Dear  Biljana,

I would really like to thank you for all the help you have given me!

Now the 5g-lena-v2x-v0.1.y module is configured! However, I have one more problem to report:

When I run ./waf --run "cttc-nr-v2x-demo-simple", it worked great! However, when I copy it and the associated header files to the scratch folder, some errors arise. At first, I thought it was some parameter/path in the headers files, but this doesn't seem to be the problem.

ns3_error3.jpg

Biljana B.

unread,
Sep 21, 2022, 10:18:16 AM9/21/22
to 5G-LENA-users
Hi Breno,

ok that issue should go into another thread, and is a more general ns-3 question, not nr, because what you are trying to do is create a complex example composed of multiple h/cc files inside of the sub-dir of the scratch folder. 

So, a quick way to do this is: 

1) start from the clean ns-3 + NR V2X installation, undo any of your changes to ns-3 and the nr folder
2) copy the whole nr-v2x-examples example 2 times into the scratch folder, once you can call in nr-v2x-examples-1 and the second time call it nr-v2x-examples-2
3) from nr-v2x-examples-1 delete nr-v2x-west-to-east-highway.cc
4) from nr-v2x-examples-2 delete cttc-nr-v2x-demo-simple.cc

Then to run your examples use:

1) to run original NR-V2X cttc-nr-v2x-demo-simple.cc example from the nr/examples folder: ./waf --run "cttc-nr-v2x-demo-simple" 
2) to run original NR-V2X nr-v2x-west-to-east-highway.cc example from nr/examples folder: ./waf --run "nr-v2x-west-to-east-highway"
3) to run cttc-nr-v2x-demo-simple.cc from scratch/nr-v2x-examples-1 run: ./waf --run "nr-v2x-examples-1"
4) to run nr-v2x-west-to-east-highway.cc from scratch/nr-v2x-examples-2 run: ./waf --run "nr-v2x-examples-2"

Notice that we split the original examples into 2 folders because the rule is that there can be at most one main function per scratch subfolder.

Kind regards,
Biljana

Breno Melo

unread,
Sep 22, 2022, 4:33:27 AM9/22/22
to 5G-LENA-users
Hello,

Once again, thank you very much! It worked!

Reply all
Reply to author
Forward
0 new messages