MultiGPU usage

I have a computer with a video card Quadro NVS295 and 4 GPU TESLA C2075. I have installed cuda 6.5 toolkit, the drivers NVIDIA and apparently the system is OK. But if an user is using the GPU 1 TESLA
no other users can utilize the GPU’s. It seems that the only running GPU is the first. Do you know how I can force the use of a given GPU (the second or the third for example)?
the command nvidia-smi show all the GPU’s with their percentage of usage.
Thank you


From within a CUDA program, you can use cudaSetDevice() to use a particular device.

From the command line, you can cause re-enumeration of the devices using the CUDA_VISIBLE_DEVICES environment variable.

I am assuming linux here.

For example, if user 1 wants to use the first GPU, they could do:


User 2 could then run the same app on a different GPU with:


more information on the environment variable:

There are various cluster job schedulers that can handle this for you also.

It’s OK. Thank you very much.