Hi Chung-Lin,

Chung-Lin Tang wrote:
The handling of iterator maps in libgomp is mostly inside gomp_map_vars*, where 
the header is processed and the correct data addresses are created and returned.

For host-fallback and shared-memory device cases, due to gomp_map_vars() 
skipped and not called there, we need to add in such handling before the 
child/task function is called (similar to the firstprivate copying we have 
right now)

Technically, that's only a problem for 'x[i]' as iterated
variable – and not for 's.x[i]' but, obviously, we do not
know this at run time.

* * *

I think the patch is OK – but I believe you also need to
handle reverse offload →gomp_target_rev.

Namely, something like: int A[10]; #pragma omp target map(A) { ... A[...] = ... #pragma omp target device(anchestor:1) map(iterator(i=...), always, to :: A[i]) { if (A[i] != ...) __builtin_abort (); } } Can you check that part as well? Tobias

Reply via email to