PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

mixing openmp and CUDA fortran

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



Joined: 04 Feb 2010
Posts: 14

PostPosted: Mon Mar 08, 2010 7:04 am    Post subject: mixing openmp and CUDA fortran Reply with quote

Is it possible to use openmp and CUDA fortran in the same code?
For example, is it possible to parallelize the outer loop with openmp, and the inner one with CUDA?
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Mar 08, 2010 1:37 pm    Post subject: Reply with quote

Hi goblinqueen,

You should be able to use OpenMP in CUDA Fortran. However, the OpenMP directives can only be used in host code. Also, you will need to use the "cudaSetDevice" function in your OpenMP region to set which thread gets which device.

Hope this helps,
Mat


Last edited by mkcolg on Tue Mar 09, 2010 8:26 am; edited 1 time in total
Back to top
View user's profile
goblinsqueen



Joined: 04 Feb 2010
Posts: 14

PostPosted: Tue Mar 09, 2010 1:28 am    Post subject: Reply with quote

Hi Mat,
thank you very much! I'll try it!
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