OpenACC Fortran arrays within an array of derived type

Hi,

I’ve noticed that the following line is present in the “PGI: OPENACC GETTING STARTED GUIDE” since 2015:

“Arrays of derived type, where the derived type contains allocatable members, have not been tested and should not be considered supported for this release. That important feature will be included in an upcoming release.”

I’ve searched the forum and I’ve seen only tangential references to this feature.This feature would be really useful.

Is there an estimate for which upcoming release might support it?

Thank you,
Jake

Hi Jake,

Yes, we should probably update that section in the getting started guide. Support for this has been available for a few years. There’s actually a few different methods for this.

  • Manual Deep Copy

This is where the user uses OpenACC unstructured data regions to perform a deep copy of the derived type. See: Deep Copy Support in OpenACC | PGI

  • Compiler aided deep copy.

Using the flag “-ta=tesla:deepcopy”, the compiler will perform the deep copy of the derived type for you when a variable of the type is used in a data clause.

  • True deep copy

As a beta feature in 18.7 and 18.10 , we’ve implemented the proposed OpenACC 3.0 standard’s deep copy features, i.e. the “shape” and “policy” directives. See: True OpenACC Deep Copy Beta | PGI

Hope this helps,
Mat

Thank you, Mat. This is exactly what I was looking for.