Errors in the specification

Comments on OpenMP Technical Reports 2 and 3 (November 2014) (Read Only)
Forum rules
The OpenMP Forums are now closed to new posts. Please visit Stack Overflow if you are in need of help:
Posts: 4
Joined: Mon Dec 15, 2014 2:55 am

Errors in the specification

Post by psxlover »

I first encoundered these errors in the OpenMP 4.0 specification, but since they exist in the draft for OpenMP 4.1 (TR3) I guess this is the proper forum to report.
  • [P]age 43 [l]ine 5 in PR3.pdf (page 41 line 5 in OpenMP4.0.0.pdf): "first elements" should be "first element"
  • p38 (p38): "omp_get_active_levels()" --> "omp_get_active_level()"
  • proc_bind clause is missing from the OpenMP C/C++ grammar. It should probably be in "unique-parallel-clause" page 279 (269).
  • p281 l28 & l30 (p271 l16 & l18) says that "simd-clause" has "uniform" and "inbranch" clauses, but not according to page 70 (68). It was probably copy pasted from "declare-simd-clause". It's also missing "safelen", "data_privatization_clause", and "data_privatization_out_clause" according to page 70. "safelen", "linear_clause" and "aligned_clause" should probably be in a "unique_simd_clause" and used instead of "simd_clause" in combined directive clauses like "for_simd_clause".
  • p282 l23 (p272 l16) lists "data-reduction-clause" as a "declare-simd-clause", which isn't according to p74 (p72). It was probably copied from "simd-clause".
  • p70 l11-12 (p68 l10) "linear" and "aligned" take a "list" while in p74 l12-13 (p72 l10) they take "argument-list" as arguments. Linear also has "linear-step" in the first one and "constant-linear-step" in the second.
  • "declare-simd-construct" found in p282 l11 (p272 l4) isn't called at all. It should probably be in p292 l12 (p282 l11) instead of "declare-simd-directive"
  • p277 l22-24 (p267 l4-7) "declaration-definition" and function-statement" have wrong indentation. They should have one tab less, now it seems as if they are part of "statement".
  • Not really an error but p283 l12 (p273 l 10) "target-data-clause" is identical to p283 l 29 (p274 l1) "target-clause". Perhaps they should be combined.
  • p284 l3 (p274 l6) "target-update-directive" is followed by a "structured-block". According to p96 chapter 2.10.3 (p81 chapter 2.9.3) and the "OpenMP 4.0 Summary Card - C/C++" (OpenMP-4.0-C.pdf) there is no "structured-block".
  • p285 l27 (p276 l10) is missing "simd". It should be "#pragma omp distribute parallel for simd distribute-parallel-for-simd-clause optseq new-line".
  • p286 l2 (p276 l23) it has "iteration-statement" while in p123 (p101) and in OpenMP-4.0-C.pdf it has "structured-block"
  • p287 l17 (p278 l4) is missing "target". It should be "#pragma omp target teams distribute parallel for target-teams-distribute-parallel-for-clause optseq new-line". (Who though combining 5 constructs in the same line was a good idea? As if anyone is going to remember the correct order of such a construct...)
  • p279 l25 why is there a "collapse-clause" in parallel? (I only noticed it because I was going to say that collapse is defined in three different clauses while it should have it's own clause, which was fixed in TR3
  • p291 l5 (p281 l1) "taskgroup-construct" is not used anywhere in the grammar. Where should it be?
  • p291 l13 (p281 l7) according to p141 l18 (p127 l10) an "atomic" construct followed by "structured-block" must have a "capture" clause. In the grammar it seems like it's optional.
  • In p145 l23 (p131 l 17) it says that "atomic-clause" and "seq-cst-clause" can appear in any order and may optionally separated by a comma. That's not possible with the grammar in p291 l15 (p281 l11).
  • p291 l31 (p281 l27) "cancel-directive" does not appear anywhere else in the grammar. It should probably be in p279 l7 (p268 l16) "openmp-directive".
  • p292 l7 (p282 l7) same as above for "cancellation-point-directive".
  • "teams-clause", "distribute-clause" and "parallel-for-clause" contain "data-privatization-clause" and "data-privatization-in" leading to conflicts in their combined clauses.
  • Both "teams-clause" and "parallel-for-clause" contain "data-default-clause", "data-sharing-clause" and "data-reduction-clause" leading to conflicts in their combined clauses.
  • "simd-clause", "distribute-clause" and "unique-for-clause" contain "collapse-clause" leading to conflicts in their combined clauses
  • Both "unique-parallel-clause" and "target-clause" contain "if-clause" leading to conflicts in their combined clauses. "target-clause" should probably contain "unique-target-clause" (which will contain "device-clause" and "map-clause") and "if-clause".
p37 l1 why is the default value of "cancel-var" false? Cancels should work unless the user instructs otherwise, not only when the user sets the Enviromental Variable.

Finally "OpenMP 4.0 Summary Card - C/C++" (OpenMP-4.0-C.pdf) is missing #pragma omp taskgroup. Also a bit of topic but there is no example for "declare reduction".