PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

muti-gpu via using OpenMP

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
addison827



Joined: 02 Nov 2010
Posts: 12

PostPosted: Thu Jan 23, 2014 12:25 am    Post subject: muti-gpu via using OpenMP Reply with quote

How can I use OpenMP to do the multi-gpu computing (applying CUDA) in a share memory processing system? Plus, please kindly offer a simple example. It will be much more easy to understand. Thanks a lot.
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Jan 23, 2014 11:55 am    Post subject: Reply with quote

Hi addison827,

For multi-GPU programing using CUDA Fortran I generally recommend using MPI rather than OpenMP. Managing the data and GPU contexts in OpenMP can be tricky to get correct given OpenMP assumes all threads share the same memory system. Since a GPU's memory is discrete, you need to manage this yourself. Domain decomposition across discrete memory system is a natural part of MPI programming making it much simpler.

While this article is a bit old, the concept should still be relevant: http://www.pgroup.com/lit/articles/insider/v3n3a2.htm. The only thing missing is using a GPUDirect-aware MPI which was just starting to be discussed when I wrote the article. I do have an OpenMP version of this code I can send you, if you can't use MPI for some reason.

- Mat
Back to top
View user's profile
addison827



Joined: 02 Nov 2010
Posts: 12

PostPosted: Thu Jan 23, 2014 7:02 pm    Post subject: Reply with quote

Hi, Mat
Thanks for your help. I do realize the parallel performance of MPI is better than OpenMP for the complex cases. However, I really prefer to use OpenMP. Could you please kindly send me the OpenMP version of this example? It will be helpful. Thanks again.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling 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