Assert Failed LTE simulation error

868 views
Skip to first unread message

Bektaş Şahin

unread,
Mar 2, 2014, 4:27:27 PM3/2/14
to ns-3-...@googlegroups.com
Hey all, I am trying to run a simulation with ns3 that includes LTE and on/off application. Now when I run, it compiles normally however I get an error like this after it finishes building;

assert failed. cond="uid != 0", msg="Assert in TypeId::LookupByName: Constant:1 not found", file=../src/core/model/type-id.cc, line=539
terminate called without an active exception

I also attached my code file as it might be helpful to see what I did wrong. Thanks
lena_trial.cc

Konstantinos

unread,
Mar 3, 2014, 5:27:28 AM3/3/14
to ns-3-...@googlegroups.com
Hi,

Just read the error you are getting: "Constant:1 not found".

Where have you used this in your code? 
        onoff.SetAttribute("OnTime", StringValue("Constant:1"));
        onoff.SetAttribute("OffTime", StringValue("Constant:0"));

So, it looks like this is not the correct way of setting the attribute On/OffTime.
How can you find out how? (a) look at the documentation, (b) ask the mailing list for that problem, not to debug your code!
http://www.nsnam.org/doxygen/classns3_1_1_on_off_application.html



Message has been deleted

Bektaş Şahin

unread,
Mar 3, 2014, 5:41:16 PM3/3/14
to ns-3-...@googlegroups.com
Hey there again Konstantinos;

I fixed the issue regarding OnOff application thanks to your post. Now it compiles and runs fine however the FlowMonitor results are weird, like I get same results for every node I have and it is incorrect(i.e duration is -2). I thought maybe it was because OnOff and switched to Udp and the same incorrect results persisted. What I am trying to achieve is some performance parameters in a scenario of one ENodeB and 10-15 nodes placed around it. An example of the result is below; I also attached my code with UDP application.


Flow ID            : 2 ; 10.1.1.3 -----> 10.1.1.1
Duration        : -2
Last Received Packet    : 0 Seconds
Throughput: -0 Mbps

Would appreciate if you can help me clear this.

Bektaş
lena_trial.cc

Konstantinos

unread,
Mar 3, 2014, 6:37:37 PM3/3/14
to ns-3-...@googlegroups.com
There is no problem with your code. The only problem is the way you interpret the output.

You calculate the duration as (Time_Last_Rx - Time_First_Tx) 
The first call of the method (ThroughputMonitor) is at t=3sec, and the client has started at t=2sec. 
So, the Time_First_Tx = 2.
From the output you get that Rx packets = 0, so Time_Last_Rx = 0 since you haven't received any packet.

Finally, duration = 0 - 2 = -2
So the output is correct!

There are logical problems though. I see that you have installed the server on the eNBs. I do not think that this is correct. You can have uplink/downlink from a remote host.
I would recommend to read the documentation for LTE module one more time to understand the architecture.  

Bektaş Şahin

unread,
Mar 3, 2014, 7:58:04 PM3/3/14
to ns-3-...@googlegroups.com
Thanks again, so if I used OnOff application instead of Udp, in which I dont need to install server on enb at all, will it be any different granted that I changed the time parameters? I will try it with a remote host uplink/downlink than I will need an application (like OnOff) to analyze throughput etc right? Anyway I will reread the documentation. Thanks for your time.

Bektaş


--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/sThL8dYVihs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/groups/opt_out.

Bektaş Şahin

unread,
Mar 5, 2014, 4:23:45 PM3/5/14
to ns-3-...@googlegroups.com
Hey Konstantinos

I modified the code to include a remotehost that I can install the UDP server on and also I removed flowmonitor on enB which was not supposed to be there I presume. Anyway now I am trying to build it with the code;

./waf --command-template="%s --ns3::ConfigStore::Filename=input-defaults.txt --ns3::ConfigStore::Mode=Load --ns3::ConfigStore::FileFormat=RawText" --run scratch/lena_trial

however waf compiles lena-simple-epc in the lte example folder which I compiled earlier. Thus giving me an error all the time and I have no clue how this can happen. I attached a screenshot and a newer version of the code, is that some kind of a bug that I need to restart something? Because I already tried reconfiguring waf and enabling examples tests etc..


Ekran görüntüsü 2014-03-05 22:18:23.png
lena_trial.cc

Konstantinos

unread,
Mar 5, 2014, 6:31:49 PM3/5/14
to ns-3-...@googlegroups.com
You have to correct all compile errors from the files that are build in order to run a scenario.
These files include ALL files in scratch and the modules that you have configured (examples/tests etc).

So if you modified something in the lena-simple-epc code and it is not compiling (from the errors it looks like you haven't included the FlowMonitor module header), then you can not run another program. 

Haftu Hagos

unread,
May 4, 2014, 9:49:28 AM5/4/14
to ns-3-...@googlegroups.com

hey Bektas Sahn;

can you please share me on how to solve the on/off application problem?
here is the error message.

"assert failed. cond="uid != 0", msg="Assert in TypeId::LookupByName: Constant:1 not found", file=../src/core/model/type-id.cc, line=539
terminate called without an active exception"

thanks !!!

Bektaş Şahin

unread,
May 4, 2014, 10:23:38 AM5/4/14
to ns-3-...@googlegroups.com
Hey Haftu

I cant know without looking at your code but I believe it is a similar one to the problem I had. I think you are defining the OnTime and OffTime wrongly. Try these instead and see if it works for you;

      onoff.SetAttribute ("OnTime", StringValue("ns3::ConstantRandomVariable[Constant=2]"));
      onoff.SetAttribute ("OffTime", StringValue("ns3::ConstantRandomVariable[Constant=0]"));

Cheers
Bektaş

Haftu Hagos

unread,
May 5, 2014, 4:47:51 AM5/5/14
to ns-3-...@googlegroups.com
Hey Bektas Sahin;

Thanks a lot for your quick reply and your genius answer. Your answer
fixes my problem.

thanks again.

shall I ask you more if you have good understands on LTE networks? I
am trying to work on it but i haven't even the basic understandings of
it.

cheers!!!
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "ns-3-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ns-3-users/sThL8dYVihs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> ns-3-users+...@googlegroups.com.
> To post to this group, send email to ns-3-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ns-3-users.
> For more options, visit https://groups.google.com/d/optout.
>

Bektaş Şahin

unread,
May 5, 2014, 4:57:09 AM5/5/14
to ns-3-...@googlegroups.com
Hey Haftu

Sure you can ask me, but I am merely a new user. You would be better off if you asked the whole group, than again I will try to help as well. 

Regards
Bektas


Reply all
Reply to author
Forward
0 new messages