Selecting device

Hi,

I have access to a machine that has two GPU’s. I thought that if I run two processes then they would automatically select different GPU’s. But that is not happening. Do we have to make the code select the GPU every time?

Do we have to make the code select the GPU every time?

Yes. The run time has no way of knowing how many running processes might use a GPU, hence, the user needs to select the device. Otherwise, the default device is used.

  • Mat

Thanks Mat.

Actually I wanted something like this. I only found this now.

http://stackoverflow.com/questions/33092509/pgi-openacc-target-specific-gpu-device

Ok. That’s what I mean by user selected. Either a environment variable is set or the device is selected in the code via a call to the runtime.