Skip to content
Snippets Groups Projects

Leaner gparts and cell structure

Closed Matthieu Schaller requested to merge lean_gparts into master

A bunch of updates to help with the memory foot-print, especially in cases with relatively simple physics:

  • Remove the padding of the gpart structure. (We were not taking advantage of it anyway)
  • Add a compile-time option to not compute (and hence store in RAM) potentials as they are not always needed.
  • Split the cell structure into sub-structures for each particle type.
  • Hide all the non-strictly necessary fields of these sub-structures into an anonymous union when compiling without star/BH/sink.
  • Add an empty hydro scheme to use the same trick as above also for the gas so that we have the leanest possible cell structure in gravity-only runs.

The 4th item in the list is quite a dirty trick I would think. Alternatives require massive code restructuring and probably runtime costs. This allows the code to compile as all the variables are defined. Though if one attempts to use them (e.g. because you have stars but compiled without) then you are in for a treat.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
429 429 if (abs_trigger > 1.f) abs_trigger = 0.f; /* Not relevant. */
430 430 fprintf(timelog,
431 431 "# %d balance: %f, expected: %f (sys: %f, total: %f)\n",
432 e->step, balance, abs_trigger, (smaxtime - smintime) / smean,
432 e->step, balance, abs_trigger,
433 (smaxtime - smintime) / (smean + FLT_MAX),
  • added 1 commit

    • c4efd09e - Fix silly typo in the reporting of CPU balance

    Compare with previous version

  • added 1 commit

    • 7b14951e - Guard against when more than MEMUSE_INITLOG new allocations are logged while...

    Compare with previous version

  • added 1 commit

    • f9e95760 - Add report about reallocations of foreign particles

    Compare with previous version

  • added 1 commit

    • 09189bdc - Also report the RES memory usage when running on a single node

    Compare with previous version

  • added 1 commit

    • 60c562bf - Applied code formatting tool

    Compare with previous version

  • added 1 commit

    • cdb932c7 - Added counter to monitor all the hydro.sorts allocations

    Compare with previous version

  • added 2 commits

    • eb67de8d - Be verbose about reallocating the queue and unlock arrays
    • f6d40349 - Collect the max memory allocated at any time in the ghost or hydro functions

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 2 commits

    • 8926137b - Fix memuse reports to guard against two issues, first is when reallocating the...
    • 5d9cc9ed - Update documentation of what is stored in rnode leaves

    Compare with previous version

  • added 1 commit

    • d963b67f - Need to mark the child rnode as unused

    Compare with previous version

  • Matthieu Schaller added 104 commits

    added 104 commits

    • d963b67f...503a2191 - 76 commits from branch master
    • 10c2f4c9 - Remove the alignment constraint of gparts. Add the option to not compute the...
    • 52fd9115 - Do not compile all the stars, black holes and sink cell properties when...
    • d66dc48b - Temporary state. Do not create hydro communication task links if there are no star or BH model
    • 75418a9b - Make more cell variables available
    • 6f6c3126 - Only collect h_max when you can
    • 2811711c - Re-organise things a little in the cell structure
    • cd183dd7 - Applied code formatting
    • 222341d5 - Fix also the case of the task unskipping
    • 37dbfce5 - Use the unaligned memswap for gparts now that their size is not a multiple of...
    • 02acbc5f - Move more unnecessary variables in the unions
    • 18eb70b8 - Clean-up small memory leak when ending a simulation. Was a false positive but...
    • 7f21fff2 - Log a few more memory calls
    • 43b3b5e6 - Log a few more allocations internal to the hydro tasks to hunt down the leak
    • a5add36d - Revert "Log a few more allocations internal to the hydro tasks to hunt down the leak"
    • 115bfc28 - Added empty implementation of a hydro scheme to save memory in DMO runs
    • 9ca2d0fe - Moved the hydro-related cell fields to a separate structure
    • 45a4597d - Added licensing in the new files
    • a3821db5 - Fix FPE in the repartition trigger
    • ef9b8cdf - Applied code formatting tool
    • 377b6ef5 - Post-rebase fixes
    • 105c9378 - Add the memreport's main array to the list of memory allocations we report
    • e2ebc616 - Fix silly typo in the reporting of CPU balance
    • df807b91 - Also report the RES memory usage when running on a single node
    • 6b5927e9 - Applied code formatting tool
    • 16ee2c17 - Added counter to monitor all the hydro.sorts allocations
    • b966dc14 - Be verbose about reallocating the queue and unlock arrays
    • 61fd990d - Collect the max memory allocated at any time in the ghost or hydro functions
    • 0e8926a5 - Better types in messages

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • I'll close this until !1162 (merged) is merged and we'll then revisit the additional changes that this brings.

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading