Software Archive
Read-only legacy content
17061 Discussions

-assume contiguous_assumed_shape and contiguous keyword not working

Najeeb_A_
Beginner
454 Views

Hi,

I am trying to vectorize the following loop. The loop is defined inside a subroutine using shape arrays. I am using -assume contiguous_assumed_shape as well as contiguous keyword but the compiler still gives me 'strid is unknown to compiler' in the optimization report. Any suggestions are highly appreciated.

Compiler Options: -qopenmp -O3 -align array64byte -assume contiguous_assumed_shape -xMIC-AVX512 -qopt-report=5 -g

Fortran Compiler version: ifort (IFORT) 18.0.0 20170811

real(KIND=8), dimension(:,:), CONTIGUOUS   :: a, b, c
real(KIND=8), dimension(:,:), CONTIGUOUS :: rr


 integer :: nz, nvar, startindx, endindx

do j = startindx, endindx
      do k = 2, nz
         rr(k,j) = rr(k,j) - b(k,j)*rr(k-1,j)
      enddo
      rr(nz,j) = a(nz,j)*rr(nz,j)
enddo

Optimization Report:

LOOP BEGIN at ../src/test.f90(22,7)
   remark #15335: loop was not vectorized: vectorization possible but seems inefficient. Use vector always directive or -vec-threshold0 to override
   remark #15329: vectorization support: non-unit strided store was emulated for the variable <rr(k,j)>, stride is unknown to compiler   [ ../src/test.f90(24,10) ]
   remark #15328: vectorization support: non-unit strided load was emulated for the variable <rr(k,j)>, stride is unknown to compiler   [ ../src/test.f90(24,20) ]
   remark #15328: vectorization support: non-unit strided load was emulated for the variable <b(k,j)>, stride is unknown to compiler   [ ../src/test.f90(24,30) ]
   remark #15328: vectorization support: non-unit strided load was emulated for the variable <rr(k-1,j)>, stride is unknown to compiler   [ ../src/test.f90(24,39) ]
   remark #15329: vectorization support: non-unit strided store was emulated for the variable <rr(nz,j)>, stride is unknown to compiler   [ ../src/test.f90(26,7) ]
   remark #15328: vectorization support: non-unit strided load was emulated for the variable <a(nz,j)>, stride is unknown to compiler   [ ../src/test.f90(26,18) ]
   remark #15328: vectorization support: non-unit strided load was emulated for the variable <rr(nz,j)>, stride is unknown to compiler   [ ../src/test.f90(26,28) ]
   remark #15305: vectorization support: vector length 2
   remark #15309: vectorization support: normalized vectorization overhead 0.129
   remark #15452: unmasked strided loads: 5
   remark #15453: unmasked strided stores: 2
   remark #15475: --- begin vector cost summary ---
   remark #15476: scalar cost: 15
   remark #15477: vector cost: 15.500
   remark #15478: estimated potential speedup: 0.950
   remark #15488: --- end vector cost summary ---

   LOOP BEGIN at ../src/test.f90(23,7)
      remark #15344: loop was not vectorized: vector dependence prevents vectorization
      remark #15346: vector dependence: assumed FLOW dependence between rr(k,j) (24:10) and rr(k-1,j) (24:10)
      remark #25439: unrolled with remainder by 2  
   LOOP END

   LOOP BEGIN at ../src/test.f90(23,7)
   <Remainder>
   LOOP END
LOOP END

Najeeb Ahmad

 

0 Kudos
1 Reply
Najeeb_A_
Beginner
454 Views

Anybody home?

0 Kudos
Reply