vectorization: data dependence and subscript too complex

vectorization: data dependence and subscript too complex

Hi everyone - I am trying to better understand both data dependency and the subscript too complex rules.

The snippet below gives the subscript too complex error, whereas if I swap this line for the commented ones the code vectorizes (ifort 12, linux).

Can anyone explain why the compiler would balk at the one but not the other two in combination? They seem to access the same subscripts. What can be done?

Also, am I correct that I can do the two commented lines together (two accesses to zz(k) on one iteration of k)?



do i=1,ni
  do j=1,nj
    zz = 0.d0
     do k=1,nk
     end do
   end do
 end do



2 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

I suppose it is obvious, but the loop on j would start at 2.

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen