3
$\begingroup$

In Windows 8.1 64bit and Mathematica 10.0.2, I used the latest cuda paclet 10.0.1. However,following the sample code in CUDALink User Guide, the CUDAFunctionLoad returns an error. I can not figure what is not right. Any help?

    Needs["CUDALink`"]
    secondKernelCode = "
  __device__ float f(float x) {
    return tanf(x);
  }

  __global__ void secondKernel(float * diff, float h, mint listSize) {
    int index = threadIdx.x + blockIdx.x * blockDim.x;
      float f_n = f(((float) index) / h);
      float f_n1 = f((index + 1.0) / h);
    if( index < listSize) {
        diff[index] = (f_n1 - f_n) / h;
    }
  }";

secondKernel = 
 CUDAFunctionLoad[secondKernelCode, 
  "secondKernel", {{"Float"}, "Float", _Integer}, 16]

CUDAFunctionLoad::target: "Target system specification \"TargetSystemID\" -> \!\(\"Windows-x86-64\"\) is not available for \!\(\"NVIDIA CUDA Compiler\"\) installation \!\(\"C:\\\\Users\\\\BMP\\\\AppData\\\\Roaming\\\\Mathematica\\\\Paclets\\\\Repository\\\\CUDAResources-Win64-10.0.0.1\\\\CUDAToolkit\\\\bin\\\\\"\). "
$\endgroup$
  • $\begingroup$ I also found a same question at forums.wolfram.com, but the answer was the cudalink bug. If it is really the reason for the latest version paclet, I will feel disappoint. $\endgroup$ – sejabs Dec 15 '14 at 15:01
  • $\begingroup$ It's working okay for me with paclet version 10.0.0.1 on Windows 7. What C compiler are you using? $\endgroup$ – Simon Woods Dec 15 '14 at 20:10
  • $\begingroup$ I use microsoft visual studio 2013 updata3. $\endgroup$ – sejabs Dec 16 '14 at 1:21
4
$\begingroup$

I encountered the same problem and solved it.

You have to check:
1. Your graphics card supports CUDA.
2. CUDA Toolkits and related things have been installed. (from nVidia)
3. CUDA paclet has been installed. (from Wolfram)
4. The C compiler is VS2005, 2008 or 2010. VS2013 is not supported.

$\endgroup$
  • $\begingroup$ Thanks for your reply! My card is Geforce GTX 670,so the first condition is satisfied; Although under the wolfram guide it's no need to install the toolkit because it has been included in the paclet, I have installed the CUDA Toolkits 6.5 from nvidia website, so 2 is ok; CUDACCompiler can show the visual studio imformation, but I guess the toolkit 6.0 included in the latest paclet is not support VS2013. Yes,I googled the information, VS2013 is not officially supported with CUDA 6! I will now change the compiler and try again! $\endgroup$ – sejabs Dec 16 '14 at 3:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.