9

モンテカルロシミュレーションにnvidiaGPUを使用して調査しています。ただし、gsl乱数ジェネレーターと、SPRNGなどの並列乱数ジェネレーターを使用したいと思います。これが可能かどうか誰かが知っていますか?

アップデート

GPUを使用してRNGで遊んだことがあります。現在、良い解決策はありません。SDKに付属しているMersenneTwisterは、シードの生成に非常に長い時間がかかるため、(私の)モンテカルロシミュレーションにはあまり適していません。

NAGライブラリはより有望です。RNは、バッチまたは個別のスレッドで生成できます。ただし、現在サポートされているディストリビューションは、均一、指数、通常の一部のみです。

4

7 に答える 7

7

The GSL manual recommends the Mersenne Twister.

The Mersenne Twister authors have a version for Nvidia GPUs. I looked into porting this to the R package gputools but found that I needed excessively large number of draws (millions, I think) before the combination of 'generate of GPU and make available to R' was faster than just drawing in R (using only the CPU).

It really is a computation / communication tradeoff.

于 2010-06-29T16:24:46.767 に答える
6

My colleagues and I have a preprint, to appear in the SC11 conference that revisits an alternative technique for generating random numbers that is well-suited to GPUs. The idea is that the nth random number is:

x_n = f(n) 

In contrast to the conventional approach where

x_n = f(x_{n-1})

Source code is available, which implements several different generators. offering 2^64 or more streams, each with periods of 2^128 or more. All pass a wide assortment of tests (the TestU01 Crush and BigCrush suites) of both intra-stream and inter-stream statistical independence. The library also includes adapters that allow you to use our generators in a GSL framework.

于 2011-10-11T14:11:28.107 に答える
5

Massive parallel random generation as you need it for GPUs is a difficult problem. This is an active research topic. You really have to be careful not only to have a good sequential random generator (these you find in the literature) but something that guarantees that they are independent. Pairwise independence is not sufficient for a good Monte Carlo simulation. AFAIK there is no good public domain code available.

于 2010-06-26T20:57:10.707 に答える
2

I've just found that NAG provide some RNG routines. These libraries are free for academics.

于 2010-06-28T08:41:16.260 に答える
0

Use the Mersenne Twister PRNG, as provided in the CUDA SDK.

于 2010-06-29T16:13:46.930 に答える
0

Here we use sobol sequences on the GPUs.

于 2010-06-29T16:16:18.207 に答える
-2

自分で実装する必要があります。

于 2010-06-26T19:11:12.327 に答える