| View previous topic :: View next topic |
| Author |
Message |
srinath22
Joined: 10 May 2012 Posts: 4
|
Posted: Sat Jan 19, 2013 8:53 am Post subject: cuda fortran subroutines and modules |
|
|
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 |
|
 |
srinath22
Joined: 10 May 2012 Posts: 4
|
Posted: Sun Jan 20, 2013 5:58 pm Post subject: |
|
|
| 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 |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Mon Jan 21, 2013 7:59 am Post subject: |
|
|
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 |
|
 |
|