Search found 12 matches

by sfsiegel
Tue May 19, 2020 9:57 am
Forum: TR8 - OpenMP 5.1 Draft Discussion
Topic: definition of data race
Replies: 0
Views: 38928

definition of data race

The definition of data race is given in Sec. 1.4.1: If multiple threads write without synchronization to the same memory unit, including cases due to atomicity considerations as described above, then a data race occurs. Similarly, if at least one thread reads from a memory unit and at least one thre...
by sfsiegel
Mon May 18, 2020 6:26 pm
Forum: OpenMP 5.0 Examples Discussion
Topic: does mom_model.2 have data races?
Replies: 0
Views: 37959

does mom_model.2 have data races?

Here is the discussion of mem_model.2 in its entirety: The following example demonstrates why synchronization is difficult to perform correctly through variables. The value of flag is undefined in both prints on thread 1 and the value of data is only well-defined in the second print. But isn't it tr...
by sfsiegel
Mon May 18, 2020 6:15 pm
Forum: OpenMP 5.0 Examples Discussion
Topic: mem_model.1: semantics of data race
Replies: 0
Views: 29267

mem_model.1: semantics of data race

The discussion of mem_model.1.c states "…at Print 1, the value of x could be either 2 or 5,…".
But, since the program has a data race, aren't the semantics completely unspecified?
Can you really conclude that x could be 2 or 5?
by sfsiegel
Mon Jan 28, 2019 2:50 pm
Forum: OpenMP 4.5 Examples Discussion
Topic: data race in flush_nolist.1.c?
Replies: 0
Views: 44643

data race in flush_nolist.1.c?

In flush_nolist.1c, isn't there a data race in function f1 on “*q=1” ? This can be executed by all threads concurrently, and in all threads, q points to the shared variable j. Also, a thread could be executing "sum += j" in function g while another thread is executing "*q=1" --- isn't that also a po...
by sfsiegel
Wed Sep 05, 2018 1:47 pm
Forum: TR7 - OpenMP 5.0 Draft Discussion
Topic: race conditions vs. data races
Replies: 0
Views: 31150

race conditions vs. data races

Sec. 2.20.7, p233, lines 20-21: "To avoid race conditions, all accesses of the locations designated by x that could potentially occur in parallel must be protected with an atomic construct." I think "race conditions" should be "data races". They are two different things. See for example https://blog...
by sfsiegel
Mon Sep 03, 2018 7:39 am
Forum: TR7 - OpenMP 5.0 Draft Discussion
Topic: claim that relaxed consistency can sometimes be ignored
Replies: 0
Views: 31270

claim that relaxed consistency can sometimes be ignored

Sec. 1.4.6, p28: "OpenMP programs that: • do not use non-sequentially consistent atomic directives, • do not rely on the accuracy of a false result from omp_test_lock and omp_test_nest_lock, and • correctly avoid data races as required in Section 1.4.1 on page 22 behave as though operations on share...
by sfsiegel
Mon Sep 03, 2018 7:37 am
Forum: TR7 - OpenMP 5.0 Draft Discussion
Topic: clarification on incorrect example of flushing
Replies: 0
Views: 30811

clarification on incorrect example of flushing

In the incorrect example on p. 238: Are the flush statements all strong flushes? I assume this is the case, since they use variable lists, but the use of pseudocode rather than the more precise actual code made me a little unsure. It would be nice to state this explicitly. Adding to this confusion i...
by sfsiegel
Mon Sep 03, 2018 7:34 am
Forum: TR7 - OpenMP 5.0 Draft Discussion
Topic: semantics of flush with a variable list
Replies: 0
Views: 31113

semantics of flush with a variable list

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 ...
by sfsiegel
Mon Sep 03, 2018 7:32 am
Forum: TR7 - OpenMP 5.0 Draft Discussion
Topic: Basic questions on semantics of release and acquire flushes
Replies: 0
Views: 30613

Basic questions on semantics of release and acquire flushes

According to Sec. 2.20.7 (atomic construct), if thread 1 executes #pragma omp atomic write release x=1; then thread 1 performs the following operations, in order: 1. a release flush, which completes, then 2. the assignment x=1, then 3. a strong flush on x, which could complete some time in the futur...
by sfsiegel
Mon Sep 03, 2018 7:30 am
Forum: TR7 - OpenMP 5.0 Draft Discussion
Topic: clarify sentence on semantics of release flush?
Replies: 0
Views: 16763

clarify sentence on semantics of release flush?

Sec. 1.4.4, p25: "A release flush guarantees that any prior operation that writes or reads a shared variable will appear to be completed before any operation that [1] writes or reads the same shared variable that [2] follows an acquire flush with which it [3] synchronizes (see Section Section 1.4.5 ...