- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the following code, there is a data race.
I would like to know which compiler option must be turn on in order to see that Intel C++ compiler detects this data race. And what will be the expected message from the compiler.
# pragma omp parallel for {
for ( i=1; i< N; i++){
a(i) = a(i) + a(i – 1)
}
Thanks in advance
Ami
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you compile with -parallel -opt-report this should be flagged as a dependency preventing parallelization and vectorization. OpenMP per se is weak on this point of diagnostics.
Intel Inspector tool should diagnose this at run time. Ideally, with static analysis, it should also be diagnosed without running. Advisor tool should flag this as ineligible for parallelism as it stands.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page