Skip to content

Print max CArena usage #4468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

AlexanderSinn
Copy link
Member

@AlexanderSinn AlexanderSinn commented May 15, 2025

Summary

The CArena::PrintUsage() called in amrex finalize prints the currently used and allocated memory. This isn't very useful, as all memory should already be freed by that time. This PR prints the per-CArena maximum memory usage and allocation instead (but without the initialize allocation).

Additional background

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

@AlexanderSinn AlexanderSinn requested a review from WeiqunZhang May 16, 2025 15:59
@WeiqunZhang WeiqunZhang self-requested a review May 16, 2025 17:34
Copy link
Member

@WeiqunZhang WeiqunZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than PrintUsage

@WeiqunZhang WeiqunZhang merged commit d3798de into AMReX-Codes:development May 16, 2025
75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants