[Omp] 2 threads writing to shared variable

NovaElf novaelf at hotmail.com
Sun Nov 13 10:24:11 PST 2005


Hi! I have a question concerning multiple threads writing to a shared 
variable.
If 2 threads write different values to a shared variable, then encounter an 
implicit flush, how do we know what is the final value? Is it the job of the 
programmer to prevent this from happening, ie through #omp critical or #omp 
atomic?

Thanks in advance!

_________________________________________________________________
Find just what you are after with the more precise, more powerful new MSN 
Search. http://search.msn.com.sg/ Try it now.





More information about the Omp mailing list