could not initialize CUDA runtime, error code=100

I have successfully installed and used pgfortran 11.10 on my MacPro, but can’t get it to see the GPU (Nvidia Quadro 4000).

Running pgaccelinfo -v gives

CUDA Driver Version: 4010
could not initialize CUDA runtime, error code=100
libamdcalcl.dylib not found
No accelerators found.
Check that you have installed the CUDA or CAL libraries properly
Check that your LD_LIBRARY_PATH environment variable points to the CUDA or CAL runtime installation directory
Check the permissions on your device

I have verified that the driver is loaded with: kextstat | grep -i cuda:

117 0 0xffffff7f81994000 0x2000 0x2000 com.nvidia.CUDA (1.1.0) <4>

and I have also added this line to my .bash_profile
export DYLD_LIBRARY_PATH=$PGI/opt/pgi/osx86/2011/cuda/4.0/lib:$DYLD_LIBRARY_PATH

Is there something else I should have done?

Hi Peter,

Let’s start by taking PGI out of the equation. Can you try compiling and running the CUDA SDK’s device query example using NVIDIA’s nvcc compiler?

Note that the CUDA components PGI ships are only necessary for compilation. All runtime libraries required by the NVIDIA CUDA Driver should be provided by NVIDIA. So if you’re able to run the SDK example, try removing your DYLD_LIBRARY_PATH setting since this should not be pointing to a PGI directory.

  • Mat

Thanks for your reply and advice, Mat.

I reinstalled the Quadro 4000 driver (256.02.25f1v1) and the CUDA driver (4.1.25) recommended by Nvidia for MacOSX 10.6.8 on my MacPro 5,1.

Then I repaired permissions.

Then I installed the Cuda SDK etc from Nvidia and pointed DYLD_LIBRARY_PATH to the /usr/local/cuda/lib for their installation. deviceQuery now works and so do pgaccelinfo -v and the pgi version of deviceQuery.

Just one suggestion - there are some small differences between MacOSX and Linux that are not mentioned in the PGI documentation and make it slightly misleading and confusing, such as the difference between LD_LIBRARY_PATH and DYLD_LIBRARY_PATH. Clarifying these would make the process much easier for Mac users.


Thanks,

Peter