# 120 : Please read http://linuxsilo.net/docs/smart-questions_en.html
I.e. please tell, which Linux OS, you are using, like CentOS6, Fedora 11 etc. And look for bash with the which command : which bash I assume you already have used one of these commands : ./install , make. Then bash is most possibly in use too. And by the way, did the 'sh test' command work ? ? .. |
having the same error
Hellow everyody
me too i had the same error melokuhle had when i tried to setup the leach on ns2.34 using above steps: trace/cmu-trace.cc:1327: error: ‘format_rca’ was not declared in this scope trace/cmu-trace.cc: At global scope: trace/cmu-trace.cc:1523: error: no ‘void CMUTrace::format_rca(Packet*, int)’ member function declared in class ‘CMUTrace’ make: *** [trace/cmu-trace. Can anyone help me asap please as i need it badly |
Dears,
I had the same problem mealokuhle had when i tried to install leach on ns2.34 using above steps, the errors are: trace/cmu-trace.cc:1327: error: ‘format_rca’ was not declared in this scope trace/cmu-trace.cc: At global scope: trace/cmu-trace.cc:1523: error: no ‘void CMUTrace::format_rca(Packet*, int)’ member function declared in class ‘CMUTrace’ make: *** [trace/cmu-trace. can anyone help plz asap as i need it badly thanks in advance |
@monazEssam
Hi, you must have these pieces of code (lines between #ifdef and #endif) in file trace/cmu-trace.cc Code:
... Code:
#ifdef MIT_uAMPS |
Thanks exidus, it's working now, the make file executed without errors but when i type ./test and try to run the .nam file i found there are only 3 nodes and there is no connection between them, so i need to know how can i see the simulation of the leach i mean i need to see the clusters and cluster heads formed and sending we receiving the packets after the clusters formed
also if i want to add something to the packets sent and received in leach , where should i add my code? |
Dears,
I got this error in leach.err file when i run the test file: can't read "env(RCA_LIBRARY)": no such variable while executing "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) Can anyone help? |
@monazEssam
Answer for your problem is in post #58 You must change path to sources in file /mit/uAMPS/sims/umaps.tcl For example you must change all 7 sources from this: source $env(RCA_LIBRARY)/ns-ranode.tcl to this source /your_path_to_ns2/ns-2.34/mit/rca/ns-ranode.tcl |
@exidus: thank you exidus for your support to me. thanks GOD the leach now is running without errors but i have 2 questions:
The first question is: there are some files in mit/leach_sims i don't know their structure and can't understand their content and i tried to search for them in leach files to know when and where they are filled but i can't find anything: Leach.Data leach.alive Leach.save1 Leach.save2 the second question that i want to add a security to all leach packets/messages. i mean i want to encrypt all sent messages in leach protocol before they are sent and decrypt them on receiving, could you tell me where exactly(in which files) i can add my code for encryption & decryption at each sent and receive function in leach protocol thanks in advance |
Dears,
i want to know the name of the trace file i should analyze it when running the leach using ./test as i found alto of .tr (like out.tr, 694demo.tr and leach.tr ) files and i don't know which one i should analyze it for leach performance also the name file names 694demo.nam when i run it , it simulated 2 nodes with no connection , while in leach_test file the used topology is :topology_file="mit/uAMPS/sims/100nodes.txt". which contains 100 nodes not only 3 and i can't see the clusters formation in the nam simulation, how can i see it? Thanks in advance, Mona Essam |
dears,
Has anyone an awk script for energy consumption, throuhput and the packets delay for leach trace files? |
Leach
HI,
I am trying to add LEACH to NS2.35 on Cygwin by following these steps but I am getting this error when I make: Code:
queue/priqueue.cc: In member function `virtual void PriQueue::recv(Packet*, Hand Thanks Quote:
|
@monazEssam
1. Main output file is leach.out. There are information about which file is a cluster head, which node send a message etc. You can see total spend energz at the end of file. Can you check a number of total energy at the end of simulation when you simulate 100 nodes? 2. If you want to add security to leach packets, I think that a good place for it will be a files mit/rca/rcagent.cc and mit/uAMPS/bsagent.cc. There are function for sending and receiving packets. But I am not sure if my idea is correct. 3. Trace file is for leach_test file is leach.tr in ns-2.34 directory. I think that nam file is not created for leach_test. |
Leach
Thank you. I have managed to implement LEACH on ns2.34. However, I don't know how to use the test output files such as leach.energy and leach.data, etc. Is there any recommended resource that explains them?
Regards Quote:
|
It worked Thanks all.
---------- Post added 08-25-11 at 08:49 PM ---------- Thanks a lot all mates. I have created a simple how to, called: "Installing NS and LEACH on ubuntu" in PDF format and I want to share my experinces collected from this usefull site: Code:
I suppose that you have: |
Hi everyone, I followed the tips here and got ns-2.34 + leach working (I guess hehehe) but my leach.out has some warnings?
Code:
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff |
All times are GMT -5. The time now is 07:33 AM. |