how to direct kernel calls to specific devices?

Hello:
I have two devices installed, on my Fedora 8, x86_64 machine. In theory, the 8600 GTS is used to run the monitor, and the GTX is for CUDA programming.
Device 0: “GeForce 8600 GTS”
Device 1: “GeForce GTX 280”

Can anyone tell me how I can direct CUDA calls to one or the other device? I tried using -arch ‘GeForce 8600 GTS’ with nvcc, but of course that did not work. How do you direct calls to specific devices?

Thanks, John

You have to call cudaSetDevice(int devicenum) to select a device before any other CUDA calls. Otherwise, the first CUDA function you call will pick device 0.

Thanks!!! Worked like a charm.