- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)?
Thanks,
Eli
[fortran]
do i=1,ni
do j=1,nj
zz = 0.d0
!DIR$ IVDEP
do k=1,nk
!zz(k)=zz(k)+trel_tmp(k,j,i)
!zz(k)=zz(k)+trel_tmp(k,j-1,i)
zz(k)=zz(k)+trel_tmp(k,j,i)+trel_tmp(k,j-1,i)
end do
end do
end do
[/fortran]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suppose it is obvious, but the loop on j would start at 2.
![](/skins/images/D2683F18326913BBA0436CB7114DD569/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page