PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

pgf95 and OpenMP problem (bug?)

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
laxxy



Joined: 07 Oct 2008
Posts: 3

PostPosted: Sat Apr 02, 2011 7:05 am    Post subject: pgf95 and OpenMP problem (bug?) Reply with quote

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
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6129
Location: The Portland Group Inc.

PostPosted: Mon Apr 04, 2011 11:06 am    Post subject: Reply with quote

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
View user's profile
laxxy



Joined: 07 Oct 2008
Posts: 3

PostPosted: Tue Apr 05, 2011 5:23 am    Post subject: Reply with quote

Thanks a lot Mat!

BTW, is there any way to check if it's been fixed?
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6129
Location: The Portland Group Inc.

PostPosted: Tue Apr 05, 2011 8:56 am    Post subject: Reply with quote

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
View user's profile
jtull



Joined: 30 Jun 2004
Posts: 438

PostPosted: Tue May 14, 2013 4:58 pm    Post subject: TPR 17775 is fixed in 11.5 release. Reply with quote

Sorry for the late response.

dave
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group