Sorry if this question is repeated. My basic doubt is that I have 2 GPUs on my computer, one which I want to dedicate for graphics and the other one to code my scientific applications using CUDA.
One of my friends installed CUDA and disappeared and I require to know of a way to disable one of them. Currently on running the SDK programs, I first get a error like this
Finally the programs run and ends with a Test FAILED (for all them), but I believe its trying to run on both the GPUs. I want to disable one of them. Please help me!
Right now, it’s not running on any GPU. The user you’re running the app with needs permissions to /dev/nvidiactl (so do a sudo chmod 0666 /dev/nvidia*). Disabling one doesn’t really work like this (via permissions)–ensure your code runs on your non-display GPU, and you’re fine.
Thanks for the reply. But how do I ensure it runs only on one GPU? :) I mean do I have to mention something in the code to make it stick to one of them?
On checking out in /dev, I found “nvidia0”, “nvidia1” and “nvidiaact1”. Another question, how do I differentiate amongst them, i.e. check which is which? (some command, instead of pulling out one and checking which is which :)
In Linux, assuming all of your cards are CUDA capable, /dev/nvidia corresponds to CUDA device . You can check what model of card a CUDA device is by running the SDK sample deviceQuery.
Yes, to ensure your app runs on a certain device you need to call cudaSetDevice(N) from your code.