Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

wrong error with omp-collapse

valery_w_
Beginner
1,195 Views

dear all

the following code is producing a wrong error.

thanks

v

ifort -v
ifort version 14.0.1

cat ifort_14.0.1_collapse.f90
subroutine test
  real :: r(3,3,3)
  integer :: i, j, k
  !$omp do collapse(3)
  do 66 k=1,3
  do j=1,3
  do i=1,3
     r(i,j,k) = 0.0
  enddo
  enddo
66 continue
end subroutine test

ifort -c -openmp ifort_14.0.1_collapse.f90
ifort_14.0.1_collapse.f90(4): error #8194: The COLLAPSE clause requires perfectly nested loops:  no code may appear before or after the loops being collapsed.
  !$omp do collapse(3)
--------^
compilation aborted for ifort_14.0.1_collapse.f90 (code 1)

 

 

0 Kudos
3 Replies
TimP
Honored Contributor III
1,195 Views

I see that this particular problem is associated with the old-style label on the do termination statement.  There are multiple ways the label could be used "illegally" although that's not the case here.

0 Kudos
Steven_L_Intel1
Employee
1,195 Views

Thanks - escalated as issue DPD200250517. As I'm sure you already know, replacing the outer nonblock-DO with a block-DO avoids the error.

0 Kudos
Steven_L_Intel1
Employee
1,195 Views

This has been fixed for a major release later this year.

0 Kudos
Reply