bug in ifort highly suspected

bug in ifort highly suspected

I wrote an ultra-simple fortran program which gives different outputs depending on compiler (ifort or gfortran). In additional I believe the ifort's output to be fraud.

the program is:

program A
integer :: alfa, i,levels
!$omp parallel do collapse(2) private(alfa,i) default(shared)
do alfa=1,10
do i=(-levels),levels
print *,i,alfa,levels
end do
end do
!$omp end parallel do
end program A

This should produce (60*2+1)*10 output lines, however the output when using ifort compiler is just:

-60 1 60
-59 1 60
-58 1 60
-57 1 60
-56 1 60
-55 1 60
-54 1 60
-53 1 60
-52 1 60
-51 1 60

Compilation using gfortran returns all 1210 lines.

Is there something extremely easy that I am missing? I noticed that
do i=(-levels),levels
do i=-levels,levels

makes ifort-compiled version return 1210 lines as well.

Both and 12.1.??? have been tried.

Mateusz cki

7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I note that the combination of OpenMP collapse with the parentheses exhibits this bug. collapse seems not well supported.

I suppose that "(Intel)" means you are Intel's employee - it is true?

Did you confirm that the described phenomenon really exists (ie it is not merely a result of corrupted library path etc/ different compiler versions conflict?) and it really is a bug?

Mateusz cki

Yes, I work for Intel, and I saw the problem you pointed out in the corresponding Windows compiler as well.

Good day,I got stange output with the ifort 12.0.3 and 12.1.2 if I type (-levels).In this case alfa is wrong on output.I compiled withFC := ifort -g -traceback -check all -std08 -parallel -openmpBest, Oleg.

Tim does work for Intel, but is not part of the support team. He is a valuable contributor to these forums.

I can reproduce the problem - it seems related to the use of the COLLAPSE clause. I will report this to the developers. Issue ID is DPD200178142.

Retired 12/31/2016

A fix has been found for this issue. We are planning to include it in the next update which is currently scheduled for mid-July.

Leave a Comment

Please sign in to add a comment. Not a member? Join today