PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

cuda fortran subroutines and modules

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



Joined: 10 May 2012
Posts: 4

PostPosted: Sat Jan 19, 2013 8:53 am    Post subject: cuda fortran subroutines and modules Reply with quote

Is it necessary to encapsulate all cuda fortran subroutines within a module?

Can it be in the main program via a "contains" statement?

Thanks.
Back to top
View user's profile
srinath22



Joined: 10 May 2012
Posts: 4

PostPosted: Sun Jan 20, 2013 5:58 pm    Post subject: Reply with quote

I ask this because I noticed a significant decrease in OpenMP performance with the Intel compiler when I use modules. I'm wondering if the Cuda Fortran will retain or increase performance if subroutines are in module; maybe and ease of loading to the GPU.
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Jan 21, 2013 7:59 am    Post subject: Reply with quote

Hi srinath22,

CUDA Fortran "global" kernels need only have an interface which can be explicitly defined. Putting the kernels in a module makes it more convenient since interface are implicit

However, in order to call "device" routines, both the "global" and "device" must be in a module.

- Mat
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