I'm following the CUDALink tutorial [ http://reference.wolfram.com/language/CUDALink/tutorial/Introduction.html ] and everything is going fine until I get to the part that calls CUDADot on the matrices. At this part I get a time out error but the Out line returns almost immediately. I've included the commands and some other CUDA and system information bits. I'm running Windows 8.1 with Mathematica 10 Home. There is an on-board intel graphics chip and the Nvidia GPU. I can see that the Nvidia GPU registers that Mathematica is using it when I execute the CUDAQ[] command (Nvida taskbar icon shows GPU is active and that Mathematica is using it).

What is odd is that I can execute a few of the CUDA examples in the help. I've tried a few of the image ones (the tiger and the moon, for example) but I can't seem to get the CUDADot to work. Everything seems to be installed fine.



{1 -> {"Name" -> "GeForce GTX 860M", "Clock Rate" -> 1019500, 
"Compute Capabilities" -> 5., "GPU Overlap" -> 1, 
"Maximum Block Dimensions" -> {1024, 1024, 64}, 
"Maximum Grid Dimensions" -> {2147483647, 65535, 65535}, 
"Maximum Threads Per Block" -> 1024, 
"Maximum Shared Memory Per Block" -> 49152, 
"Total Constant Memory" -> 65536, "Warp Size" -> 32, 
"Maximum Pitch" -> 2147483647, 
"Maximum Registers Per Block" -> 65536, "Texture Alignment" -> 512,
"Multiprocessor Count" -> 5, "Core Count" -> 160, 
"Execution Timeout" -> 1, "Integrated" -> False, 
"Can Map Host Memory" -> True, "Compute Mode" -> "Default", 
"Texture1D Width" -> 65536, "Texture2D Width" -> 65536, 
"Texture2D Height" -> 65536, "Texture3D Width" -> 4096, 
"Texture3D Height" -> 4096, "Texture3D Depth" -> 4096, 
"Texture2D Array Width" -> 16384, 
"Texture2D Array Height" -> 16384, 
"Texture2D Array Slices" -> 2048, "Surface Alignment" -> 512, 
"Concurrent Kernels" -> True, "ECC Enabled" -> False, 
"TCC Enabled" -> False, "Total Memory" -> 4294967296}}

randM = RandomReal[1, {4000, 4000}];

{1.276902, Null}

randMG = CUDAMemoryLoad[randM]
CUDAMemory["<22093>", "Double"]

AbsoluteTiming[res = CUDADot[randMG, randMG]]
CUDADot::lnchtout: A CUDALink kernel timed out. >>
{0.071061, CUDADot[CUDAMemory["<22093>", "Double"], CUDAMemory["<22093>", "Double"]]}


{{"Name" -> "CUDAResources", "Version" -> "", 
"BuildNumber" -> "", "Qualifier" -> "Win64", 
"WolframVersion" -> "10+", "SystemID" -> {"Windows-x86-64"}, 
"Description" -> "{ToolkitVersion -> 6.0, MinimumDriver -> 270.0}", 
"Category" -> "", "Creator" -> "", "Publisher" -> "", 
"Support" -> "", "Internal" -> False, 
"Location" -> 
Repository\\CUDAResources-Win64-", "Context" -> {}, 
"Enabled" -> True, "Loading" -> Manual, 
"Hash" -> "8cd86e25825c095afcb781fa82d3cf73"}}

"Name" -> "CUDAResources", "Version" -> "", 
"MathematicaVersion" -> "10.*", 
"Description" -> "{ToolkitVersion -> 6.0, MinimumDriver -> 270.0}", 
"SystemID" -> {"Windows-x86-64"}, "Qualifier" -> "Win64", 
"Extensions" -> {{
"Resources" -> {
"CUDAToolkit", "ExampleData", "LibraryResources", "CUDALink", 
"Location" -> "C:\\Users\\Edmund\\AppData\\Roaming\\Mathematica\\\

Any ideas?




1 Answer 1


In the CUDALink user guide, there is a section describing the time out error. This can be found here about 2/3 of the way down the page under Common Errors.

Essentially, under Windows, if the same GPU that is used for CUDA computation is also used for the display, the Windows Display Driver Model (WDDM) enforces a time limit on GPU computations so that the desktop does not become unresponsive. By default the time limit is set to 2 seconds, and if a CUDA calculation takes longer then Windows will reset the GPU driver. The process is known as Timeout Detection & Recovery (TDR).

The CUDALink documentation linked above describes how to increase the time limit. Note that it is possible to completely disable TDR but this carries the risk that a buggy CUDA calculation could lock up the GPU and Windows will not intervene to reset it, leaving no option other than rebooting the machine.

  • $\begingroup$ Could you provide a more detailed description (link perhaps) to that specific section? $\endgroup$ Commented Dec 15, 2014 at 16:42
  • $\begingroup$ Simon has improved my comment and provide the link,thanks! In addition,I suggest you can use the Intel build-in GPU, for example HD4000, to connect your LCD, and leave the NVida/AMD GPUs for common compute. $\endgroup$
    – sejabs
    Commented Dec 16, 2014 at 9:00

Your Answer

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

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