curandGenerateLogNormal(..) generates just a normal distribution with MTGP32 generator

Dear NVidia,

I use ManagedCuda wrapper for C# with NVidia SDK v5.5; driver 327.23 on GTX 570.
I have found a strange “feature” that device function curandGenerateLogNormal(…) when used with Mersenne Twister generator CURAND_RNG_PSEUDO_MTGP32 (141) behaves differently than all other generators - it produces Normal not Lognormal distribution. Host function using MTGP32 generator behaves as is expected.

Has anyone observed similar behavior?

I would suggest filing a bug report via the bug reporting form linked from the registered developer website. Please attach a self-contained repro app. Thank you for your help.

Below is the way to reproduce the problem quickest in C++.

Please copy the example code from NVidia’s CURAND_library.pdf section 2.5 (SDK5.5) and insert it into NVidia CUDA 5.5 project template in Visual Studio 2010 - with minor tweaks it compiles pretty quick.

Example program was modified to produce LogNormal instead of Uniform distribution {mean=0, stddev=0.5, 100000 samples} with two different generators. After copying the data to CPU from GPU, one should create a histogram in the interval of 0 to 10 with the step of 0.01.

One can then observe (either using printout or debugger) that MTGP32 produces monotonically decreasing array of numbers (0-centered normal distribution) and all other generators produce a rising then decreasing set of values as is expected i.e. a log-normal distribution.

Can send the code on request. (-:

If this is indeed a feature, not a bug, would somebody kindly explain it, please.

Below are the steps to access the bug reporting form linked from the registered developer website. If you are not a registered developer yet, it’s easy to sign up; usually applications are approved within one business day. You can attach files with repro code to the bug report. Thanks!

(1) Go to
(2) Click on “Log In” link in upper right-hand corner
(3) Log in with user name & password
(4) Hover over your user name in the upper right corner and select “My Account” from drop-down menu
(5) Click on the green link “CUDA/GPU Computing Registered Developer Program”
(6) Under the heading “Reporting an Issue”, click on green link “The Submit a Bug Form”