Skip to content
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

Fixed memory leaks in fem_poisson #196

Merged
merged 4 commits into from
Sep 10, 2023
Merged

Fixed memory leaks in fem_poisson #196

merged 4 commits into from
Sep 10, 2023

Conversation

ammarhakim
Copy link
Owner

There were some memory leaks and misallocated arrays in fem_poisson and superlu_ops. These are fixed. The fem_poisson unit tests are now fully valgrind clean! All is good with the world again.

the A, B, L, U matrix pointers were not freed. Further, by mistake the
incorrect free method was called on brhs: this is a
gkyl_array. Instead of calling gkyl_array_release the method gkyl_free
was being called. This meant that the array was not actually freed at
all. This likely does not fix all the problems with fem_poisson but
step at a time!
@ammarhakim
Copy link
Owner Author

Closing PR as one more issue needs resolution.

@ammarhakim ammarhakim closed this Sep 9, 2023
@ammarhakim
Copy link
Owner Author

Seems that this PR is indeed ready to be merged. So I am reopening it. The issue Mana found is a problem with the dg bin ops not allowing different ranges for the two input arrays. This is a more elaborate problem and will need careful look to fix throughout the code. Can't do it in this branch

@ammarhakim
Copy link
Owner Author

Reopening PR.

@ammarhakim ammarhakim reopened this Sep 9, 2023
…realize a potential reason for the periodic case to not work in fem_poisson_perp: the size of rhs_cellavg is wrong because it is likely using local instead of local_ext. I will fix this in another branch, where I'll in fact move the calculation of rhs_cellavg out of fem_poisson.
@manauref manauref merged commit 81ef6ee into main Sep 10, 2023
2 checks passed
@manauref manauref deleted the dbg-fem-poi branch September 14, 2023 00:18
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