Re: [Gems-users] How to replicate simulation runs exactly


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),

Setting the g_RANDOM_SEED to 1 doesn't seem to be working. Two runs of the simulation produce different timing results. 
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.

I am using GEMS2.1/ATMTP btw...

Any other ideas or suggestions?

Thanks.

Cheers,
/fuad



On Thu, Oct 30, 2008 at 8:21 AM, Fuad Tabba <fuad@xxxxxxxxxxxxxxxxx> wrote:
Thanks Dan.

Cheers,
/fuad



On Thu, Oct 30, 2008 at 4:49 AM, Dan Gibson <degibson@xxxxxxxx> wrote:
RANDOM_SEED = 0 forces a random seed based on the current value of time(NULL). Most PRNGs cannot handle 0 as a seed. Set RANDOM_SEED to non-zero.

Regards,
Dan

On Tue, Oct 28, 2008 at 10:31 PM, Fuad Tabba <fuad@xxxxxxxxxxxxxxxxx> wrote:
Hi,

Running GEMS/ATMTP, if I run the exact same experiment twice, I get slightly different results in timing. Is it possible to replicate the experiments exactly?

RANDOMIZATION is set to false and RANDOM_SEED is set to 0; but still, I cannot replicate the exact timing...

Is there a way of doing this? Thanks.

Cheers,
/fuad

_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/" to your search.





--
http://www.cs.wisc.edu/~gibson [esc]:wq!

_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/" to your search.





_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/" to your search.





--
http://www.cs.wisc.edu/~gibson [esc]:wq!
[← Prev in Thread] Current Thread [Next in Thread→]