CUDA fails on OS X 10.8 Mountain Lion Developer Preview

On the OS X 10.8 (Mountain Lion) Developer Preview, when I try to run CUDA programs, I get the following error:

$ ./deviceQuery 

[deviceQuery] starting...

./deviceQuery Starting...

CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 35

-> CUDA driver version is insufficient for CUDA runtime version

[deviceQuery] test results...

FAILED

> exiting in 3 seconds: 3...2...1...done!

I did install the latest version of the debug driver and CUDA.

I guess this is something the people at NVIDIA itself should fix (or Apple)…

The CUDA control panel seems to be working fine for me, and I haven’t gotten any errors on games or anything. Where did you get that devicequery program?

I had the same problem. The CUDA.Framework library does not include the proper libcuda dylib version associated with the CUDA driver. A quick fix is to symlink an older dylib or…

Just copy this file to /Library/Frameworks/CUDA.framework/Versions/A/Libraries/

Also ensure that the CUDA.kext in /System/Library/Extensions/ is the 64 bit version, since NVidia kept 32 bit only version inside the 32/64 bit version for some unknown reason. To do this, in terminal type:

lipo -info /System/Library/Extensions/CUDA.kext/Contents/MacOS/cuda

Which should reply with:

Architectures in the fat file: /System/Library/Extensions/CUDA.kext/Contents/MacOS/cuda are: i386 x86_64

With any luck, your desktop should look like this…

Support for OS X 10.8 will be included in the CUDA 5.0 Release Candidate (RC), due out late this month.

If you’d like to receive an email notification when it’s released, sign up for the CUDA Registered Developer Program at http://developer.nvidia.com/joining-cuda-registered-developer-program

You can also learn what’s new in CUDA 5 at http://developer.nvidia.com/cuda-toolkit

WolfieNuke: THANKS for that analysis and post!

I have been unable to run CUDA 5 on my new Retina Macbook pro. It’s still running OSX 10.7.4, not 10.8, but the CUDA failures were similar. Your fix did not work for me, but led me to fix it myself with a similar analysis. In my case, I had to copy the dylib to a new filename, corresponding to the GPU driver 295.10.15. I just copied an existing dylib to the new 295.10.15 filename and immediately the problems were solved.

Thanks again!