How to use second card with Cuda?

Hi All,

I’m using a motherboard with the inner videocard GeForce 7025 wich is connected with display.
And installed in the PCI-E slot GeForce GTS 250 with supporting CUDA.
I’m using SDK 3.2 and latest drivers with support CUDA for Windows 7.
But my CUDA kernel still does not work more than 5 seconds…
Can anybody explain me why?

Hi All,

I’m using a motherboard with the inner videocard GeForce 7025 wich is connected with display.
And installed in the PCI-E slot GeForce GTS 250 with supporting CUDA.
I’m using SDK 3.2 and latest drivers with support CUDA for Windows 7.
But my CUDA kernel still does not work more than 5 seconds…
Can anybody explain me why?

Well, I’d say you’re hitting the watchdog timer – but in Windows 7, the timeout is 2 seconds, not 5 (which is what it is in XP). Does it restart the video driver when you run a kernel that lasts longer than 5 seconds? Also, is it occurring for just one specific kernel or for anything that runs for longer than 5 seconds?

Well, I’d say you’re hitting the watchdog timer – but in Windows 7, the timeout is 2 seconds, not 5 (which is what it is in XP). Does it restart the video driver when you run a kernel that lasts longer than 5 seconds? Also, is it occurring for just one specific kernel or for anything that runs for longer than 5 seconds?

Yes, it’s video driver stops the kernel.

And yes, just my specific kernel calculates more than 5 seconds. I want to use the second video card as a separate coprocessor.

Yes, it’s video driver stops the kernel.

And yes, just my specific kernel calculates more than 5 seconds. I want to use the second video card as a separate coprocessor.

You probably need to query your devices in code and then set your CUDA device to the id of the card which does not drive the video. Use cudaDeviceCount to get the number of cards and then cudaGetDeviceProperties to determine which one you want to use. Then use cudaSetDevice to tell CUDA which card to run on.

You probably need to query your devices in code and then set your CUDA device to the id of the card which does not drive the video. Use cudaDeviceCount to get the number of cards and then cudaGetDeviceProperties to determine which one you want to use. Then use cudaSetDevice to tell CUDA which card to run on.

CUDA support started with the 8-series devices, so I don’t think his GeForce 7025 will show up in the CUDA driver calls (e.g., cuDeviceGetCount()). The only thing I can think of is that perhaps there’s a bug in your kernel which is causing an infinite loop (and thus hanging the driver). Have you tried running the code on another machine, or tried using Parallel nSight to debug your code on your machine via another machine?

CUDA support started with the 8-series devices, so I don’t think his GeForce 7025 will show up in the CUDA driver calls (e.g., cuDeviceGetCount()). The only thing I can think of is that perhaps there’s a bug in your kernel which is causing an infinite loop (and thus hanging the driver). Have you tried running the code on another machine, or tried using Parallel nSight to debug your code on your machine via another machine?

Yes, The GeForce 7025 is not supported CUDA, therefore only used for calculations second card.

my kernel works well if the run time is less than 5 seconds…

Of course, I can rewrite the program, but I’d like to understand it even possible to make the kernel work more than 5 seconds in windows 7?

Yes, The GeForce 7025 is not supported CUDA, therefore only used for calculations second card.

my kernel works well if the run time is less than 5 seconds…

Of course, I can rewrite the program, but I’d like to understand it even possible to make the kernel work more than 5 seconds in windows 7?

To test, I used the CUDA Wizzard for VS8 and replaced the kernel on

global static void HelloCUDA(float* dev_s)
{
int n=4096+2048+128;
float s=0;
float fi,fj;
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)
{
fi=i; fj=j;
s=s+sqrt(fi)*sqrt(fj);
}
*dev_s=s;
}

Result is shown below:

CUDA initialized.
Processing time: 2914.549805 (ms)
113953685504.000000

Press ENTER to exit…

If the execution time longer than 3 seconds, the driver stops the program.

To test, I used the CUDA Wizzard for VS8 and replaced the kernel on

global static void HelloCUDA(float* dev_s)
{
int n=4096+2048+128;
float s=0;
float fi,fj;
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)
{
fi=i; fj=j;
s=s+sqrt(fi)*sqrt(fj);
}
*dev_s=s;
}

Result is shown below:

CUDA initialized.
Processing time: 2914.549805 (ms)
113953685504.000000

Press ENTER to exit…

If the execution time longer than 3 seconds, the driver stops the program.

I found solution !
It is simple. I write in registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers
3 lines:

TdrDelay REG_DWORD e10 (3600)
TdrDdiDelay REG_DWORD e10 (3600)
TdrLevel REG_DWORD 0 (0)

So kernel can be working 1 hour :).

Thank you all for helping!

I found solution !
It is simple. I write in registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers
3 lines:

TdrDelay REG_DWORD e10 (3600)
TdrDdiDelay REG_DWORD e10 (3600)
TdrLevel REG_DWORD 0 (0)

So kernel can be working 1 hour :).

Thank you all for helping!