cuda fortran:atomicadd for double precision

Hi, I’ve recently started to use cuda fortran and enjoyed it for my calculation of explicit dynamic finite element analysis.

I am using 15.5 version of PGI cuda fortran compiler on the Windows7(64bit) OS using Tesla K20c (Cuda 6.5).

I want to ask you one thing about “atomicadd”.
Please tell me, can I officially use
atomicadd(variable with real(kind=8),variable with real(kind=8))?

According to
https://forums.developer.nvidia.com/t/double-precision-on-atomic-operations-in-cuda-fortran/133666/1

and

http://on-demand.gputechconf.com/supercomputing/2013/presentation/SC3138-New%20CUDA-Fortan-Features.pdf

double precision atomicadd can be used as CUDA Fortran 2012/2013 Features PGI 2012 (CUDA 4.1 and 4.2)
Support for double precision atomicadd

Is this really true?
The reason why I ask this is because of CUDA Fortran Programming Guide and Reference Version 2015 (https://www.pgroup.com/doc/pgicudaforug.pdf) “3.6.6. Atomic Functions” says “These atomic functions read and return the value of the first argument. They also combine that
value with the value of the second argument, depending on the function, and store the combined
value back to the first argument location. Both arguments must be of type integer(kind=4).”
Thus, this user’s guide says we cannot use kind=8.

Which information is true?

Thank you in advance for your attention to this matter,

Daisuke

Hi Daisuke,

atomicadd does support double precision, though it looks like the programming guide wasn’t updated to reflect this. I added TPR#21831 and sent it to engineering so we can get the guide corrected.

Thanks for letting us know!
Mat

Dear Mat

Thank you for your information and now I can use the attomicadd of real(kind=8) version with confidence.

Thanks from Japan,

Daisuke

TPR 21831 - UF: CUDA Fortran programming guide needs update to reflect support of double precision atomicadd

has updated the guide to correct the oversite.

dave