wrong error with omp-collapse

wrong error with omp-collapse

valery w.'s picture

dear all

the following code is producing a wrong error.



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
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)



4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Tim Prince's picture

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.

Steve Lionel (Intel)'s picture

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

Steve Lionel (Intel)'s picture

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


Login to leave a comment.