Hi,
     There is a variable TOS_MAX_NODES that is defined in tos.h in the
tinyos-2.x/tos/lib/tossim directory, on line 67:
#define TOSSIM_MAX_NODES 1000
     By default it is 1000, which is why the segmentation fault is
happening when you are running with 5000 nodes. You can change this
number and recompile, but I am not sure if there is a more
fundamental maximum. I was able to get TOSSIM running, apparently
correctly, with as many is 1049 nodes.

Thanks,
Tal

> Hi,
>
>   I am wondering the largest number of motes TOSSIM can simulate.
>
>   I am using XubunTOS. I write a Driver.c simulation program. It works
> fine with 4 nodes.
>
>   When I use 5000 nodes, I have the following code segment in Driver.c
>
>   ====
>   #define Num_of_Nodes 5000
>   ...
>     for (i = 1; i <= Num_of_Nodes; i ++)
>   {
>    t->getNode(i)->addNoiseTraceReading((int)temp_noise);
>     }
>
>   =====
>
>   when I use gdb to debug, the above code gives the following error:
>
>   ====
>   Program received signal SIGSEGV, Segmentation fault.
> 0x0804e752 in sim_noise_trace_add (node_id=65535, noiseVal=-98 '\236')
>     at /opt/tinyos-2.x/tos/lib/tossim/sim_noise.c:93
> 93
> noiseData[node_id].noiseTrace[noiseData[node_id].noiseTraceIndex] =
> noiseVal;
>   ===
>
>   Can anyone give me some advice?
>
>   Thanks,
>
>   Chris
>
>
>
> ---------------------------------
> Never miss a thing.   Make Yahoo your
> homepage._______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to