Search code examples
gcccudanvccosx-yosemite

How to set CUDA on Yosemite?


I have upgraded to Yosemite but nvcc doesn't like the new gcc4.9

gcc: warning: couldn’t understand kern.osversion ‘14.0.0
gcc: warning: couldn’t understand kern.osversion ‘14.0.0
In file included from /Developer/NVIDIA/CUDA-5.0/bin/../include/cuda_runtime.h:59:0,
                 from <command-line>:0:
/Developer/NVIDIA/CUDA-5.0/bin/../include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.7 and up are not supported!
 #error -- unsupported GNU version! gcc 4.7 and up are not supported!

I'm using an old GeForce9400M but the driver is working. This is the DeviceQuery compiled with nvcc 5.0:

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

Detected 1 CUDA Capable device(s)

Device 0: "GeForce 9400M"
  CUDA Driver Version / Runtime Version          6.5 / 5.0

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 6.5, CUDA Runtime Version = 5.0, NumDevs = 1, Device0 = GeForce 9400M

This is the DeviceQuery compiled with nvcc 6.5:

dyld: Library not loaded: @rpath/libcudart.dylib
  Referenced from: /Developer/NVIDIA/CUDA-5.0/samples/1_Utilities/deviceQuery/./deviceQuery
  Reason: Incompatible library version: deviceQuery requires version 1.1.0 or later, but libcudart.dylib provides version 0.0.0
Trace/BPT trap: 5

How should I set Yosemite to use CUDA?


Solution

  • Solution:

    1) installing CUDAToolkit6.0

    2) downgrade CUDAdriver to 4.2.10,

    3) upgrade CUDAdriver to 6.5 ONLY!!!...

    I still get a warning nvcc warning : The 'compute_10' and 'sm_10' architectures are deprecated, and may be removed in a future release.

    I asked this on a nvidia tutorial and the answer was "Hardware Update"

    Hence I will stay away from 6.5 Toolkit or new updates.