Open main menu

CDOT Wiki β

Changes

DPS921/Intel Parallel Studio Inspector

1,156 bytes added, 21:03, 29 November 2020
OMP Race Conditions
== OMP Race Conditions ==
 
The code below attempts to create a race condition using the OMP parallel construct. The race codnition is created by the variable temp, which is supposed to be a local variable for the specific thread which is used to collect the total sum for the calculations done by the thread. however if the variable is put outside the OMP parallel construct it becomes accessible by all the threads and is no longer a local variable. This causes a race condition.
<syntaxhighlight lang="cpp" line='line'>
</syntaxhighlight>
There are two images below, One is an image of the results of an analysis of the above code by the Intel Parallel Inspector which as can be seen has flagged race conditions in the file, however, upon closer examination it becomes apparent that the details about the race conditions are nonsensical and cannot be interpreted (this can be seen by looking at the highlighted portion of the code view). This can be explained by the second image below. Highlighted in that image in the red box a warning message can be seen warning the user that Microsoft OMP is not supported by the Intel Parallel Inspector which might cause false positives or inaccurate diagnostics [[File:OMPRC.jpg]] OMP Error Message Below[[File:OMPWarningOMPError.png|800pxjpg]]
= How to use Intel Parallel Studio Inspector =
150
edits