Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are derived types containing allocatable arrays supported in any existing OpenACC compilers?

Are there any OpenAcc compilers that support the copying of derived types containing allocatable arrays to/from the GPU and their use in accelerated code?

The OpenACC spec (v2.0) states this is possible, but I'm unable to find it implemented in a compiler anywhere. The PGI compiler supports derived types, but seemingly not those containing allocatable arrays (see this page on the PGI forum). While this may have changed since them, it doesn't seem to be publicised (well) anywhere.

like image 419
mjm26 Avatar asked Feb 04 '14 12:02

mjm26


1 Answers

For now I'm unable to access the Cray or CAPS compilers, and the PGI compiler does not support this functionality. A suitable workaround seems to be to create a pointer to the allocatable array within the derived type and copy that to the GPU using the copy clause. If future versions of the PGI compiler support this kind of deep copy then I'll update the answer.

like image 115
mjm26 Avatar answered Nov 07 '22 05:11

mjm26