On 10/03/2016 07:59 AM, Jakub Jelinek wrote:

> with -fopenmp.  The var is actually properly allocatable in the latter case,
> while it is not with your patch on the first testcase, you just copy over the 
> host pointer, that
> is definitely not going to work on non-shared memory offloading.

I think that's the expected behavior in OpenACC. Basically, unless
pointers have explicit data clauses with subarray arguments, the
compiler is supposed to treat those pointers as "scalars" and not remap
the contents of the pointer.

Chung-Lin, maybe this issue with allocatable data along with a different
void will persuade the OpenACC technical committee update the implicit
data mapping behavior of pointers. Can you raise this issue with the
OpenACC technical committee?

> There is nothing special about references that use POINTER_TYPE as opposed
> to REFERENCE_TYPE.  So, please first get this working with firstprivate on
> allocatables and only then start to play with reductions.

I agree something like that would be better. Is OpenMP supposed to
implicitly map the allocated data on the accelerator too?

Cesar

Reply via email to