AMReX-Astro / mini-Castro

a mini-app version of castro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reduce memory usage by using only one edge state array

maxpkatz opened this issue · comments

At present sxm, sxp, etc. have size NQ, since we compute all of the edge-state reconstructions first, and then in a separate step "trace" under them (which for MOL is a no-op). In Castro this was simplified (4f84d83b283a35551a1ea523f582294ce1e4f02a) to use only a single copy of the edge state array, and then loop from 1 to NQ, in each case doing the PPM reconstruction and then immediately doing the "tracing." If we can do this in StarLord, we can cut down on the memory footprint by quite a bit, since there are six of these arrays and NQ is ~20 when we use aprox13.

This cannot be done trivially because we are currently launching separate kernels for the reconstruction and tracing steps. But perhaps there is some related approach we can do here.

This was indirectly fixed by actually using zero edge state arrays, and having the PPM reconstruction directly fill qm and qp.