Skip to content
New issue

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

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

Already on GitHub? # to your account

Too many plots cause plotting process to run out of memory #481

Closed
jfrost-mo opened this issue Apr 11, 2024 · 0 comments · Fixed by #482
Closed

Too many plots cause plotting process to run out of memory #481

jfrost-mo opened this issue Apr 11, 2024 · 0 comments · Fixed by #482
Labels
bug Something isn't working

Comments

@jfrost-mo
Copy link
Member

WARNING /scratch/jfrost/cset-workflow-env/lib/python3.12/site-packages/CSET/operators/plot.py:140: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (matplotlib.pyplot.figure) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam figure.max_open_warning). Consider using matplotlib.pyplot.close().

So it looks like we just need to close them after saving.

@jfrost-mo jfrost-mo added the bug Something isn't working label Apr 11, 2024
jfrost-mo added a commit that referenced this issue Apr 11, 2024
Refactors the plotting code to use the explicit (object-oriented)
matplotlib API. Figures are explicitly closed, preventing memory
leaking. Also added a super-title to the postage stamp plots, so
the diagnostic title is there too.

Fixes #481
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant