piernik-dev / piernik

Piernik MHD Code
GNU General Public License v3.0
15 stars 15 forks source link

Faster arr4d boundaries #406

Closed gawrysz closed 3 years ago

gawrysz commented 4 years ago

It looks like prolong_bnd_from_coarser was very inefficient in AMR simulations due to incomplete rank-4 implementation (with workaround through cg%wa). A bit more direct approach (still component-wise) resulted in factor of 2 speedup of a 3D sedov problem with 3 levels of refinemet.

There is another big factor to gain in optimizing the way of calculating fine guardcells over coarse boundary. Some easy gains were done in eaf63af but real improvement will be easier to achieve with MPI-2 communication.

gawrysz commented 3 years ago

faster_arr4d_boundaries

Examples of performance gains in AMR sedov (pure HD) and maclaurin (pure multigrid) problems. Flood scaling (right column) show execution time of multiple concurrent Piernik processes. Performance gains there come from reducing memory traffic (such as RAM – L3 cache transfers)