OpenMP Threadprivate in CUDA Fortran

Hi,

Can I declare a device allocatable array as Threadprivate in CUDA Fortran? If yes, can you please show this through an example. I am using PGI version 12.9.

If not, how can I map a CPU ThreadPrivate declared Array to a GPU Array?
Any direct mechanism to do that?

Thanks in advance.

N.B.:- Same query posted in “Accelerator Programming” forum, so re-posting in more relevant forum.

Hi Balkrishna,

Sorry, but no device allocatable array can not be Threadprivate. They can be put in a private clause for an OpenMP region provided that you do the allocation within the parallel region and after the context to the device has been created.

  • Mat