MASON-INTEREST-L Archives

September 2015

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Sean Luke <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Sat, 5 Sep 2015 17:26:08 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (24 lines)
The seed is an int because Mersenne Twister only accepts 32 bits using its Knuth initializer.  If we accepted a long, people would believe that the top 32 bits of the long were used somehow.  It's not good style to accept a data range different from what's actually used.

Sean

On Sep 5, 2015, at 3:42 PM, Axel Kowald <[log in to unmask]> wrote:

> Hi,
> 
> I noticed that at several places inside SimState.java the random number
> seed is forced from long to int. I use qsub to submit several MASON
> batch jobs to our linux cluster and I thought that using the seed as
> part of a file name (to write some simulation data to disk) guarantees
> unique names. But unfortunately this is not the case. If I submit 10
> jobs often 1 or 2 of them have the same int seed and thus write into the
> same file :-(
> If I change the code inside SimState and keep the seed as long
> everything looks good.
> 
> So the question is, why is the seed forced into an int and are there
> some problems if it remains a long ?
> 
> Thanks,
>  Axel

ATOM RSS1 RSS2