ordered region, ordered construct

Comments and discussion of the 4.1 OpenMP Draft specifications. Comment period ends September 30, 2015. See http://openmp.org/wp/openmp-specifications/ to download the specifications. (Read Only)
Posts: 73
Joined: Mon Jul 27, 2015 4:50 pm

ordered region, ordered construct

Post by fewl9012 »

page 162:3 "The ordered construct specifies a structured block in a loop region that will be executed in the order of the loop iterations."
However, the omp ordered depend() construct isn't a structured block. Moreover, with
#pragma omp for ordered(1)
a[i] = b[i] + 1;
#pragma omp ordered depend(source)
c[i] = c[i] + 1;
#pragma omp ordered depend(sink:i-2)
d[i] = a[i-2];

There is no structured block that is guaranteed to execute in iteration order. Is there an ordered region at all?

Second point, can there be more than one 'omp ordered depend(source)' in a loop iteration?

Can there be an 'omp ordered threads' region AND 'omp ordered depend()' doacross loop? The former requires the 'ordered' clause on the loop directive without the parameter, and the latter requires the ordered clause with a parameter.

Speaking of which, the ordered clause without a parameter 'is equivalent to the ordered clause with a parameter value of one specified' (page 57:26) which seems to conflict with requiring a parameter or requiring no parameter.