- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have found in following case Intel fortran would likely to give rise to stack overflow, where such error doesn't exist when usingother compliers like gfortran
eg1: a(:) = b(:)
eg2: forall( i=1:n )
a(i)=b(i)
end forall
However, in following case, it wouldn't likely give rise to the above error
eg3: a(:) = 0.d0
eg4: c = dot_product( a(:), b(:) )
eg5: do i=1,n
a(i)=b(i)
end do
My problems are:
1. eg1 and eg2 are generally a special implementation of eg5 and supposed more efficient because they provides more information into compiler. Although it depends on the internal implementation of intel compiler, but it is strange to gives rise tothe aboveprobelm.
2. Eg4 generally doesn't give rise to stack overflow. Is this so?
Much apprieciated for your anwser
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There have been several previous articles posted on thes Fortran forums about the pros and cons of forall.
In f2008, there will be a do concurrent, which is a forall with fewer restrictions about optimization. There has been discussion implying that an initial implementation might be the IVDEP forall.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a = b
Please do not use a(:) = b(:) - the semantics are subtly different and the extraneous (:) can prevent the compiler from doing the best job.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page