Recurse less in sort
Implements limiting the sort recursion depth to avoid cells that will never have a hydro interaction within or below them.
This will probably not impact the sort task speed, but should have an effect on the memory used for sort buffers.
@pdraper, can you run a quick benchmark of this change to look at memory size and CPU usage? Thanks!
Merge request reports
Activity
added 6 commits
-
550db41e...0c86a0ae - 5 commits from branch
master
- d369a115 - Merge branch 'master' of https://gitlab.cosma.dur.ac.uk/swift/swiftsim into recurse_less_in_sort
-
550db41e...0c86a0ae - 5 commits from branch
1324 1325 } 1325 1326 1326 1327 /** 1328 * @brief Recurse down a pair of cells and mark the cells that have hydro 1329 * interactions. 1330 */ 1331 void engine_mark_hydro_cells_rec(struct engine *e, struct cell *ci, changed this line in version 5 of the diff
added 1 commit
- f0639e03 - rename flag to 'requires_hydro/starts_sorts' to make it more general.
I'm ran an EAGLE_25/.1 with a couple of ranks on this branch and the master and I think it is fair to say the differences are larger than the effect. The CPU times (non-optimized runs) are the same and we see only small changes in the numbers of allocations and size of allocations. For instance here are plots of the size as histograms for the zero (fake) and 1st steps:
and the same plots as cumulative sums:
I have others (mostly small steps, which seem identical), but I think you get the point.
added 1 commit
- 6ffc7e4d - Report unnecessary recursions, note that this now no longer avoids them, it just reports them.
@pdraper, I made a quick change to report cases in which the code is recursing when it shouldn't have to. Can you run it and see if this outputs anything? Thanks!