LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 04-08-2013, 12:23 AM   #1
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Rep: Reputation: Disabled
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
 
Old 04-08-2013, 01:41 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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.
Old 04-08-2013, 02:28 AM   #3
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Original Poster
Rep: Reputation: Disabled
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
 
Old 04-08-2013, 03:40 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
how to run Mannasim framework
I have no idea. Please read the documentation.
Google .. how to run Mannasim framework .. : 970 hits.
http://www.mannasim.dcc.ufmg.br/
http://www.mannasim.dcc.ufmg.br/howto.htm
http://www.mannasim.dcc.ufmg.br/msg-basic-window.htm
WSN http://ns-2.blogspot.dk/2010/04/mann...-networks.html
http://www.docstoc.com/docs/54719487...Classes-Manual
.. etc. etc.
Attached Files
File Type: txt mannasim-Links.txt (401 Bytes, 84 views)
File Type: txt wsn-links.tar.bz2.txt (4.3 KB, 55 views)

Last edited by knudfl; 04-08-2013 at 03:50 AM.
 
1 members found this post helpful.
Old 04-09-2013, 12:19 AM   #5
Aska123
Member
 
Registered: Apr 2013
Posts: 197

Original Poster
Rep: Reputation: Disabled
Thanks Kundfi.

I will read these links.
 
Old 02-28-2014, 10:14 AM   #6
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
[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
 
Old 02-28-2014, 11:07 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 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.
 
Old 03-01-2014, 09:06 AM   #8
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
Quote:
Originally Posted by knudfl View Post
# 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.
 
Old 03-01-2014, 09:27 AM   #9
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
[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.
 
Old 03-01-2014, 09:38 AM   #10
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
@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.
 
Old 03-01-2014, 11:02 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 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.
 
Old 03-04-2014, 08:28 AM   #12
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
@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......
 
Old 03-04-2014, 10:08 AM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 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.
 
Old 03-05-2014, 10:07 AM   #14
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
Quote:
Originally Posted by knudfl View Post
# 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
 
Old 03-05-2014, 10:17 AM   #15
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 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".

-
 
  


Reply

Tags
mannasim, ns2, wsn


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ns2.33 intallation and path setting vahitha Fedora 29 11-22-2015 10:15 AM
want to install ns2.29.3 along with mannasim patch for ns2.29 jeevanpinto Linux - Software 4 10-02-2013 12:09 AM
How to install Mannasim on Ns2.33 Aska123 Linux - Wireless Networking 1 04-05-2013 03:50 AM
path in ns2 raoatta Linux - Networking 3 10-01-2008 02:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration