PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Specifying GPUs

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
KarlW



Joined: 12 Jan 2009
Posts: 23

PostPosted: Mon Mar 28, 2011 2:25 am    Post subject: Specifying GPUs Reply with quote

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
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6129
Location: The Portland Group Inc.

PostPosted: Mon Mar 28, 2011 4:13 pm    Post subject: Reply with quote

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
Back to top
View user's profile
KarlW



Joined: 12 Jan 2009
Posts: 23

PostPosted: Mon Mar 28, 2011 10:27 pm    Post subject: Reply with quote

That sounds great, thanks!
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group