thanks for the reply but I didnt understand ur answer, please can you post specifically wat to do
Regards, Sawyer |
i am working n clustering can u brief out about the posts above i find it difficult to understand.... actually wat should we do to implement leach protocol... how to bind C++ code to a tcl code and how to run it
|
Answer
Hey,
First of all I like to get your idea clearly. What exactly you want to do. Whether you want to modify existing protocols or propose a new one. LEACH is a clustering protocol. We have a code for LEACH for NS-2.27. No need for implementation. C++ serves like the backend for Network simulator NS2. Tcl is used for creating nodes, establishing links between the nodes. That is parameters for simulation are written in Tcl. C++ and Tcl are binded together and called Otcl. With Otcl we can call some classes from C++ programs to Tcl. For clear understanding better u wiki, u have ample of material available on net for Tcl, Otcl and C++. Regards, Sawyer |
Hi
may I get the following source files from you, Thanks for help :)
mit.tar.gz + LEACH-Makefile-org |
@lilicharmaine , post # 154 : Welcome to LQ. .. .. :) ..
The "old leach link" http://www.internetworkflow.com/downloads/ns2leach seems to be down currently. I have uploaded the files to Google Docs. All the links are in this LQ post : http://www.linuxquestions.org/questi...each-862835/#4 Good luck ! .. |
Hi knufl,
Thanks for your help :) I got all the files.. |
Hi,
May I know where can I get the ns2.27-gcc410 patch file? I need it for ns2.27-allinone-tar.gz installation in Ubuntu 10.10, thanks :) |
Post # 157 : The ns-2.27-gcc410.patch is here (Google .. ns-2.27-gcc410.patch ..)
http://cfs3.tistory.com/upload_contr...7-gcc410.patch But you may not have much luck with the patch. The rather complicated build method, you were pointed to is used for a reason: http://www.linuxquestions.org/questi...10-a-782356/#3 But who knows ? You could be that lucky with Ubuntu 10.10 ? .. |
Hi knudlf,
Thanks a lot for your help, really appreciates it :) I got the ns2.27-gcc410 patch file, but I cannot managed to install successful in ubuntu10.10. But I did follow the instruction from post #3, when I reach the step of tk8.4-lastevent file patching, it prompted me the following error, may I know what is the solutions for that? ==================================================================== run --> patch -p0 < tk-8.4-lastevent.patch patching file generic/tk.h error --> Hunk #1 FAILED at 635 1 out of 1 hunk FAILED -- saving rejects to file generic/tk.h.rej ==================================================================== |
Post # 159 , lilicharmaine.
'cd tk8.4.14/ && patch -p0 < tk-8.4-lastevent.patch' 1 out of 1 hunk FAILED : Can be ignored. Concerns mainly nam. And nam is a seperate application : Any binary nam can be used. When you have finished the build of ns-allinone-2.27 and the LEACH files, you can do : sudo apt-get install nam Installing nam before you have fished everything, may disturb your install: The dependencies for nam ( libotcl1 tcl8.4 tk8.4 ) are slightly different from the versions used to build ns-2.27. .. |
Hi knudfl,
Noted, thanks :) when I ./install for ns-allinone-2.27, I got any error message as following: Code:
============================================================ some steps? Thanks |
Post #159, continued answer :
.. And by the way, the 'ns-2.27-gcc410.patch' works OK with ns-allinone-2.27, no leach: 'patch < -p0 ns-2.27-gcc410.patch' outside the source ns-allinone-2.27/ . cd ns-allinone-2.27/ && export CC=gcc-4.1 CXX=g++-4.1 && ./install But when the LEACH files are added : make -f modified-leach-Makefile : Errors. ( Tested on Ubuntu 10.04 , 32bits.) .. |
Post # 161.
Are you quite sure, that all old tcl, tk, otcl, tclcl is gone ? Renamed to back-? Moved away ? Deleted ? All those should be replaced by the ns-allinone-2.34 versions. Renamed or have links, that tells the old names to make the 'install' file work. http://www.linuxquestions.org/questi...10-a-782356/#3 .. |
Hi knudfl,
yup, very sure, because I followed exactly all the steps in post #3. But in my ns-allinone-2.27 directory, I still can see all those old folders. In the post #163, do you means even the unused old folders need to be deleted from the ns-allione-2.27 directory? |
Hi lilicharmaine.
Deleting is OK, usually I just rename to back-<name>. I don't know, why you get that error. I checked it immediately, when you asked : No errors with "otcl-1.13" in Ubuntu 10.10, 64bits using the default compiler. If it is right on the edge, that it will fail / not fail, then suggest : Edit the otcl Makefile, Makefile.in to : CC = gcc-4.3 And may be tclcl-1.19/ : CC = gcc-4.3 , CPP = g++-4.3 Also required : sudo apt-get install g++-4.3 .. |
All times are GMT -5. The time now is 08:22 AM. |