- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I'm trying to use the new OpenMP 3.0 features. Unfortunately, the loop collapsing doesn't work when the outer iteration count equals one.
The following test program was compiled with "Version 11.0 Build 20090318 Package ID: l_cprof_p_11.0.083" with "ifort -openmp test.F90"
The execution time on one and two processors is identical, no speed-up is achieavable.
Can anyone reproduce this bug? Is there a workaround?
program test
integer(kind=4), parameter :: n=100000000
integer(kind=4) :: i,j,k
real(kind=8), dimension(n) :: d
k = 1
!$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 following test program was compiled with "Version 11.0 Build 20090318 Package ID: l_cprof_p_11.0.083" with "ifort -openmp test.F90"
The execution time on one and two processors is identical, no speed-up is achieavable.
Can anyone reproduce this bug? Is there a workaround?
program test
integer(kind=4), parameter :: n=100000000
integer(kind=4) :: i,j,k
real(kind=8), dimension(n) :: d
k = 1
!$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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[cpp]program test integer(kind=4), parameter :: n=100000000 integer(kind=4) :: i,j,k,ij real(kind=8), dimension(n) :: d k = 1 !$omp parallel do do ij = 0, k*n-1 i=(ij/n)+1 j=mod(ij,n)+1 d(j) = sqrt(abs(sin(cos(tan(real(j*i,kind=8)))))) end do !$omp end parallel do print*,d(1) end program test [/cpp]
Jim

Reply
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