AMReX-Astro / Castro

Castro (Compressible Astrophysics): An adaptive mesh, astrophysical compressible (radiation-, magneto-) hydrodynamics simulation code for massively parallel CPU and GPU architectures.
http://amrex-astro.github.io/Castro
Other
297 stars 99 forks source link

verify that MHD is tile safe #2040

Open zingale opened 2 years ago

zingale commented 2 years ago

PR #2039 turned tiling back on in the MHD solver. We previously disabled it (#289), but that was back when the solver was in Fortran and not ported to the GPU yet. It appears to work now, but we should double check that there are no threading issues.

The main place where an issue can come up is for nodal data when two threads might write to the same location at the same time. This is why we want to size temporary data to the tile box rather than to the full box, in general. We should look through the code to see if there are any potential issues.

zingale commented 2 years ago

Note: since none of us really run on CPUs anymore, this has not been much of an issue, but it would be good to have full CPU support in this solver.

joehellmers commented 2 years ago

If you point out the sections of code where the race condition might occur I could look at it.

zingale commented 2 years ago

it's one of those "we'll know it when we see it" situations, so I am not sure I can point to anything, and in fact, all may be well.