Admin Production ni-theme
Current Publication

Using Synchronization to Avoid Data Conflicts

LabWindows/CVI

Using Synchronization to Avoid Data Conflicts

Because the OpenMP structure uses shared variables to communicate between threads, different threads might try to read or write to the same variable. You can control access to shared variables in parallel regions, and avoid data corruption and race conditions, by using OpenMP directives to synchronize the variable access.

In addition to the previous directives, OpenMP provides locking functions you can use to synchronize data in variables.

Related Topics

Creating Parallel Regions

Communicating between Threads and Sharing Data

Troubleshooting OpenMP Issues

OpenMP Terminology

References to Other OpenMP Resources