Sender: |
|
Date: |
Sat, 5 Sep 2015 17:26:08 -0400 |
MIME-version: |
1.0 (Mac OS X Mail 7.3 \(1878.6\)) |
Reply-To: |
|
Content-type: |
text/plain; charset=iso-8859-1 |
Subject: |
|
From: |
|
In-Reply-To: |
|
Message-ID: |
|
Content-Transfer-Encoding: |
8bit |
Parts/Attachments: |
|
|
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
|
|
|