| View previous topic :: View next topic |
| Author |
Message |
goblinsqueen
Joined: 04 Feb 2010 Posts: 14
|
Posted: Mon Mar 08, 2010 7:04 am Post subject: mixing openmp and CUDA fortran |
|
|
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 |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Mon Mar 08, 2010 1:37 pm Post subject: |
|
|
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 |
|
 |
goblinsqueen
Joined: 04 Feb 2010 Posts: 14
|
Posted: Tue Mar 09, 2010 1:28 am Post subject: |
|
|
Hi Mat,
thank you very much! I'll try it! |
|
| Back to top |
|
 |
|