Hi all,
I am seeing some strange behavior of the Oracle Fortran compiler (12.5 and 12.6 beta) with the following code:
module m
type :: nodeType
real :: ohhMin, ohhMax
integer :: cntPart
end type
contains
subroutine sub(node, ohh)
type(nodeType), pointer :: node
real, intent(in) :: ohh
!$omp atomic
node%cntPart = node%cntPart + 1
!$omp atomic
node%ohhMin = min(ohh, node%ohhMin)
end subroutine
end module
Compiling this with -xopenmp gives me:
| node%ohhMin = min(ohh, node%ohhMin) |
| ^ | |
"omp_atomic.f90", Line = 17, Column = 19: ERROR: This atomic access has a different type from another that accesses the same memory location.
I'm pretty sure this is a compiler bug. Right? The error goes away if I pull the variables that are being set in the atomic statements out of the derived type and make them stand-alone variables. They're certainly not accessing the same location!
Would be great if this could be fixed for the final 12.6 release of Developer Studio.
Best regards,
Janus