CUDA samples on Mac OS X Mavericks (10.9) / matrixMulDrv

Do the CUDA 5.5.28 samples compile on Mavericks (10.9) without any modification?

I have a standard install of 10.9 and Xcode 5.0.1.

I get the following error:

/Developer/NVIDIA/CUDA-5.5/bin/nvcc -ccbin /usr/bin/clang -I…/…/common/inc -m64 -Xcompiler -arch -Xcompiler x86_64 -Xcompiler -stdlib=libstdc++ -o matrixMulDrv.o -c matrixMulDrv.cpp
/Developer/NVIDIA/CUDA-5.5/bin/nvcc -ccbin /usr/bin/clang -m64 -Xcompiler -arch -Xcompiler x86_64 -Xcompiler -stdlib=libstdc++ -Xlinker -rpath -Xlinker /Developer/NVIDIA/CUDA-5.5/lib -Xlinker -framework -Xlinker CUDA -o matrixMulDrv matrixMulDrv.o
ld: framework not found CUDA
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [matrixMulDrv] Error 1
make: *** [0_Simple/matrixMulDrv/Makefile.ph_build] Error 2

I have exact the same problem. Hope someone can help!!

Maybe, you have the same problem as here :

Your graphic card is not recognized as CUDA capable, try to launch deviceQuery to be sure

Same problem here, similar setup (os, cuds, xcode) on a MBP retina.
Built deviceConfig by cd:ing to its source dir and running make there.
Ran successfully, so this feels more like a build problem than a runtime problem IMHO.
Tried to paste the results but got stopped by some rule checker, trying to post without
results to see if that works better.

I also noted that prior to the error posted above there are a number of warnings about switch statements leaving some enumeration values “unhandled”:

$ make
/Developer/NVIDIA/CUDA-5.5/bin/nvcc -ccbin /usr/bin/clang -I…/…/common/inc -m64 -Xcompiler -arch -Xcompiler x86_64 -Xcompiler -stdlib=libstdc++ -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=“sm_35,compute_35” -o asyncAPI.o -c
…/…/common/inc/helper_cuda.h:68:9: warning: 13 enumeration values not handled in switch:
‘cudaErrorAssert’, ‘cudaErrorTooManyPeers’, ‘cudaErrorHostMemoryAlreadyRegistered’…
switch (error)
1 warning generated.

Looking at the source near this warning it seems that the value of __CUDA_API_VERSION is NOT >=0x4000 which is surprising. I expected it to be 0x5050 for Cuda 5.5 How can I check the actual value and where is that set?

Trying to post again with the results of running deviceConfig as mentioned in the previous post:

./deviceQuery Starting…

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

Detected 1 CUDA Capable device(s)

Device 0: “GeForce GT 750M”
CUDA Driver Version / Runtime Version 5.5 / 5.5
CUDA Capability Major/Minor version number: 3.0
Total amount of global memory: 2048 MBytes (2147024896 bytes)
( 2) Multiprocessors, (192) CUDA Cores/MP: 384 CUDA Cores
GPU Clock rate: 926 MHz (0.93 GHz)
Memory Clock rate: 2508 Mhz
Memory Bus Width: 128-bit
L2 Cache Size: 262144 bytes
Maximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
Maximum Layered 1D Texture Size, (num) layers 1D=(16384), 2048 layers
Maximum Layered 2D Texture Size, (num) layers 2D=(16384, 16384), 2048 layers
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total number of registers available per block: 65536
Warp size: 32
Maximum number of threads per multiprocessor: 2048
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535)
Maximum memory pitch: 2147483647 bytes
Texture alignment: 512 bytes
Concurrent copy and kernel execution: Yes with 1 copy engine(s)
Run time limit on kernels: Yes
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
Device supports Unified Addressing (UVA): Yes
Device PCI Bus ID / PCI location ID: 1 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 5.5, CUDA Runtime Version = 5.5, NumDevs = 1, Device0 = GeForce GT 750M
Result = PASS

I am having the exact same problem.

To build CUDA driver API samples, whose name ends with a ‘Drv’, in 10.9 Mavericks, you need to install 10.9 SDK.

Run ‘xcode-select --install’ in your terminal to install command line developer tools first.

I had these installed before, but updating/reinstalling the dev tools fixed this issue for me.


I installed nsight Cuda and cuda drive and gcc when i was trying to run samples such as multiplication , I get this error and failure run
please can some one help me how to solve this problem .
Best regards

**** Incremental Build of configuration Debug for project matrixMulCUBLAS ****

make all

Building file: …/src/matrixMulCUBLAS.cpp

Invoking: NVCC Compiler
/Developer/NVIDIA/CUDA-5.5/bin/nvcc -I"/Developer/NVIDIA/CUDA-5.5/samples/0_Simple" -I"/Developer/NVIDIA/CUDA-5.5/samples/common/inc" -I"/Users/maghrabi/Documents/workspace/matrixMulCUBLAS" -G -g -O0 -gencode arch=compute_30,code=sm_30 -odir “src” -M -o “src/matrixMulCUBLAS.d” “…/src/matrixMulCUBLAS.cpp”

clang: error: unsupported option ‘-dumpspecs’

clang: error: no input files

make: *** [src/matrixMulCUBLAS.o] Error 1

02:53:12 Build Finished (took 164ms)

I want to add that I am new for using Mac less 1 month and had no experience in Xcode .
thank you .

Too bad I cannot “upvote” a reply like in stackoverflow.
Anyway, “xcode-select --install” fixed the problem for me (CUDA 7.0 in OSX Yosemite)

Yes, usage of “xcode-select --install” fixed the problem for me too (CUDA 8.0 OSX El Capitan).