Different calculation results when using CPU vs. GPU with CUDA.jl

Very small discrepancies could be caused by the non-deterministic order of iterating through the particles when running in parallel. Floating point addition is not associative. Atomic operations do not help there, they only ensure that all the terms are included. The discrepancy should be visible also in the CPU version if you randomly reorder the particles.

1 Like