semantics of flush with a variable list

OpenMP 5.0 will be the next version of the OpenMP specification, which we expect will be officially released in 2018. This technical report is the latest draft of the 5.0 specs for public discussion.

semantics of flush with a variable list

Postby sfsiegel » Mon Sep 03, 2018 7:34 am

Sec. 2.20.8, p.237, lines 5-6:

"A flush construct with a list applies the flush operation to the
items in the list, and does not return until the operation is complete
for all specified list items."

My understanding of flush operations until this point was that
(conceptually) they can take place in the background, concurrently
with the continued execution of the thread, but that they must
"complete" before some specified future time. Here is how it is
described in Sec. 1.4.4:

"When a thread executes a strong flush, no later memory operation by
that thread for a variable involved in that strong flush is allowed to
start until the strong flush completes. The completion of a strong
flush of a set of variables executed by a thread is defined as the
point at which all writes to those variables performed by the thread
before the strong flush are visible in memory to all other threads and
that thread’s temporary view of all variables involved is discarded."

However the sentence on p.237 uses the word "return". What does it
mean to say a flush operation "returns"? For example:

#pragma omp flush(a,b)
x=1;

Does it mean that control cannot reach the statement x=1 until the
flush operations on a and b have completed? That is different than
what I expected, which is that the flush operations can continue
running in the background, but all of them must complete before the
first access to a or b.

I think the word "return" is problematic and that this sentence should
be "The overall flush operation does not complete until all the
individual flush operations on the variables in the list have
completed" or something like that.
sfsiegel
 
Posts: 9
Joined: Mon Mar 24, 2014 4:47 pm

Return to TR7 - OpenMP 5.0 Draft Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron