Data Sharing Problems
- Modify the sources to fixincidentalor accidental data sharing by privatizing shared data use. This type of data sharing occurs when tasks use the same memory location, but do not communicate about using that memory location. If the data written by one is not needed by the other, each task could use a private copy of the data.
- Add lock annotations to implement synchronization forindependent updates. This type of sharing occurs when multiple tasks contribute to determining the final value of a memory location.
- Recognize that the order of the operations cannot change, and consider modifying the chosen parallel sites and their tasks. When shared data access must occur in the original sequential order, this is calledtrue dependence.