data race in flush_nolist.1.c?

Discuss the OpenMP Examples document, updated for OpenMP 4.5
Post Reply
sfsiegel
Posts: 12
Joined: Mon Mar 24, 2014 4:47 pm

data race in flush_nolist.1.c?

Post by sfsiegel »

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?

Post Reply