LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   installed Mannasim Path on Ns2.34 . Now got error (https://www.linuxquestions.org/questions/linux-software-2/installed-mannasim-path-on-ns2-34-now-got-error-4175457307/)

Aska123 04-08-2013 12:23 AM

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

knudfl 04-08-2013 01:41 AM

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
-

Aska123 04-08-2013 02:28 AM

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

knudfl 04-08-2013 03:40 AM

2 Attachment(s)
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.

Aska123 04-09-2013 12:19 AM

Thanks Kundfi.

I will read these links.

mittal_saurabhin 02-28-2014 10:14 AM

[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

knudfl 02-28-2014 11:07 AM

# 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/ .

-

mittal_saurabhin 03-01-2014 09:06 AM

Quote:

Originally Posted by knudfl (Post 5126543)
# 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....

mittal_saurabhin 03-01-2014 09:27 AM

[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 #

mittal_saurabhin 03-01-2014 09:38 AM

@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

knudfl 03-01-2014 11:02 AM

# 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.)

-

mittal_saurabhin 03-04-2014 08:28 AM

@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......

knudfl 03-04-2014 10:08 AM

# 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'.

-

mittal_saurabhin 03-05-2014 10:07 AM

Quote:

Originally Posted by knudfl (Post 5128738)
# 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

knudfl 03-05-2014 10:17 AM

# 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 05:00 AM.