0



I am trying to use device version of Mersenne Twister from cuRAND. I tried to use second example in the cuRAND API docs:
3.6. Device API Examples
I took the liberty of copying the code into separate gist:
curand.cu

This is what I get while executing the code on 9400M (CC 1.1, Mac OS X 10.8) and GTS 250 (CC 1.1, Linux) with CUDA Toolkit 5.5. Using -arch=sm_20 only removes the warnings but the result is the same:

$ nvcc curand.cu && ./a.out
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
Error at curand.cu:93

Oddly enough, everything seems to work fine on 9600 GT (CC 1.0, Linux) and GTX 570 (CC 2.0, Linux):

$ nvcc curand.cu && ./a.out
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
./curand.cu(32): Warning: Cannot tell what pointer points to, assuming global memory space
Fraction with low bit set was 0.4999963531494
^^^^ kernel_mtgp_example PASSED

I would really like to run Mersenne Twister on 9400M (preferably from cuRAND). Is it possible? If so, what would be your recommendation to do so?

Thanks!

UPDATE:
Now I get the error on 9600 GT (Linux) as well:

$ ./a.out
GPUassert: unknown error curand.cu 99

Occasionaly though I get the following (9600 GT, Linux):

$ ./a.out
GPUassert: the launch timed out and was terminated curand.cu 99

Note: this could be caused by load of the machine hosting the GPGPU (it's not idling).

To smmarize:
Doesn't work on - 9400M(Mac), 9600GT(Linux), GTS250(Linux)
Works on - GTX570(Linux)
All the above run on CUDA toolkit 5.5.

dejnon
  • 3
  • 2
  • 1
    Can you modify your error checking to print out the actual error message? See [this answer](http://stackoverflow.com/a/14038590/214473) for an example. – Tom Dec 09 '13 at 15:07
  • 1
    I just ran this code on a Macbook air with a GeForce 320M under OS 10.6.8 and CUDA 5 and it works OK compiling for an sm_11 target. Are you sure the OS X machine has a working CUDA installation? – talonmies Dec 09 '13 at 23:11
  • @Tom , here is what I got from using macro provided in tour link: `GPUassert: unknown error ./curand.cu 99` Here is the gist of my code (in case I did something wrong with wrapping it up): [code](https://gist.github.com/dejnon/7901606) – dejnon Dec 10 '13 at 22:32
  • @talonmies, Did you get any errors? My Mac do not have working CUDA installation right now (I am waiting for updated toolkit for OS X 10.9). On 10.8 I had the same `Error at curand.cu:93`. The results above are from Linux machines. Note: other CUDA examples (like `7_CUDALibraries/MersenneTwisterGP11213`) seem to work fine. – dejnon Dec 11 '13 at 00:10
  • @dejnon: compiler warnings, but those are normal on compute 1.x targets because they lack unified addressing support. but no runtime errors, just like the second output you showed. this isn't a very clearly described problem. could you explain exactly which platform works and which doesn't? – talonmies Dec 11 '13 at 07:33
  • @talonmies, as the problem persists on both MacOS and Linux boxes. Both MacOS and Linux feature CUDA Toolkit version 5.5. Since I am waiting for fixed CUDA toolkit for MacOS, let's focus on linux. Please, check out the update in my initial post. – dejnon Dec 11 '13 at 11:29
  • Are you running on the same GPU as your display? It could be that you are hitting the timeout. See [this answer](http://stackoverflow.com/a/7178761/214473) for an example of how to disable the timeout, or you could reduce the sample count. – Tom Dec 11 '13 at 12:31
  • @Tom, unfortunately I cannot mess with xserver settings. Is it possible to hit the timeout without getting the appropriate error message (i.e. `the launch timed out and was terminated`)? I will try to modify the sampleCount and run the code in a little while. – dejnon Dec 16 '13 at 09:35
  • @Tom reducing sampleCount and block sizes seem to have fixed the issue on GTS 250. I'm waiting for nVidia to update their MacOS driver and check it on my Mac. – dejnon Dec 17 '13 at 14:03

1 Answers1

0

It looks like you are running on the same GPU as your display (confirmed in comments). It could be that you are hitting the timeout. See this answer for an example of how to disable the timeout, or you could reduce the sample count.

Community
  • 1
  • 1
Tom
  • 20,852
  • 4
  • 42
  • 54