- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I believe the following code produces an incorrect result:
program main !$ use omp_lib integer a,i !$omp parallel !$omp master do i=1,10 !$omp task firstprivate(i) if(i>5) depend(inout:a) write(*,*) '--->',i !$omp end task enddo !$omp end master !$omp end parallel end program
What happens is the undeferred tasks (those for which the IF clause evaluates to false) are not executed at all, i.e., the code prints:
---> 6
---> 7
---> 8
---> 9
---> 10
The problem disappears if either the IF or DEPEND clause are removed.
I have observed this problem with ifort 15.0.2 and 16.0.1. gfortran 4.9.3 produces the correct result.
Can the developers confirm this is a bug?
Thanks,
Theo
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Theo,
We agree this appears to be a bug. It has been escalated to the compiler developers to fix; we'll let you know when a compiler containing a fix becomes available. Thanks for the report and clear test case!
Martyn Corden
Intel Developer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Theo,
A fix has been found for this issue and it should be available in the next update to the version 16 compiler.
The issue is also fixed in the latest version 17.0 beta compiler, if you have access to that. The fix will also be in the version 17.0 release.
Martyn Corden
Intel Developer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The 16.0 update 4 compiler (16.0.4.210) from Intel Parallel Studio XE 2016 containing this fix is now available from the Intel registration center, as is the 17.0 compiler release from Intel Parallel Studio XE 2017. Please let us know if these don't work as you expect.

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