omlins / ParallelStencil.jl

Package for writing high-level code for parallel high-performance stencil computations that can be deployed on both GPUs and CPUs
BSD 3-Clause "New" or "Revised" License
311 stars 31 forks source link

Possible race condition #73

Closed luraess closed 11 months ago

luraess commented 1 year ago

Computing Eta and using its averaged value in the same kernel may lead to erroneous results because of missing sync. https://github.com/omlins/ParallelStencil.jl/blob/b985f8f678428ded2803023587cb1c1a25c24d0c/miniapps/ThermalConvection2D.jl#L28 Eta needs to be computed in another kernel.