Date: | Wed, 29 Oct 2008 17:10:15 -0500 |
---|---|
From: | "Dan Gibson" <degibson@xxxxxxxx> |
Subject: | Re: [Gems-users] How to replicate simulation runs exactly |
Sorry Fuad, I was thinking of another codebase. What I said before was NOT correct. The following IS correct: Ruby blindly passes whatever seed it is configured with to srandom(). srandom() is smart enough to treat srandom(0) as srandom(1). There is no call to time(NULL). Addressing the rest of the non-determinism: * Have you modified Ruby? * Are there any other modules loading? * Check out this thread: https://lists.cs.wisc.edu/archive/gems-users/2008-May/msg00113.shtml Summary of that thread: /Ruby/ is deterministic. We're not sure if /Simics/ is. I also don't know how ATMTP might interact. Regards, Dan On Wed, Oct 29, 2008 at 4:03 PM, Fuad Tabba <fuad@xxxxxxxxxxxxxxxxx> wrote: Hi Dan (and everyone else), I also searched through the code, srandom is always initialized by g_RANDOM_SEED, and I didn't find an instace where setting g_RANDOM_SEED to 0 would result in passing time(NULL) instead of the seed provided... I've also attached gdb to simics/ruby before loading ruby, with breakpoints set on srandom,srand,random and rand to verify that srandom does indeed get the value I've set for g_RANDOM_SEED, and that it gets called before any calls to random, and my assumptions seem to be correct. -- http://www.cs.wisc.edu/~gibson [esc]:wq! |
[← Prev in Thread] | Current Thread | [Next in Thread→] |
---|---|---|
|
Previous by Date: | Re: [Gems-users] How to replicate simulation runs exactly, Fuad Tabba |
---|---|
Next by Date: | Re: [Gems-users] How to replicate simulation runs exactly, Fuad Tabba |
Previous by Thread: | Re: [Gems-users] How to replicate simulation runs exactly, Fuad Tabba |
Next by Thread: | Re: [Gems-users] How to replicate simulation runs exactly, Fuad Tabba |
Indexes: | [Date] [Thread] |