OpenMP-Validation-and-Verification / OpenMP_VV

OpenMP Offloading Validation & Verification Suite; Official repository. We have migrated from bitbucket!! For documentation, results, publication and presentations, please check out our website ->
https://crpl.cis.udel.edu/ompvvsollve/
Other
54 stars 19 forks source link

NERSC Some requests from them #38

Closed josemonsalve2 closed 2 months ago

josemonsalve2 commented 4 years ago

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.

#define SZ 10
struct Array1D {
  double *data;
  int len;
};
#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;

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.

dmcdougall commented 4 years 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.

tob2 commented 4 years ago

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:

spophale commented 2 months ago

We have enough coverage of pointer mapping and attachment in the V&V now.