[SciPy-User] Weird randomization issue with multiprocessing module

Ted To rainexpected at theo.to
Fri Nov 30 13:19:32 EST 2012


On 11/30/2012 12:57 PM, josef.pktd at gmail.com wrote:
> On Fri, Nov 30, 2012 at 12:43 PM, Thomas Kluyver <takowl at gmail.com> wrote:
>> On 30 November 2012 17:25, Ted To <rainexpected at theo.to> wrote:
>>>
>>> The
>>> numbers are being drawn using scipy.stats.norm and random.random.
>>
>>
>> I think the default seed for the random number generator uses the system
>> time, so maybe if your threads/processes spin up too quickly, some of them
>> could get the same seed. But it says it should also be using /dev/urandom in
>> the seed, which should negate that.
> 
> for some discussion
> http://mail.scipy.org/pipermail/numpy-discussion/2008-December/039179.html

Many thanks -- adding a seed() at the beginning of the routine did the
trick!



More information about the SciPy-User mailing list