开发者

Distributed random on cluster

开发者 https://www.devze.com 2023-01-08 20:23 出处:网络
I need a deterministic random number generator that maintains some sort of distribution (e.g. uniform or normal) that works over a cluster.

I need a deterministic random number generator that maintains some sort of distribution (e.g. uniform or normal) that works over a cluster.

Boost::Random fulfils most of these requirements. Is there any way I can use it in a cluster while maintaining the distribution?

If there was an efficent way to advance the the number generator this would be ideal, however I cant find such a function. Obviously I can call the function repeatedly in a loop, but I'll need to do this several thousand times(possibly a lot more) on each开发者_JAVA技巧 node.

Any recommendation on how I can achieve this?


I may be missing something obvious here, but couldn't you just give each cluster's RNG a different (pseudo)randomly chosen seed? I think that would give you a uniform distribution over all clusters.

An alternative would be to have all random numbers dispensed from a single computer that acts as an RNG server, but that would probably be slow.


Depending on how robust you need your PRNG to be, you may need to tread carefully here; there are definitely pitfalls in using multiple PRNGs.

In particular, there are experts in statistics who specialize in researching parallel algorithms for PRNG.

To get started thinking about some of those issues, you may want to look at a paper like this.

Like all problems, I recommend that you shoot for getting it right, first, and then getting it to run quickly.

0

精彩评论

暂无评论...
验证码 换一张
取 消