Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
12 Views

openmp 3.0 collapse

Hi,

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]
0 Kudos
0 Replies