Community
cancel
Showing results for 
Search instead for 
Did you mean: 
lacek
Beginner
87 Views

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
levels=60
!$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
changing
do i=(-levels),levels
into
do i=-levels,levels

makes ifort-compiled version return 1210 lines as well.

Both 12.0.1.107 and 12.1.??? have been tried.

Regards,
Mateusz cki

0 Kudos
6 Replies
TimP
Black Belt
87 Views

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

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?

Regards,
Mateusz cki
TimP
Black Belt
87 Views

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

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 with
FC := ifort -g -traceback -check all -std08 -parallel -openmp
Best, Oleg.
Steven_L_Intel1
Employee
87 Views

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.
Anonymous66
Valued Contributor I
87 Views

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.

Reply