hi

I am using Tossim simulator (micaz platform). I want to test a routing protocol 
in large scale networks. but when I create large networks I get "*** glibc 
detected *** /usr/bin/python: malloc(): memory corruption: 0x000000000282e060 
***"
First I thought that it happens because of the maximum number of nodes in the 
network (which is specified by -fnesc-nido-tosnodes option) I corrected it and 
increased it but still I get the same thing. 
Then I realized that the number of lines in "noise.txt" is less than my nodes. 
so I copied the lines so that it matches with the number of nodes. But it 
didn't work either. 
I tracked the compiling process again and I realized that in app.c file created 
by making micaz (while compiling) there is a "noiseDate" array which is bounded 
to 1000 elements. 1000 is the maximum number of nodes that at this moment I can 
have.
I checked the files to find the parameter which is initialized by 1000 but I 
couldn't find it. 

here is the python code I am running:


    print "test1"
    noise = open("noise.txt", "r")
    print "test2"
    lines = noise.readlines()
    print "test3"
    print n
    for line in lines:
        str = line.strip()
        #print "test6" , str
        if (str != ""):
            val = int(str)
            for i in range(0, n-1):
                t.getNode(i).addNoiseTraceReading(val)
                # for n=1200 nodes after 827 steps "*** glibc detected *** 
/usr/bin/python: malloc(): memory corruption: 0x000000000282e060 ***" happens
               # t.getNode(i)
                print "test7", i
    print "test4"
    for i in range(0, n-1):
        t.getNode(i).createNoiseModel()
    print "test 5"


and here is the output of compiling

mkdir -p simbuild/micaz
  placing object files in simbuild/micaz
  writing XML schema to app.xml
  compiling RoutAppC to object file sim.o
ncc -c -shared -fPIC -o simbuild/micaz/sim.o -g -O0 -tossim 
-fnesc-nido-tosnodes=4000 -fnesc-simulate -fnesc-nido-motenumber=sim_node\(\)   
-Wall -Wshadow -Wnesc-all -target=micaz -fnesc-cfile=simbuild/micaz/app.c 
-board=micasb -DDEFINED_TOS_AM_GROUP=0x22 --param 
max-inline-insns-single=100000 -DIDENT_APPNAME=\"RoutAppC\" 
-DIDENT_USERNAME=\"afshan\" -DIDENT_HOSTNAME=\"black\" 
-DIDENT_USERHASH=0x08ac7481L -DIDENT_TIMESTAMP=0x4bcd93d2L 
-DIDENT_UIDHASH=0x31cc2dc6L -Wno-nesc-data-race RoutAppC.nc   
-fnesc-dump=components -fnesc-dump=variables -fnesc-dump=constants 
-fnesc-dump=typedefs -fnesc-dump=interfacedefs -fnesc-dump=tags 
-fnesc-dumpfile=app.xml
  compiling Python support and C libraries into pytossim.o, tossim.o, and 
c-support.o
g++ -c  -shared -fPIC -o simbuild/micaz/pytossim.o -g -O0 
-DIDENT_APPNAME=\"RoutAppC\" -DIDENT_USERNAME=\"afshan\" 
-DIDENT_HOSTNAME=\"black\" -DIDENT_USERHASH=0x08ac7481L 
-DIDENT_TIMESTAMP=0x4bcd93d2L -DIDENT_UIDHASH=0x31cc2dc6L 
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx -I/usr/include/python2.5 
-I/opt/tinyos-2.1.0/tos/lib/tossim -DHAVE_CONFIG_H 
g++ -c  -shared -fPIC -o simbuild/micaz/tossim.o -g -O0 
-DIDENT_APPNAME=\"RoutAppC\" -DIDENT_USERNAME=\"afshan\" 
-DIDENT_HOSTNAME=\"black\" -DIDENT_USERHASH=0x08ac7481L 
-DIDENT_TIMESTAMP=0x4bcd93d2L -DIDENT_UIDHASH=0x31cc2dc6L 
/opt/tinyos-2.1.0/tos/lib/tossim/tossim.c -I/usr/include/python2.5 
-I/opt/tinyos-2.1.0/tos/lib/tossim
g++ -c  -shared -fPIC -o simbuild/micaz/c-support.o -g -O0 
-DIDENT_APPNAME=\"RoutAppC\" -DIDENT_USERNAME=\"afshan\" 
-DIDENT_HOSTNAME=\"black\" -DIDENT_USERHASH=0x08ac7481L 
-DIDENT_TIMESTAMP=0x4bcd93d2L -DIDENT_UIDHASH=0x31cc2dc6L 
/opt/tinyos-2.1.0/tos/lib/tossim/hashtable.c -I/usr/include/python2.5 
-I/opt/tinyos-2.1.0/tos/lib/tossim
  linking into shared object ./_TOSSIMmodule.so
g++ -shared -fPIC  simbuild/micaz/pytossim.o simbuild/micaz/sim.o 
simbuild/micaz/tossim.o simbuild/micaz/c-support.o -lstdc++  -o _TOSSIMmodule.so
  copying Python script interface TOSSIM.py from lib/tossim to local directory
 
*** Successfully built micaz TOSSIM library.

I really don't know where to look for its problem so please if any one has any 
clue for it guide me.

Thanks for your attention.
BR



      
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to