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
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