CUDA and other applications running simultaneously. CUDA simulation makes the rest of the system unu

Hello every body!

I am currently doing some simulations using CUDA for my research in Physics. Those simulations run on my laptop (on Ubuntu). They run fine and all, no problems on that side. The problem is that, during the typical 10 minutes of one of those simulations, I cannot do anything else on the computer. It is just completely unresponsive. I get everything back when the simulation is finished, but I would like to be able to continue to work on the computer as the simulation run. So my question is: Do you know a way to limit the speed of a CUDA application, so that the system can continue to use the graphic card for its own business?

Thanks in advance.

Is this one kernel that takes 10 minutes to run? And are you using the GPU to provide display as well as CUDA?
If so, then your computer really isn’t frozen… just the X display is.

Three solutions are to use a second card for display (tough on a laptop), break up your kernel into millisecond slices and call it millions of times (this can be practical) or to run Linux without the X server. The last option is likely the easiest.

It doesn’t work like that. The display driver and CUDA can’t “share” the card. Either your CUDA code has 100% of the GPU resources, or the display driver does. There is no intermediate state. So if you need the display to be responsive, you need to limit individual kernel call durations to be very short, and maybe even inject some host side delay between kernel calls to ensure that the GPU is released to the display driver often enough and for long enough to ensure that regular screen redraws occur.

No, a kernel takes around 30 seconds to run, but I could break it in smaller parts. The GPU is also providing display as well as CUDA, since it is on my laptop. We might get rigs specifically for GPU computing in the future, but it is not yet the case… Linux without X might be easy but it will make it more difficult for me to work on my laptop, well I prefer graphical interfaces ^^

So I will go for the second option, thanks a lot for your help!