Skip to content
Snippets Groups Projects

Reduce the number of proxies constructed in the case with gravity

Merged Matthieu Schaller requested to merge proxy_work2 into master
1 unresolved thread

Three main changes:

  • Loop over neighbouring cells in the same way when making proxies, constructing hydro tasks and gravity tasks,
  • Use a symmetry condition to reduce the number of proxies on a given node,
  • Use a better calculation of the distance between future multipoles to decide whether to construct a proxy or not.

Overall this reduces the number of gravity proxies by a factor 6 or so on the EAGLE-50 example.

Merge request reports

Merged by avatar (May 30, 2025 1:39pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • The only bit I worry about is the change highlighted above. It seems correct to me but I don't know why it hasn't been done before whilst the same trick was used in other similar loops.

  • Note that this has been tested on a variety of test cases and I think the calculation of the estimated proxies we need is correct but I will explore more corner cases.

  • Matthieu Schaller mentioned in merge request !672 (merged)

    mentioned in merge request !672 (merged)

  • Pedro Gonnet
  • added 2 commits

    • e4df2b48 - Cleaner version of the proxy existence check in the task creation.
    • 5fb5e802 - Simplfy the call to the self-gravity task creation mapper.

    Compare with previous version

  • Matthieu Schaller resolved all discussions

    resolved all discussions

  • 1899 1879 s->nr_cells, 1, 0, e);
    1900 1880 }
    1901 1881
    1882 if (e->verbose)
    1883 message("Making stellar feedback tasks took %.3f %s.",
    1884 clocks_from_ticks(getticks() - tic2), clocks_getunit());
    1885
    1886 tic2 = getticks();
    1887
    1902 1888 /* Add the self gravity tasks. */
    1903 if (e->policy & engine_policy_self_gravity) engine_make_self_gravity_tasks(e);
    1889 if (e->policy & engine_policy_self_gravity) {
    1890 threadpool_map(&e->threadpool, engine_make_self_gravity_tasks_mapper, NULL,
  • All done. :)

  • added 1 commit

    • 1f726a7c - Cleaner breacketing in the pair-task creation.

    Compare with previous version

  • LGTM, handing off to @pdraper!

  • assigned to @pdraper

  • Matthieu Schaller added 29 commits

    added 29 commits

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Thanks, all seems to be working, so accepting. Branch disposition back to you.

  • Peter W. Draper mentioned in commit f39b0ff5

    mentioned in commit f39b0ff5

  • Please register or sign in to reply
    Loading