1

While building my CUDA project I get the following error:

cutil_inline_runtime.h(328): error: identifier "CURAND_STATUS_DOUBLE_PRECISION_REQUIRED" is undefined

So I started googling. Since I couldn't find the solution (nor did I find the actual problem) I downloaded from nVIDIA CURAND guide pdf and started reading. In that pdf it says:

Enumerator:
...
**CURAND_STATUS_DOUBLE_PRECISION_REQUIRED** GPU does not have double precision required by MRG32k3a
...

This means I can't perform operations with double data type... right? Well that seems wrong because, I assure you, couple a days ago I made a project using double data type and it worked just fine. Does anyone have a suggestion? Thank you!

EDIT Since I was unable to find the "real" solution for the problem, eventually I commented out the lines with "CURAND_STATUS_DOUBLE_PRECISION_REQUIRED" in cutil_inline_runtime.h and now it works. I know it is "ugly" but it was the only thing that helped...

zkristic
  • 629
  • 1
  • 9
  • 24
  • What GPU and operating system are you trying this on? – talonmies Jul 02 '12 at 08:53
  • The GPU is GeForce 8800 GT, and the OS is Win 7 – zkristic Jul 02 '12 at 08:56
  • Right, so the 8800 GT doesn't support double precision, and the error message is perfectly valid. If you have compiled double precision containing code for your GPU, you probably missed the warnings from the compiler that it was demoting double to float – talonmies Jul 02 '12 at 09:17
  • The problem stays even though I use **float** data type. Any thoughts about that? – zkristic Jul 02 '12 at 09:25
  • Keep in mind that alot of the code in the SDK is very rough, and not just "safe" to just include like that. The cutil lib is definently an example where you wanna browse the source before just including ;) – Svend Jul 16 '12 at 11:56

2 Answers2

2

I also had this problem. The issue was that I was using different versions of the cuda SDK and the cuda toolkit. I was using a newer version of the SDK which referenced the definition of CURAND_STATUS_DOUBLE_PRECISION_REQUIRED, but that definition was undefined in curand.h in the older version of the cuda toolkit that I had installed.

Try installing the version of the toolkit that matches your cuda SDK version.

tgalluzzo
  • 21
  • 2
1

Try Googling "Compute Capability", it's how nvidia defines the various CUDA capabilities. In the CUDA C Programming guide, it's mentioned a couple of times that devices with compute capability 1.2 or lower do not support double precision FP math: CUDA C Programming, pages 140, and also check table F-1, namely the row about dpfp support.

Gefore 8800 GT is a G80 architecture chip, which is compute capability 1.0. You cannot do double computations on this card. Keep in mind much example code makes use of emulation modes, and the like, which can fool you into thinking it works.

Svend
  • 7,916
  • 3
  • 30
  • 45
  • The last sentence isn't correct. There is no "emulation modes" in modern CUDA, and if you try compiling double precision containing code for an older GPU, the compiler will issue a warning message and demote the doubles to floats, emitting single precision code. – talonmies Jul 02 '12 at 09:19
  • @Svend Thank you for the answer and for the info, but I get the same error even though I use **float** data type. – zkristic Jul 02 '12 at 09:27
  • By emulation I meant that alot of the example code from the SDK makes use of "CPU" mode switches etc, that might confuse someone new to the SDK. I did not mean for it to read as if the GPU emulates anything (which it indeed doesnt). – Svend Jul 02 '12 at 10:11