| View previous topic :: View next topic |
| Author |
Message |
laxxy
Joined: 07 Oct 2008 Posts: 3
|
Posted: Sat Apr 02, 2011 7:05 am Post subject: pgf95 and OpenMP problem (bug?) |
|
|
Hi,
Is there any problem/issue I should be aware of when using intrinsic functions with OpenMP in pgf95?
I would expect the code below to print 1000 identical numbers, and it works correctly with ifort and gfortran, but with pgf95 and OpenMP on a few elements come out as zeros. Sequential code works fine on all compilers.
The compiler version is pgf95 11.2-1 64-bit target on x86-64 Linux -tp shanghai
| Code: |
program test
integer, parameter :: N=10, T=1000
integer :: iii(1)
real :: x(N), F(N), mF(T)
do i=1,N
x(i) = N/2.-N
end do
!$omp parallel do default(private) shared(x,mF)
do it=1,T
F = x
iii = maxloc(F)
mF(it) = F(iii(1))
end do
!$omp end parallel do
write(*,*) mF
end program test
|
Thanks! |
|
| Back to top |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4995 Location: The Portland Group Inc.
|
Posted: Mon Apr 04, 2011 11:06 am Post subject: |
|
|
Hi laxxy,
Thanks for the report. I was able to recreate the problem and have send a report to our engineers (TPR#17775) for further review.
As a work around, you can put a critical section around the call to maxloc. I also was able to get correct answers if I set the DIM argument to one, i.e. "iii = maxloc(F,1)", though I'm not positive if this is just 'luck' or an valid solution.
- Mat |
|
| Back to top |
|
 |
laxxy
Joined: 07 Oct 2008 Posts: 3
|
Posted: Tue Apr 05, 2011 5:23 am Post subject: |
|
|
Thanks a lot Mat!
BTW, is there any way to check if it's been fixed? |
|
| Back to top |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4995 Location: The Portland Group Inc.
|
Posted: Tue Apr 05, 2011 8:56 am Post subject: |
|
|
We typically get things fixed within one of two minor releases of the report depending upon where we are in the release cycle as well as the severity of the issue. Once fixed, we will post on this thread that it has been fixed.
You can also send a note to PGI Customer Server (trs@pgroup.com) and ask to be put on the notification list for TPR#17775.
Thanks,
Mat |
|
| Back to top |
|
 |
jtull
Joined: 30 Jun 2004 Posts: 233
|
Posted: Tue May 14, 2013 4:58 pm Post subject: TPR 17775 is fixed in 11.5 release. |
|
|
Sorry for the late response.
dave |
|
| Back to top |
|
 |
|