Specifying GPUs

Hi all,

Is anybody aware of a modification/combination of acc_get_num_devices() and acc_set_device_num() that will allow specification of only devices with specific capabilities?

For example, if you have a machine with multiple GPUs: (GPU 0 = onboard graphics, GPUs 1-4 = Tesla T10s) and you only want to run on the T10s.

I currently get around this by adding an offset of +1 to the identifier used in acc_set_device_num(). However, this breaks the code when applied to a machine with no multiple discrete GPUs and no onboard graphics.

Many thanks!

Karl

Hi Karl,

If you were using CUDA Fortran, you could use the cudaGetDeviceProperties and cudaChooseDevice routines. However, in the PGI Accelerator Model there isn’t a method to do this, at least not yet.

Let me ask if this might be something we can add. Given that there is a CUDA routine already, it may not be too hard to add. The difficulty would be present it in a generic way for all Accelerators rather than something NVIDIA specific.

Thanks,
Mat

That sounds great, thanks!