gvas
December 20, 2011, 8:48am
1
With cuda driver 4.0.50 and 4.0.31 cudaGetDeviceCount fails in our application with error 10304 “unspecified driver error”. The nvidia examples are running fine.
With driver 4.0.21, 4.0.19 and 4.017 everything works fine. I am using a Quadro 4000 card on OS X 10.7.2. Does someone know what could be causing this error 10304?
Thanks
gvas
January 17, 2012, 2:29pm
2
I am able to reproduce the error with the examples from the GPU Computing SDK if I build the examples for 64-bit.
./deviceQuery
[deviceQuery] starting...
./deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
cudaGetDeviceCount returned 10304
-> unspecified driver error
[deviceQuery] test results...
FAILED
Maybe someone from NVIDIA can comment?
Thanks
clamb
January 26, 2012, 9:27pm
3
Sounds like you may be hitting a known issue mentioned here http://developer.download.nvidia.com/assets/cuda/docs/4.0_Release_Notes_Errata.txt
A 64-bit application, with the OS configured as 32-bit kernel running on driver versions prior to the CUDA 4.0.31, may crash.
Follow these steps to determine your default OS kernel configuration:
Choose About This Mac from the Apple menu.
Click on More Info.
Select Software in the Contents pane.
Look for “64-bit Kernel and Extensions: Yes (or No)” under the System Software Overview heading.
With the CUDA driver 4.0.31 driver for Mac, a CUDA context cannot be created in this mode- 32-bit kernel, 64-bit CUDA application.
If a 64-bit CUDA application tries to create a CUDA context in this mode, cuInit() will return a CUDA error.
The CUDA driver 4.0.31 on Mac OSX 10.7 supports the following configurations:
Support for 32-bit OS kernel with 64-bit CUDA applications will require a future CUDA driver update in conjunction with a Lion Software Update.
If your system is running as a 32-bit kernel, and you want to run a 64-bit CUDA application, one option is to set your OS to run in 64-bit kernel mode. This requires the Apple system hardware to support the OS running in 64-bit kernel; please refer to the Apple website for a detailed list of supported hardware.
You can enable your OS to run in 64-bit kernel mode using one of the following ways:
At startup time:
-If 32-bit kernel is your default configuration, holding 6 and 4 keys during startup will boot into 64-bit kernel mode.
To change the default configuration for the current startup disk (persistent):
-To 64-bit kernel, open a Terminal Window with the command:
sudo systemsetup -setkernelbootarchitecture x86_64
-To 32-bit kernel, open a Terminal Window with the command:
sudo systemsetup -setkernelbootarchitecture i386
gvas
January 27, 2012, 8:00am
4
Thanks, that was indeed the problem.
What I don’t know is how my system was set to use a 32 bit kernel because I have not explicitly set that myself and I had used driver 4.0.50 successfully before.
Thanks again,
gvas