If I have the following code:
!$acc kernels default(present) present(a,sum0,sum1) !$acc loop independent do k=2,npm1 !$acc loop independent do i=1,nrm1 !$acc atomic sum0(i)=sum0(i)+a%r(i,2,k)*dph(k)*pl_i*two enddo enddo !$acc end kernels
Should I expect the same answer each time I run it, or is there a chance the atomics are done in a different order each time so my results will vary due to order-of-sum floating point variations?
I ask because the code this is part of is returning floating-point level different answers every time I run it on the same GPU, same code, etc.
If so, is there some kind of environment variable I can set to make the compiler/run-time compute the atomics in a reproducible way (even if slower)?