Closed josemonsalve2 closed 2 months ago
Neither Cray nor GNU support this OpenMP-5.0 feature
GNU won't be OpenMP 5.0 feature-complete (at least on the front end) until at least GCC 10. Not that I'm disagreeing with your statement that lack of this feature would be a showstopper, instead I am just setting expectations.
Regarding the example:
#pragma omp target teams distribute parallel for map(tofrom:arr, arr.data[0:SZ])
for (int i=0; i<arr.len; ++i)
arr.data[i] += 1.0;
I don't know whether that's valid OpenMP 5 or not; however, GCC 7 to 10 all accept the following: map(tofrom:arr.len, arr.data[0:SZ])
– which should be valid OpenMP 4.5. The original version is rejected with error: ‘arr’ appears more than once in map clauses
. (Namely, specifying the whole struct plus components is rejected while specifying multiple component references is accepted.)
Regarding GNU/GCC:
We have enough coverage of pointer mapping and attachment in the V&V now.
In terms of future extensions to the SOLLVE test-suite. I think it would be useful to have a simple test to ensure that the compiler supports pointer attachment, e.g.
Neither Cray nor GNU support this OpenMP-5.0 feature and it is a showstopper for many applications.
Also, I think it would be useful to have a test which maps a dynamically allocated 2D array to the device. I have only been successful using Clang and IBM compiler to do this. This is a frequent request by application teams, especially those new to GPUs.