Limit GPU Percent Usage

I’m very new to CUDA programming (and I’m not a software engineer of any kind either), and I’m trying to customize some CUDA code that renders fractal flames (called Flam4CUDA; source code is available in C++ using svn command “svn co https://flam4.svn.sourceforge.net/svnroot/flam4 flam4”). That code works great, but it really causes the temperatures of the GPUs to skyrocket (obviously). I have two GTX 570s, and at 90% load (about the max I’ve seen), the temps on GPU0 gets to 95C with fan at 92%. I’m able to limit the GPU percent usage simply by running another program (doesn’t matter what it is) that uses the CPU at a higher priority than Flam4CUDA. Right now I have each GPU running at 50% load, but still seeing 80C on GPU0. I’m wondering if there is any way to programmatically control GPU load? I’d like to create an option in the program that allows me to set a maximum load in percent. If you look at the source code, it would be awesome if you could indicate where this code might go, but otherwise maybe just an overview of any commands that might do this? Thanks!

Just downclock the card. That’s the simplest way I could think of.

Can that be done from a user program, though?

I’d think the simplest way would be to put a timing loop on the CPU side, much the same as you’d limit your frame rate when doing graphics. That is, given the mechanics of human perception there’s no reason (except bragging) to do more than about 25 fps.