random number generation

Anything that doesn't fit elsewhere.
Post Reply
Posts: 66
Joined: Wed May 18, 2005 10:37 pm

random number generation

Post by wwlytton »

Has anyone tested the randomizers available in NEURON for adequacy?
I would like to use a randomizer to select a number in a seeded series by an index. Does anyone know how to do that with any of those available or with some other randomizer?

I tested them for speed and was surprised at the discrepency among them. Here are the results:

CPU time (sec) for vec.setrand() with vec.size==1e7 on Intel CPU T2400@1.83GHz
mean sdev
MLCG rdm.uniform(0,1000) 1.28 0.0
MLCG rdm.discunif(0,1000) 1.62833 0.00408248
MLCG rdm.normal(100,10) 2.51833 0.00408248
MLCG rdm.lognormal(100,10) 4.67833 0.00752773

ACG rdm.uniform(0,1000) 0.785 0.00547723
ACG rdm.discunif(0,1000) 1.145 0.00547723
ACG rdm.normal(100,10) 1.76667 0.00516398
ACG rdm.lognormal(100,10) 3.95333 0.00516398

MCellRan4 rdm.uniform(0,1000) 0.64 0.0
MCellRan4 rdm.discunif(0,1000) 0.91333 0.00516398
MCellRan4 rdm.normal(100,10) 1.60667 0.00516398
MCellRan4 rdm.lognormal(100,10) 3.83833 0.00408248
Post Reply