Hello guys! I have a little problem. I need to do a Monte Carlo Algorithm and I need to get some random numbers.
I was reading about Mersene Twister but I don’t know how to use that to generate random numbers.
If somebody has an example to give me and help me how can I get some Random Number generator Algorithm for cuda programs? please help me.
(By the way it would be nice if Nvidia could fix the link anchors on that page. You will likely have to scroll down or search for MersenneTwister on that page yourself.)
@tera: Could you be more specific please as to what exactly is broken? I tried a bunch of the download links on the page you pointed to and they appear to work. Since you spoke of “link anchors” (a term I am unfamiliar with) I suspect you mean something else besides the links themselves. I’d be happy to pass any actionable information to our web team. Thanks!
Thanks Norbert. The download links do indeed work. What doesn’t is my link in the post above. Even though it ends on “#MersenneTwister” which I copied straight from the link symbol it leads to the top of the page instead of directly to the Mersenne Twister example because all the html anchor tags on that page miss a name=“…” attribute.
Sorry for my confusing description -it probably already was too late in the morning for me and time to go to bed.
The HTML source of that page contains “anchors” that are supposed to allow direct linking to a specific example:
<span class="itemName" name="path">MersenneTwister <a href="#MersenneTwister"><img alt="For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon." class="anchorImage" src="http://developer.download.nvidia.com/compute/DevZone/C/html/images/link.jpg" /></a></span>
For them to actually work, they would also need a [font=“Courier New”]name[/font] attribute:
<span class="itemName" name="path">MersenneTwister <a name="MersenneTwister" href="#MersenneTwister"><img alt="For a direct link to this sample, right-click and copy the URL (shortcut) of this link icon." class="anchorImage" src="http://developer.download.nvidia.com/compute/DevZone/C/html/images/link.jpg" /></a></span>
The same applies to all other examples. As far as I can remember, it used to work a while ago though.
Hi, njuffa, could I assume you are familiar with CURAND? I have a question on CURAND. I want to get same random number series on both CPU and GPU. But using standard ways I failed to do it. I need some strange trick to reach this purpose. I wonder if it’s a problem in CURAND or I missed something. See here for my test code and more details. Thanks.
I did notify the web team at the time. I don’t recall anything beyond that, it is simply too long ago. I will check whether the anchors work now, and ping the web team again if they don’t.