Changes

Jump to: navigation, search

BetaT

1,454 bytes added, 23:29, 7 April 2017
Windows Display Driver Crash for problem size > 2000 & 2000
To Change the Graphic device timeout, use the following steps.
Exit all Apps and Programs.
Press the WinKey+R keys to display the Run dialog.
Type regedit.exe and click OK to open the registry editor.
Navigate to the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers
With the GraphicsDrivers key selected, on the Edit menu, click New,
and then select the following registry value from the drop-down menu
specific to your version of Windows (32 bit, or 64 bit):
(NOTE: The TdrDelay name is Case Sensitive)
For 64 bit Windows
a. Select QWORD (64-bit) value.
b. Type TdrDelay as the Name and click Enter.
c. Double-click TdrDelay and add 8 for the Value data and clickOK.
The above potential solution did not solve my problem.... The second solution I found was to change one of the properties on the GPU device named: kernelExecTimeoutEnabled;
This property supposedly controls whether or not the device can be timed out. A value of (1) means it can be timed out, while a value of (0) means it is disabled.
 
The above also did not solve my issue with the display driver crashing.
 
==== Solution to Windows Display Driver Crashing ====
 
The best way to prevent this error from happening is to make sure the kernel does not take too long to execute... So I altered my code and switched the Kernel Launch statement from a 2D grid to a 1D grid.
 
This reduced the number of threads firing in the kernel. In the Calculate Kernel which is below you can see the old one had all the threads from the ( y dimension) sitting idle doing nothing except slowing down the execution.
 
 
__global__ void Calculate (float* u, float* un,int nx, int c, float dx, float dt)
{
int j = blockIdx.x * blockDim.x + threadIdx.x;
 
int i = blockIdx.y * blockDim.y + threadIdx.y;
 
float total = c*dt / dx;
in registry to 64, prints out: cuda programming application has been blocked from accessing graphics hardware if (i < nx && j < nx) { for (int it = 1; it <= nx- 1; it++) { if (i != 0 || i < nx ) { un[i * nx + it-1] = u[i * nx + it-1]; __syncthreads(); u[it] = un[1 * nx + it - 1]; __syncthreads(); u[i * nx + it ] = un[i * nx + it- 1] - total * (un[i * nx + it - 1] - un[(i - 1) * nx + it - 1]); __syncthreads(); } } }
212
edits

Navigation menu