Hi Julian,
If I understand Deepak's comment (on OpenMP.org's omp-lang list, sorry
it is a nonpublic list) correctly, the following wording implies that a
'from: s.w[z:4]' for a pointer 's.w' also implies a mapping of 's.w' -
if 's' is used inside the target region and, thus, gets implicitly mapped.
[TR11 157:21-26] (approx. [5.2 154:22-27], [5.1 352:17-22], [5.0 320:22-27])
"If a list item with an implicit data-mapping attribute does not have any
corresponding storage in the device data environment prior to a task encountering the
construct associated with the map clause, and one or more contiguous parts of the
original storage are either list items or base pointers to list items that are explicitly
mapped on the construct, only those parts of the original storage will have corresponding
storage in the device data environment as a result of the map clauses on the
construct."
Thus, the following change should not be required – but if I undo it, I see a
libgomp runtime error. Hence, it looks as if you need to fix this:
On 18.10.22 12:39, Julian Brown wrote:
--- a/libgomp/testsuite/libgomp.c/target-22.c
+++ b/libgomp/testsuite/libgomp.c/target-22.c
@@ -21,7 +21,8 @@ main ()
s.v.b = a + 16;
s.w = c + 3;
int err = 0;
- #pragma omp target map (to:s.v.b[0:z + 7], s.u[z + 1:z + 4]) \
+ #pragma omp target map (to: s.w, s.v.b, s.u, s.s) \
+ map (to:s.v.b[0:z + 7], s.u[z + 1:z + 4]) \
map (tofrom:s.s[3:3]) \
map (from: s.w[z:4], err) private (i)
Thanks,
Tobias
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634
München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas
Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht
München, HRB 106955