- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

I have a problem concerning the collapse feature of OpenMP 3.0.

When the iteration count of the outer loop gets one as in the following example,

no parallel speed-up is achievable.

[cpp]program test

integer, parameter :: n=100000000

integer :: i,j,k

real(kind=8), dimension(n) :: d

k = n+1

k = k-n

! k is now one

print*,k

!$omp parallel do collapse(2)

do i=1,k

do j=1,n

d(j) = sqrt(abs(sin(cos(tan(real(j*i,kind=8))))))

end do

end do

!$omp end parallel do

print*,d(1)

end program test

The problem occurs with Intel Fortran 11.0

IBM and GNU Fortran do not seem to have this problem.

Am I doing something wrong, or is this a bug?

Cheers,

F. Ahaba

[/cpp]

Link Copied

0 Replies

Topic Options

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