1
$\begingroup$

I'm trying the cuda in mathematica 11.1. The cuda functions seems to work fine. The CUDAFluidDynamics[], runs the example simulation, although I am not certain if it runs on the device or the host.

However, I get an error message when trying to use the cuda link:

 fun=CUDAFunctionLoad["__global__ void zero(mint * in, mint length) {
    mint index = threadIdx.x + blockIdx.x * blockDim.x;

    if (index < length)
       in[index] = 0;
    }", "zero",{{_Integer},_Integer},{10},ShellOutputFunction->Print]

CUDAFunctionLoad::cmpf: The kernel compilation failed. Consider setting the option "ShellOutputFunction"->Print to display the compiler error message.

C:\Users\cris\AppData\Roaming\Mathematica\ApplicationData\CUDALink\BuildFolder\cris-i7-17020\Working-cris-i7-17020-1560-3>call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64 nvcc fatal : Value 'sm_61' is not defined for option 'gpu-architecture'

It seems that the value sm61 is causing the problems, How do I solve it?

$\endgroup$
8
  • $\begingroup$ Have you tried specifying a different architecture, e.g. "CUDAArchitecture" -> "sm_52" ? $\endgroup$ Jul 6, 2017 at 20:51
  • $\begingroup$ It gives me the same error message: nvcc fatal : Value 'sm52' is not defined for option \ 'gpu-architecture' $\endgroup$
    – Gluoncito
    Jul 6, 2017 at 20:55
  • $\begingroup$ I am using a GTX 1050. $\endgroup$
    – Gluoncito
    Jul 6, 2017 at 20:56
  • $\begingroup$ What does "Description" /. CUDAResourcesInformation[] give? $\endgroup$ Jul 6, 2017 at 20:59
  • $\begingroup$ {{Name -> CUDAResources, Version -> 10.5.0, BuildNumber -> , Qualifier -> Win64, WolframVersion -> 10.5+, SystemID -> {Windows-x86-64}, Description -> {ToolkitVersion -> 7.0, MinimumDriver -> 300.0}, Category -> , Creator -> , Publisher -> , Support -> ,Internal -> False, Location -> C:\Users\cris\AppData\Roaming\Mathematica\Paclets\Repository\CUDAResources-Win64-10.5.0, Context -> {}, Enabled -> True, Loading -> Manual, Hash -> 79fa747a52a45bf2d78e2c3516c80061}} $\endgroup$
    – Gluoncito
    Jul 6, 2017 at 21:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.