-
Notifications
You must be signed in to change notification settings - Fork 200
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
Fix ParticleHistogram2D #4779
Fix ParticleHistogram2D #4779
Conversation
@@ -138,6 +138,7 @@ void ParticleHistogram2D::ComputeDiags (int step) | |||
Array<int,2> tlo{0,0}; // lower bounds | |||
Array<int,2> thi{m_bin_num_abs-1, m_bin_num_ord-1}; // inclusive upper bounds | |||
amrex::TableData<amrex::Real,2> d_data_2D(tlo, thi); | |||
m_h_data_2D.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WeiqunZhang do you see why we leaked (host) memory here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an amrex bug. 😊 AMReX-Codes/amrex#3807
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WarpX PR #4800 should have brought in the fix from AMReX now.
For the initialization of |
Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov>
#4800 should have brought in the fix for AMReX-Codes/amrex#3807 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! :)
Without
m_h_data_2D.clear();
the host memory usage continues growing over the simulation until the process gets killed.(Observed in
24.3
and24.2
)i.close();
andseries.close();
were my first suspicion. It didn't help, but it is still probably a good idea to explicitly close the iteration and series.