Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
04-08-2013, 12:23 AM
|
#1
|
Member
Registered: Apr 2013
Posts: 197
Rep:
|
installed Mannasim Path on Ns2.34 . Now got error
Hello friends,
I have installed Ns2.34 on fedora 10. Then I run patch ns2.34-mannasim-gcc4.3.patch .
But when I tried to run mannasim-rede-plana.tcl test script. I got the following error message.
% ns mannasim-rede-plana.tcl
warning: using backward compatibility mode
error when calling class OldSim: mannasim-rede-plana.tcl
%
please suggest me how to work on Mannasim . I an working on WSN.
Thanks
|
|
|
04-08-2013, 01:41 AM
|
#2
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
Fedora : tar xvf ns-allinone-2.34.tar.gz
patch -p1 < ns2.34-mannasim-gcc4.3.patch
cd ns-allinone-2.34/
export CC=gcc34 CXX=g++34 && ./install
cd ns-2.34/ ; cp ns ns-mannasim
./ns-mannasim mannasim-rede-plana.tcl
Code:
[knudfl@localhost ns-2.34]$ ./ns-mannasim mannasim-rede-plana.tcl
num_nodes is set 12
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
Starting Simulation...
Node 06 - Temperature Data 24.639770 - Time 9.024851
Node 05 - Temperature Data 25.358195 - Time 9.117242
Node 04 - Temperature Data 25.972416 - Time 9.418831
Node 03 - Temperature Data 25.568187 - Time 9.449172
Node 08 - Temperature Data 24.570268 - Time 9.471067
Node 09 - Temperature Data 25.984111 - Time 9.506826
Node 10 - Temperature Data 25.546025 - Time 9.657766
Node 11 - Temperature Data 26.607362 - Time 9.667427
Node 02 - Temperature Data 23.825474 - Time 9.838219
Node 07 - Temperature Data 24.613930 - Time 9.958714
Common Node 6 - Disseminating data - Time 11.025 - Destination node 1
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 129.1
SORTING LISTS ...DONE!
Access point - Received a message with 1 elements
Message received from node 6 with 2.005267 delay ::: 9.024851 11.030118
Common Node 5 - Disseminating data - Time 11.117 - Destination node 1
Access point - Received a message with 1 elements
Message received from node 5 with 2.004708 delay ::: 9.117242 11.121950
Common Node 4 - Disseminating data - Time 11.419 - Destination node 1
Access point - Received a message with 1 elements
Message received from node 4 with 2.004527 delay ::: 9.418831 11.423358
Common Node 3 - Disseminating data - Time 11.449 - Destination node 1
Access point - Received a message with 1 elements
Message received from node 3 with 2.004587 delay ::: 9.449172 11.453759
Common Node 8 - Disseminating data - Time 11.471 - Destination node 1
Access point - Received a message with 1 elements
Message received from node 8 with 2.004847 delay ::: 9.471067 11.475914
Common Node 9 - Disseminating data - Time 11.507 - Destination node 1
Access point - Received a message with 1 elements
Message received from node 9 with 2.004887 delay ::: 9.506826 11.511713
Common Node 10 - Disseminating data - Time 11.658 - Destination node 1
Access point - Received a message with 1 elements
Message received from node 10 with 2.004447 delay ::: 9.657766 11.662214
Common Node 11 - Disseminating data - Time 11.667 - Destination node 1
Access point - Received a message with 1 elements
Message received from node 11 with 2.004567 delay ::: 9.667427 11.671994
Common Node 2 - Disseminating data - Time 11.838 - Destination node 1
Access point - Received a message with 1 elements
Message received from node 2 with 2.004847 delay ::: 9.838219 11.843067
Common Node 7 - Disseminating data - Time 11.959 - Destination node 1
Access point - Received a message with 1 elements
Message received from node 7 with 2.004708 delay ::: 9.958714 11.963422
Node 06 - Temperature Data 25.057664 - Time 12.024851
Node 05 - Temperature Data 23.748813 - Time 12.117242
Node 04 - Temperature Data 25.048678 - Time 12.418831
Node 03 - Temperature Data 25.109206 - Time 12.449172
Node 08 - Temperature Data 25.973313 - Time 12.471067
Node 09 - Temperature Data 25.435457 - Time 12.506826
Node 10 - Temperature Data 23.609995 - Time 12.657766
Node 11 - Temperature Data 25.495822 - Time 12.667427
Node 02 - Temperature Data 23.845454 - Time 12.838219
Node 07 - Temperature Data 23.949219 - Time 12.958714
NS EXITING...
.. If you do something different, the result will be different.
I.e. do not use "% ns file.tcl", but plain $ ns file.tcl
-
|
|
1 members found this post helpful.
|
04-08-2013, 02:28 AM
|
#3
|
Member
Registered: Apr 2013
Posts: 197
Original Poster
Rep:
|
Thank you very much Knudfi
Thanks a lot. Its working now.
Now plz tell me how to run Mannasim framework. and how to start working with Mannasim for WSN
|
|
|
04-08-2013, 03:40 AM
|
#4
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
Last edited by knudfl; 04-08-2013 at 03:50 AM.
|
|
1 members found this post helpful.
|
04-09-2013, 12:19 AM
|
#5
|
Member
Registered: Apr 2013
Posts: 197
Original Poster
Rep:
|
Thanks Kundfi.
I will read these links.
|
|
|
02-28-2014, 10:14 AM
|
#6
|
Member
Registered: Jul 2010
Posts: 45
Rep:
|
[QUOTE=knudfl;4927338]Fedora : tar xvf ns-allinone-2.34.tar.gz
patch -p1 < ns2.34-mannasim-gcc4.3.patch
cd ns-allinone-2.34/
export CC=gcc34 CXX=g++34 && ./install
cd ns-2.34/ ; cp ns ns-mannasim
./ns-mannasim mannasim-rede-plana.tcl
dear knudfl
saurabh@saurabh-Satellite-C850:~/ns-allinone-2.34$ patch -p1 < ns2.34-mannasim-gcc4.3.patch
patching file ns-2.34/apps/udp.cc
Hunk #1 FAILED at 93.
Hunk #2 FAILED at 108.
patch: **** Failed to set the timestamps of file ns-2.34/apps/udp.cc.orig : Operation not permitted
I got this error while patching up the mannasim in ns-allinone-2.34 folder
I got mannasim-patch-ns2.29.tar.gz zip file with me ......
Can you please guide what is to be done for making mannasim work for me
|
|
|
02-28-2014, 11:07 AM
|
#7
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
# 6 .
Quote:
~/ns-allinone-2.34$ patch -p1 < ns2.34-mannasim-gcc4.3.patch
|
Wrong. It's :
$ tar xvf ns-allinone-2.34.tar.gz && patch -p1 < ns2.34-mannasim-gcc4.3.patch
.. I.e. do not "cd ns-allinone-2.34/" until you have done the patch command. See #2.
Solution : Delete ns-allinone-2.34/ , and start from scratch with :
$ tar xvf ns-allinone-2.34.tar.gz && patch -p1 < ns2.34-mannasim-gcc4.3.patch
About "Hunk #Xx FAILED : Please check if the patch really did the editing.
The patch command will sometimes report an error, though everything is OK.
You can see the "failed" code text in "udp.cc.rej".
Quote:
patch: ***Failed to set the timestamps of file ns-2.34/apps/udp.cc.orig: Operation not permitted
|
Don't know. Did you do "tar xvf ns-allinone-2.34.tar.gz" as root ?
I.e. all ns2 command are to be done as unprivileged user.
About "Failed to set the timestamps" :
Things may work OK when you do the patching from the right location :
Outside of ns-allinone-2.34/ .
-
Last edited by knudfl; 02-28-2014 at 11:29 AM.
|
|
|
03-01-2014, 09:06 AM
|
#8
|
Member
Registered: Jul 2010
Posts: 45
Rep:
|
Quote:
Originally Posted by knudfl
# 6 .
Wrong. It's :
$ tar xvf ns-allinone-2.34.tar.gz && patch -p1 < ns2.34-mannasim-gcc4.3.patch
-
|
I got ns-allinone-2.34.tar.gz and mannasim-patch-ns2.29.tar.gz with me.. First question is whether to keep these two files n home folder or somewhere else.
Second question is whether extraction of mannasim-patch-ns2.29.tar.gz is to be done before applying the commands as you mentioned above....
Third qs is whether ns-2.34 and mannasim patch available with me is 2.29 compatible with each other....
Last edited by mittal_saurabhin; 03-02-2014 at 10:25 AM.
|
|
|
03-01-2014, 09:27 AM
|
#9
|
Member
Registered: Jul 2010
Posts: 45
Rep:
|
[QUOTE=knudfl;5126543]# 6 .
Wrong. It's :
$ tar xvf ns-allinone-2.34.tar.gz && patch -p1 < ns2.34-mannasim-gcc4.3.patch
What do you mean by unprivileged user??? Is there any difference between root login and unprivileged user login
Although at my prompt it is showing $ not #
Last edited by mittal_saurabhin; 03-02-2014 at 10:25 AM.
|
|
|
03-01-2014, 09:38 AM
|
#10
|
Member
Registered: Jul 2010
Posts: 45
Rep:
|
@knudfl
when I used the command as you mentioned above, after some time it asked me to provide the name of the file to patch.
and when I provided the name of the patch file it is showing me below given error again and again.
File to patch: patch -p2 < ns2.34-mannasim-gcc4.3.patch
patch -p2 < ns2.34-mannasim-gcc4.3.patch: No such file or directory
Skip this patch? [y] y
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 86
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -rupN ns-allinone-2.34-orig/ns-2.34/common/packet.h ns-allinone-2.34/ns-2.34/common/packet.h
|--- ns-allinone-2.34-orig/ns-2.34/common/packet.h 2009-06-14 19:35:44.000000000 +0200
|+++ ns-allinone-2.34/ns-2.34/common/packet.h 2009-11-12 15:43:11.000000000 +0100
--------------------------
do you have any idea about this
Last edited by mittal_saurabhin; 03-02-2014 at 10:25 AM.
|
|
|
03-01-2014, 11:02 AM
|
#11
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
# 10 : Do not quote entire posts. And certainly not twice.
Please edit posts #8, #9. A "one word" reference will do.
The command $ patch -p1 < ns2.34-mannasim-gcc4.3.patch
.. means that the file ns2.34-mannasim-gcc4.3.patch
.. must be present in the current directory.
Hence these chained commands :
$ tar xvf ns-allinone-2.34.tar.gz && patch -p1 < ns2.34-mannasim-gcc4.3.patch
# 8 : No. Patches are not compatible with anything.
Can be used in the ns2 version they are meant for only.
May be you meant something else ?
* ns-2.29 and ns-2.34 are very different.
Se ns-allinone-2.xx/ns-2.xx/CHANGES.html .
# 8 : Using "mannasim-patch-ns2.29.tar.gz" Unpack to mannasim.patch.diff.
`mannasim.patch.diff' is the patch / the text file (which you can read.)
-
Last edited by knudfl; 03-01-2014 at 11:04 AM.
|
|
|
03-04-2014, 08:28 AM
|
#12
|
Member
Registered: Jul 2010
Posts: 45
Rep:
|
@knudfl
cd ns-2.34/ ; cp ns ns-mannasim
cp: cannot stat ‘ns’: No such file or directory
saurabh@saurabh-Satellite-C850:~/ns-allinone-2.34/ns-2.34$
when I run this command after ./install as per your blog, m getting this error.
Do you have any idea what to do now......
|
|
|
03-04-2014, 10:08 AM
|
#13
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
# 12 .
First : Build ns-allinone-2.34/ + mannasim.
When the file 'ns' is present in ns-2.34/,
you can use it, copy to <name>, etc.
But : If the build fails, there might not be any 'ns'.
-
Last edited by knudfl; 03-04-2014 at 10:10 AM.
|
|
|
03-05-2014, 10:07 AM
|
#14
|
Member
Registered: Jul 2010
Posts: 45
Rep:
|
Quote:
Originally Posted by knudfl
# 12 .
First : Build ns-allinone-2.34/ + mannasim.
-
|
dear
by build are we talking about installation of ns-allinone-2.34 and mannasim or something else
can you please provide the detailed description of this build word......
also I do have number of files/folders in ns2.34 but dont know which one to copy.....
my ms2 is working as well as my nam is working properly for tcl files
|
|
|
03-05-2014, 10:17 AM
|
#15
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
# 14 .
The build command for ns-allinone-2.xx is $ ./install
There is only one file by name 'ns' in ns-allinone-2.34/ns-2.34/.
* Easy recognizable as an executable. ? Can't see any ? Then use $ ls ns*
** ! When the build fails, there is no file "ns".
-
|
|
|
All times are GMT -5. The time now is 04:40 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|