LEACH protocol installation on NS2.27
Hi,
I am working on LEACH protocol. I have just installed NS2.27 onto my system. Following the LEACH installation steps I just downloaded the mit.tar.gz file for LEACH. Now I require leach_makefile-2.27.patch for further installation. Can anyone suggest me where can I download this patch for LEACH. Thank you |
1 Attachment(s)
I can show the notes, I made a week ago ..
I downloaded this : MIT_uAMPS_ns.tar.gz , which seems to be a complete ' ns-2.1b5 ', patched with LEACH. This old version will work perfect on CentOS 3.9 . But I have not yet tried to install this LEACH version. So where did you get "" mit.tar.gz "" ? May be you can provide a link. I found no working links for any ns-2.27 LEACH files. The notes, 22-Jan-2010 are attached .. ..... |
Steps and Site for installation
1 Attachment(s)
Hey thanks for the reply...
Please try installing LEACH on NS2.27 in Ubuntu 9.10. The whole setup will take little time I will give you the site to download http://www.internetworkflow.com/down...ach/mit.tar.gz . Leach make file: http://www.internetworkflow.com/down...leach/Makefile LEACH installation steps are given in the pdf file I have attached.. U will get mit.tar.gz at the above link. If the above site does not open please give me ur mail id I will send u the mit.tar.gz file. Here I am unable to upload it. for clearly written steps follow this link. http://cypress.tistory.com/entry/ns2-227-ubuntu Please help me in installing the above, I am struck in between... I will send u the errors I got while I install LEACH. Thank you |
Thank you for showing the http://www.internetworkflow.com link.
Was down for a long time a week ago. Gave up using it then. http://www.internetworkflow.com/downloads/ns2leach/ > > leach_install http://www.internetworkflow.com/down...leach/Makefile > > Makefile for ns-2.27 Google .. leach makefile-2.27.patch .. .. probably the same things, you already found : http://namaste.tistory.com/142 1) wget http://www.tekno.chalmers.se/~yushen...7-gcc410.patch 2) Step 9 / Step 5.1 : Makefile edits. http://ns2.blogspot.com/2004_04_01_archive.html http://read.pudn.com/downloads95/sou...34.patch__.htm > > ns227-gcc34.patch ... So this was about all, I found today. ..... |
LEACH patch
are the leach makefile-2.27.patch and gcc410.patch are same because according to the instruction given in the below link(:patch -p0 < leach_makefile-2.27.patch)
http://cypress.tistory.com/entry/ns2-227-ubuntu may be we have to use the leach makefile-2.27.patch file I searched for it and I didnt get.. i followed wget http://voyager.ce.fit.ac.jp/wiki/too...ile-2.27.patch but it seems the link doesnot exist. Any how after following the steps for LEACH installation from various links, after giving ./test, i get that ./leach_test: No such file or directory.... I will show u this error PHP Code:
What about the status of you trying for this. Did u try installing. Can you please try and install LEACH onto NS2.27 and try to find out where I am missing. or am I miss any installation file. |
Finally got it to compile. ( ./install ).
Code:
knudfl@88:~$ cd 9tmp/ns-allinone-2.27/ns-2.27 Code:
#!/bin/bash P.S. : The warnings have no importance, are information only. So actually your test passed OK. ! I got no warnings on Ubuntu 9.10 , but warnings identical to yours did appear on PCLinuxOS. ..... |
Your first test : ( from post # 5 )
Quote:
Your new test, received by email today, shows : Quote:
from post # 6, which is known to work. Or did you use an MS - Windows app to copy or write the test script, so is not UNIX text format any more ? ? "" sleep: invalid time interval `2\r' "" looks like a formatting issue. ..... |
It worked
hey thank you very much.. I just edited the test file as it was in the 6th post and it worked.
yes the problem was it was in default opening through MS word (a WINE application). I just edited the test file and saved it and run the ./test. I didnt get any errors..(only irritating warnings) |
urgently
please can you send for me the patch "ns-2.27-gcc410.patch"
because the link doesn't work thanks |
@ emtarik05, welcome to LQ.
The file ns-2.27-gcc410.patch is just mentioned as an example on things that were / are available. Not at all needed. Please read the LEACH threads, tagged : leach , and see, that we did build LEACH without that. http://www.linuxquestions.org/questi...atch-791222/#2 And better delete your email adress, to prevent spam. Unless you haven't seen it, we can click your name, and use the function : "Send email to emtarik05". ..... |
thanks knudfl
I want to install NS2.27 on ubuntu 9.10. but it indicate the following problem ============================================================ * Build tcl8.4.5 ============================================================ loading cache ./config.cache checking whether to use symlinks for manpages... no checking compression for manpages... no checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking how to run the C preprocessor... gcc -E checking for unistd.h... yes checking for limits.h... yes checking for building with threads... no (default) checking if the compiler understands -pipe... yes checking for required early compiler flags... _LARGEFILE64_SOURCE checking for 64-bit integer type... long long checking for struct dirent64... no checking for struct stat64... yes checking for off64_t... yes checking whether byte ordering is bigendian... no checking for getcwd... yes checking for opendir... yes checking for strstr... yes checking for strtol... yes checking for strtoll... yes checking for strtoull... yes checking for tmpnam... yes checking for waitpid... yes checking for strerror... yes checking for getwd... yes checking for wait3... yes checking for uname... yes checking for realpath... yes checking dirent.h... yes checking for errno.h... yes checking for float.h... yes checking for values.h... yes checking for limits.h... (cached) yes checking for stdlib.h... yes checking for string.h... yes checking for sys/wait.h... yes checking for dlfcn.h... yes checking for unistd.h... (cached) yes checking for sys/param.h... yes checking for sys/modem.h... no checking termios vs. termio vs. sgtty... termios checking for fd_set in sys/types... yes checking whether struct tm is in sys/time.h or time.h... time.h checking for sys/time.h... yes checking whether time.h and sys/time.h may both be included... yes checking for tm_zone in struct tm... yes checking for gmtime_r... yes checking for localtime_r... yes checking tm_tzadj in struct tm... no checking tm_gmtoff in struct tm... yes checking long timezone variable... yes checking for st_blksize in struct stat... yes checking for fstatfs... yes checking for 8-bit clean memcmp... yes checking for memmove... yes checking proper strstr implementation... yes checking for strtoul... yes checking for strtod... yes checking for strtod... (cached) yes checking for Solaris2.4/Tru64 strtod bugs... ok checking for ANSI C header files... yes checking for mode_t... yes checking for pid_t... yes checking for size_t... yes checking for uid_t in sys/types.h... yes checking for socklen_t... yes checking for opendir... (cached) yes checking union wait... yes checking for strncasecmp... yes checking for BSDgettimeofday... no checking for gettimeofday... yes checking for gettimeofday declaration... present checking whether char is unsigned... no checking signed char declarations... yes checking for a putenv() that copies the buffer... no checking for langinfo.h... yes checking whether to use nl_langinfo... yes checking for sin... no checking for main in -lieee... yes checking for main in -linet... no checking for net/errno.h... no checking for connect... yes checking for gethostbyname... yes checking how to build libraries... static checking for ranlib... ranlib checking if 64bit support is requested... no checking if 64bit Sparc VIS support is requested... no checking system version (for dynamic loading)... ./configure: 1: Syntax error: Unterminated quoted string tcl8.3.2 configuration failed! Exiting ... Tcl is not part of the ns project. Please see www.Scriptics.com to see if they have a fix for your platform. tarik@tarik-desktop:~/Bureau/ns-allinone-2.27$ |
Please read post # 10 again.
And read everything in the links very carefully. When you follow the procedure in post # 3 here strictly .. http://www.linuxquestions.org/questi...9.10-782356/#3 .. you will not meet any tcl-8.4.5 ( or 8.3.2 ), because you are not using it ! Instead the 8.4.18 from ns-allinone-2.34 is linked and used ! ..... Another very important thing : Remove the system tcl, tk : sudo apt-get remove tcl* .. before you start the build of any ns2. ..... |
hi
i am working on leach protocol. i can't download mit.tar.gz from link http://www.internetworkflow.com/down...ach/mit.tar.gz . because this link not open now. please give me another link i download mit.tar.gz. thanks.... |
@ maunik : Click my name, send an email, and I will attach
mit.tar.gz + LEACH-Makefile-org to a return mail. ( 580 kB.) ..... |
hi,
I am a new user in LQ. I'm trying to work with LEACH on ns-2. So refer to the previous post I install ns-2.27 on Ubuntu 9.10. But the problem now is the link for downloading LEACH for ns 2.27 give before, doesn't work. So please, someone can give me a working link. Thanks. |
@ enji, welcome to LQ.
Ref. your email : The files mit.tar.gz + LEACH-Makefile-org have been send to you. ( @ maunik also asked for those, I hope the mail has arrived.) ..... |
Thank you knudfl.
I do what you tell me in the mail. But when I run make -f 1-LEACH-Makefile-org, I've got this error /home/enji/PFE/ns-allinone-2.27/lib -ltcl8.4 -lXext -lX11 -lintl -lm /usr/bin/ld: mit/rca/resource.o: Relocations in generic ELF (EM: 2) /usr/bin/ld: mit/rca/resource.o: Relocations in generic ELF (EM: 2) /usr/bin/ld: mit/rca/resource.o: Relocations in generic ELF (EM: 2) /usr/bin/ld: mit/rca/resource.o: Relocations in generic ELF (EM: 2) /usr/bin/ld: mit/rca/resource.o: Relocations in generic ELF (EM: 2) /usr/bin/ld: mit/rca/resource.o: Relocations in generic ELF (EM: 2) /usr/bin/ld: mit/rca/resource.o: Relocations in generic ELF (EM: 2) /usr/bin/ld: mit/rca/resource.o: Relocations in generic ELF (EM: 2) /usr/bin/ld: mit/rca/resource.o: Relocations in generic ELF (EM: 2) /usr/bin/ld: mit/rca/resource.o: Relocations in generic ELF (EM: 2) /usr/bin/ld: mit/rca/resource.o: Relocations in generic ELF (EM: 2) /usr/bin/ld: mit/rca/resource.o: Relocations in generic ELF (EM: 2) mit/rca/resource.o: could not read symbols: File in wrong format collect2: ld returned 1 exit status make: *** [ns] Erreur 1 Do you know what it means? |
@ enji, post # 17.
Did you remember to do 'make clean' in ns-allinone-2.27/ns-2.27/ ? 1) cd ns-allinone-2.27/ns-2.27/ 2) make clean ..... |
Quote:
when I do make clean, not all the files object (.o) are erase. So when I delete the file: mit/rca/resource.o and re run make, it compile without errors. The simulation of LEACH run also without any errors. So thank you knudfl for your reply. I have just another question: During the simulation, a lot of warnings are displaying is it possible to disable this. Thanks. |
Post # 19
The warnings have no importance, are information only. Please read the posts # 5 and # 6. ..... |
Leach ns2.34
I modified MIT LEACH to work on NS2.34 ubuntu 9.10
its ok thank you. |
@ emtarik05, post # 21 : That is interesting. Really. Thank you.
Can you please describe, what you did, and can you make this modified MIT available for others too ? Please .. ( I would very much like to have a copy.) ..... |
Hey all, I followed a combination of instructions, basically I used the posts that knudfl posted in regards to setting up NS-2.27 (with NS-2.34), and I've used the Jason Pamplin pdf for going about with the LEACH installation. Also, I'm running Ubuntu 9.04. I've gotten to the point in the pdf where I need to run make after having extracted the mit.tar.gz package. I've made the necessary changes to the Makefile I have, but am getting the following errors:
Code:
g++ -c -Dstand_alone -DSTL_NAMESPACE=@STL_NAMESPACE@ -o setdest.o setdest.cc http://www.isi.edu/nsnam/ns/ns-problems.html#ns-2.27 For applying a patch regarding the second problem listed under ns-2.27, but the patch would not work for me. Any thoughts? Edit: I think I may have been using the wrong Makefile, this is attempting to make with the Makefile you sent me knudfl Code:
g++ -c -g -Wall -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -fsigned-char -fno-inline -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_8 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -DMIT_uAMPS -I. -I/usr/X11R6/include -I/home/Administrator/ns-allinone-2.27/tclcl-1.15 -I/home/Administrator/ns-allinone-2.27/otcl-1.8 -I/home/Administrator/ns-allinone-2.27/include -I/home/Administrator/ns-allinone-2.27/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./mit/rca -I./mit/uAMPS -o tools/random.o tools/random.cc |
.......... Post # 23 ..
Well, the gcc / g++ 3.3 should be installed for a purpose : LEACH-Makefile , line 36-37, please edit to .. CC = gcc-3.3 CPP = g++-3.3 ..... I also have this , line 40 .. TCLSH = tclsh8.4 ..... |
I made the changes you suggested knudfl, big new list of errors:
Quote:
|
Post # 25 : One error only ( so far ) :
Quote:
a completely different set of paths .. (not all paths point to a known ns-allinone path) : config.h , line 60 : #include <tclcl.h> Which means searching in the default search path = /usr/ . I am always installing otcl + tclcl to /usr/ : cd otcl-1.13/ && ./configure --prefix=/usr --enable-release --enable-devel && make && sudo make install cd ../tclcl-1.19/ && ./configure --prefix=/usr --enable-release --enable-devel && make && sudo make install . sudo apt-get remove tcl8.5-dev tk8.5-dev sudo apt-get install tcl8.4-dev tk8.4-dev .. which provides the essential tcl / tk files in /usr/ . ( You may already have this tcl / tk in place.) ..... |
can any one compress the working directory of ns2.27 with leach and upload it for us
emtarik05 wrote : Quote:
thanks |
how can use trace file of leach protocol ?
does any one have Awk script for it ? thanks |
@elzohrry2006 , welcome to LQ.
ns2 trace : Please Google e.g. .. using trace file ns2 .. The first hit is : http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats I don't know how to run a trace file. Start a new thread, if you want to run a file.tr. Do not mention awk, then you will most likely get no answers. Quote:
and the compiled binary "ns" , alias ns227 , alias ns227LEACH from ns-2.27 . All objects are compiled into that binary. The other "50 MB" are examples, etc. , which you already have. But why not compile it yourself. It's easy. But please tell, which Linux, you are using : And get instructions. Other info : LQ Search → 'Tag Name' = leach ((and = ns227)). http://www.linuxquestions.org/questions/search.php ..... |
Thanks again for all the help everyone. I solved the last problem knudfl, except now I've got a new one. Upon making the PATH corrections in the makefile, it went through and got pretty far before reaching the following error:
Quote:
|
Post # 30 , @ omegabullit.
Well, I don't know, why I didn't miss any ' libintl.so ' for ns-2.27 on Ubuntu. And no libintl at all is available, it seems. A few Linux include a libintl package with libintl.so.X.x.x , and a 'gettext-devel' package with the link libintl.so , etc. The option, I can find for adding the files, is to rebuild the original gettext source, Ubuntu http://packages.ubuntu.com/source/jaunty/gettext http://archive.ubuntu.com/ubuntu/poo...17.orig.tar.gz >> gettext_0.17.orig.tar.gz cd gettext-0.17/ && ./configure --prefix=/usr/ --with-included-gettext --enable-shared && make && sudo make install ..... ( Or use a --prefix/home/'name'/<result> , cp libintl.so.8.0.2 to /usr/lib/ , and create the links, libintl.so , libintl.so.8 , to libintl.so.8.0.2 .) |
can any one give us simple example of leach protocol
the ./test work with me but i open the script file wireless-demo-csci694.tcl the protocol is set opt(adhocRouting) DSDV not leach thanks |
Post # 32 @elzohrry2006
I guess, you can just Google .. example leach protocol ns2 .. and find e.g. http://ns2.blogspot.com/ With those 1,880 hits, you will probably find a solution. ..... |
hii sir
i complete install leach protocol in ns 2.27.. but after i seen in root/ns-allinone-2.27/ns2.27/mit/leach_sims/leach.err following error occured couldn't read file "/mit/rca/ns-ranode.tcl": no such file or directory while executing "source.orig /mit/rca/ns-ranode.tcl" ("uplevel" body line 1) invoked from within "uplevel source.orig[list $fileName]" invoked from within "if [$instance_ is_http_url $fileName] { set buffer [$instance_ read_url $fileName] uplevel eval $buffer } else { uplevel source.orig[list $fileName] ..." (procedure "source" line 8) invoked from within "source $env(RCA_LIBRARY)/ns-ranode.tcl" (file "mit/uAMPS/sims/uamps.tcl" line 9) invoked from within "source.orig mit/uAMPS/sims/uamps.tcl" ("uplevel" body line 1) invoked from within "uplevel source.orig[list $fileName]" invoked from within "if [$instance_ is_http_url $fileName] { set buffer [$instance_ read_url $fileName] uplevel eval $buffer } else { uplevel source.orig[list $fileName] ..." (procedure "source" line 8) invoked from within "source mit/uAMPS/sims/uamps.tcl" (file "tcl/mobility/leach.tcl" line 18) invoked from within "source.orig tcl/mobility/leach.tcl" ("uplevel" body line 1) invoked from within "uplevel source.orig[list $fileName]" invoked from within "if [$instance_ is_http_url $fileName] { set buffer [$instance_ read_url $fileName] uplevel eval $buffer } else { uplevel source.orig[list $fileName] ..." (procedure "source" line 8) invoked from within "source tcl/mobility/$opt(rp).tcl" (file "tcl/ex/wireless.tcl" line 187) i dont know whts is this error ? |
Post # 34
Quote:
Wrong location ? /home/"name"/<dir>/ns-allinone-2.27 is default. And what is "source.orig<space>/mit/.." ? ? One space too many ? Or executed from a wrong location. The missing file ( which causes the error = missing ) is here : ns-allinone-2.27/ns-2.27/mit/rca/ns-ranode.tcl ..... |
hii sir
file at ns-allinone-2.27/ns-2.27/mit/rca/ns-ranode.tcl is present .. also error occured ... |
runing leach algorithm on ns2.35 ubuntu 8.04
Quote:
i installed ns2.35 on ubuntu8.04 lts Desktop edition. and now i want tu run leach algorithm on it. i dont know what should i do, please tell me the steps of runnin leach algorithm.and send me the url of everything that i have to download it or email them for me(sahel_652003@yahoo.com) thx |
@knudfl
sir please give me the proper step for install leach protocol in ns 2.27.. urgently thanks you... |
@ sahel_s : Welcome to LQ. . :) .. Either contact @emtarik05
http://www.linuxquestions.org/questi...ember&u=516518 for the "ns-2.34 method", or use ns-allinone-2.27 ... ... please read all the LEACH treads ... http://www.linuxquestions.org/questi...atch-791222/#2 http://www.linuxquestions.org/questi...10-a-782356/#3 General install instructions are in "ns2leach.pdf" http://www.linuxquestions.org/questi...2-27-a-785379/ post # 3, or you can easily find it with Google. Post # 38 @ maunik, please see the above link(s) ns2leach.pdf etc. http://www.linuxquestions.org/questi...0&d=1264710405 ..... |
dear knudf
as i told you,i read the posts,but finalyy i decide to install ns2.27 by using steps which i found them in posts(http://cypress.tistory.com/entry/ns2-227-ubuntu) but in step 1,part3,it gives me this problem: "~$ wget http://www.tekno.chalmers.se/~yushen...7-gcc410.patch --05:10:27-- http://www.tekno.chalmers.se/~yushen...7-gcc410.patch => `ns-2.27-gcc410.patch' Resolving www.tekno.chalmers.se... 129.16.30.200 Connecting to www.tekno.chalmers.se|129.16.30.200|:80... failed: Connection refused. " so now ,what shoud i do?how can i download the Patch for compiling NS-2.27 with GCC 4.1.x: ns-2.27-gcc410.patch? please help me. best regards |
1 Attachment(s)
The " mit.tar.gz " link is up again
http://www.internetworkflow.com/down...ach/mit.tar.gz http://www.internetworkflow.com/downloads/ns2leach/ Found it here today http://ranlog.blogspot.com/ http://ranlog.blogspot.com/search/label/LEACH ... May be these instructions will do too. The http://norae.tistory.com/67 link is also working today: 'ns-2.27-gcc410.patch' ( Never had that luck before ! ) And by the way, all files are always available from http://www.pudn.com ? ? , also the 'ns-2.27-gcc410.patch' ? but come with a price, $ X.xx . http://en.pudn.com/login.asp ( Unless you upload some (new) code.) http://en.pudn.com/search_db.asp?key...7-gcc410.patch http://www.pudn.com/downloads227/sou...il1067570.html ..... |
Thanks all,
I am new in ns-2 and I want to run LEACH. Actually, My OS is Ubuntu 9.10. MY question is: Should I install ns-2.34 then install ns-2.27 I am confused about what is written in different #posts? Can you give me clear steps to run leach on ubuntu 9.10? Thanks alot |
LEACH on ns2.34
Quote:
I need to run LEACH on my ns-2.34. plz send my steps and any files needed to run it Kind Regards, Naif |
thanks alot
|
ns_2.35
I need help for run "leach algorithm on ns_2.35".plz
|
@ WSNs, # 42, welcome to LQ. Suggest: delete your 'email address'.
Email addresses displayed on the internet are used by spammers. The "Send email to WSNs" is already present in the WSNs Menu. ....... Please do not write three posts for one short message. Better use the 'Edit' button instead. Please read LQ threads with a 'leach' Tag. LQ Search → 'Tag Name' = leach Ubuntu cannot compile old tcl tk otcl tclcl. Replace with versions from ns-allinone-2.34 and / or make links as described. The script 'install' will use 'old names' only. Hence the 8.4.5=>8.4.14 etc. links. LQ Rules > > sms, chatspeak, shorthand like plz/PLZ: not allowed. @ zeost, # 45, welcome to LQ. The term ' ns_2.35". ' is unknown. Google will tell. Do you mean ns-allinone-2.34? Be precise, please. EDIT : Found ns-allinone-2.35-RC3.tar.gz, 'release candidate 3'. And please read the 6 leach threads. → Lots of info. http://linuxsilo.net/docs/smart-questions_en.html ..... |
How to run LEach protocol in ns2.34..
|
Post # 47 @ btnaveen : You don't use ns-2.34 for leach.
'ns-allinone-2.27' is to be used for that. And g++ 3.3.x. Just read all the above posts, to see how. And welcome to LQ ....... :) .. .. |
Post # 40, @ sahel_s : about the ns-2.27-gcc410.patch ..
I don't think it works. And when you anyway have to use a "compat" gcc, g++ : There is no big difference installing ( or using ) version 3.3.x instead of version 4.1.x. .............. 'g++ 3.3.x' works, we know that for sure. .. |
Ubuntu 9.10 with ns2.27
Hi all,
In my Ubuntu 9.10 I remove gcc-4.0 and g++-4 then I install gcc-3.3 and g++ and every thing is ok. I install ns-2.27 and its work But after I do modifications to work with LEACH and try to make ns-2.27 it gives me this error: -------------------------------------- -------------------------------------- Code:
for i in indep-utils/cmu-scen-gen/setdest indep-utils/webtrace-conv/dec indep-utils/webtrace-conv/epa indep-utils/webtrace-conv/nlanr indep-utils/webtrace-conv/ucb; do ( cd $i; make all; ) done Can you help me to solve this error? Thanck you. |
All times are GMT -5. The time now is 06:56 PM. |