I am attempting to make the CreateLibrary example in the documentation (CUDALink/tutorial/Setup#639972394) work on my Macbook pro.
This is the cut and paste from the tutorial, I am trying to adapt the example to my Macbook (i.e., with different options)
demoFile =
FileNameJoin[{$CUDALinkPath, "SupportFiles", "cudaDLL.cu"}];
CreateLibrary[{demoFile}, "demo", "Compiler" -> NVCCCompiler,
"CompilerInstallation" -> "C:\\CUDA"
]
Does anyone with a MAC have a working example of this? (graphics card: NVIDIA GeForce GT 750M 2048 MB)
I've tried the vanilla:
CreateLibrary[{demoFile}, "demo"]
and I get errors that appear the the compiler cannot find header files, e.g.,
Compile error: \"/Users/ccarter/Library/Mathematica/Paclets/Repository/CUDAResources-\
OSX-10.0.0.1/CUDALink/SupportFiles/cudaDLL.cu:5:1: error: unknown \
type name '__global _
Here is (I believe) the relevant compiler information on my system:
CCompilers[]
(*
{{"Name" -> "Clang",
"Compiler" -> CCompilerDriver`ClangCompiler`ClangCompiler,
"CompilerInstallation" -> "/usr/bin",
"CompilerName" -> Automatic}, {"Name" -> "GCC",
"Compiler" -> CCompilerDriver`GCCCompiler`GCCCompiler,
"CompilerInstallation" -> "/usr/bin",
"CompilerName" -> Automatic}, {"Name" -> "NVIDIA CUDA Compiler",
"Compiler" -> NVCCCompiler,
"CompilerInstallation" ->
"/Users/ccarter/Library/Mathematica/Paclets/Repository/\
CUDAResources-OSX-10.0.0.1/CUDAToolkit/bin/",
"CompilerName" -> Automatic}}
*)
CUDADriverVersion[]
(*"6.5.25"*)
CUDACCompilers[]
(*
{"Name" -> "Clang",
"Compiler" -> CCompilerDriver`ClangCompiler`ClangCompiler,
"CompilerInstallation" -> "/usr/bin", "CompilerName" -> Automatic,
"Name" -> "GCC",
"Compiler" -> CCompilerDriver`GCCCompiler`GCCCompiler,
"CompilerInstallation" -> "/usr/bin", "CompilerName" -> Automatic}}
*)
GPUTools`Internal`$NVIDIADriverLibraryPath
(*"/Library/Frameworks/CUDA.framework/Versions/Current/CUDA"*)
GPUTools`Internal`$CUDALinkSystemLibaries
(*{"/usr/local/cuda/lib/libcuda.dylib", \
"/Users/ccarter/Library/Mathematica/Paclets/Repository/CUDAResources-\
OSX-10.0.0.1/CUDAToolkit/lib/libcudart.6.0.dylib", \
"/Users/ccarter/Library/Mathematica/Paclets/Repository/CUDAResources-\
OSX-10.0.0.1/CUDAToolkit/lib/libcufft.6.0.dylib", \
"/Users/ccarter/Library/Mathematica/Paclets/Repository/CUDAResources-\
OSX-10.0.0.1/CUDAToolkit/lib/libcublas.6.0.dylib", \
"/Users/ccarter/Library/Mathematica/Paclets/Repository/CUDAResources-\
OSX-10.0.0.1/CUDAToolkit/lib/libcurand.6.0.dylib"}*)