data race in flush_nolist.1.c?

Discuss the OpenMP Examples document, updated for OpenMP 4.5

data race in flush_nolist.1.c?

Postby sfsiegel » Mon Jan 28, 2019 2:50 pm

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 possible read-write data race?
sfsiegel
 
Posts: 9
Joined: Mon Mar 24, 2014 4:47 pm

Return to OpenMP 4.5 Examples Discussion

Who is online

Users browsing this forum: No registered users and 1 guest