Hi Phil, these are the fragments of two logs produced by the same script:

First log:
0:0:0.130236111 DEBUG (7): DISABLED ==>> DISABLED
0:0:0.130236131 DEBUG (7): At45db.read(0,84):
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0:0:0.130236151 DEBUG (7): DelugeMetadataP reads CRC at 0x80

Second log:
0:0:0.071385247 DEBUG (4): DISABLED ==>> DISABLED
0:0:0.071385267 DEBUG (4): At45db.read(0,84):
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0:0:0.071385287 DEBUG (4): DelugeMetadataP reads CRC at 0x80

The times are different. Now, I did use randint() to randomize the times as
such:

t.getNode(0).bootAtTime(1*t.ticksPerSecond())
for i in range(1, nNodes):
  t.getNode(i).bootAtTime(randint(0, 1*t.ticksPerSecond()))

But I thought randint() should produce the the same random values, given the
same seed through t.randomSeed()?

Thanks for your help.

Regards,
Yee Wei

2009/7/24 Philip Levis <[email protected]>

> On Jul 22, 2009, at 7:13 PM, Yee Wei Law wrote:
>
>  Hi all,
>>
>> I have been trying to make TOSSIM runs reproducible. Apparently the
>> following Python code does not achieve that:
>>
>> t = Tossim([])
>> t.randomSeed(33947)  # arbitrary seed
>>
>> Maybe it's obvious, but I don't know what I'm missing. This is starkly
>> different from OMNeT++ where nothing needs to be done for the simulations to
>> be reproducible.
>>
>> Hope to get some tips from the experts. Thank you in anticipation.
>>
>
> It should be reproducible. Can you send me a trace that points out where
> things go wrong?
>
> Phil
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to