-
-
Notifications
You must be signed in to change notification settings - Fork 79
Memory leak in cvode() #58
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
Comments
See #29? |
And #49. |
The problem is that under the hood in both cases |
If I were to update the changes from #29 to the current version what would I need to do? Would it be faster to attempt to merge (by hand) the code into a new fork, or to start over? |
That mainly depends on how well you know git. You can try using git to merge #29 into master to see how many conflicts there are. The code hasn't changed that much since then, so it may not be too bad. |
@christianhaargaard : I think most of the changes in #29 shouldn't be affected by the recent changes in Sundials.jl - Merging shouldn't be a problem. You can also just copy the essentials from #29 and start a new PR. There are some comments from Steven that should be taken into account though. |
@tshort and @acroy : I tried merging the entire acroy/types fork, but that doesn't seem viable. All of the bindings are using the @c macro, whereas the main repository has the ccall function written out completely. I will try and see if I have better luck merging only the corresponding commits, and then report back. |
Putting this together is a mess when you have as little experience and overview as I do. However I did manage to get the simple cvode-interface to free up memory after each run. The code is so dirty however that I would never invite it into my house. I'm hoping I can get some time to look it through and better understand the structure, and possible clean it up. |
Ah so I suppose thats why my program crashed with
I will try ur fix @christianhaargaard :) |
So the memory allocation is a big topic in Sundials :O. Thus I basically reimplemented the changes from #26 for Should I open a PR to it? I think a part-fix is still better then nothing (considering there seemingly is nothing else happening about this right now) |
The non-progress on #29 is my fault :-(, but right now I don't have the time to finish it. As a first step one would need to rebase/port it against the current master, which shouldn't be hard. Then one could fix the loose ends ... When I suggested #26, the others argued one should do it properly and I agree with that. If you happen to have some time, maybe you could try to port #29 to the current master and then we continue from there? However, if you want to revive #26 I would suggest to fix the other solvers too. |
Closing due to #67. |
I'm using sundials to do some trajectory simulations. I noticed there's memory leak in both cvode() simple function and CVode(). The following code is able to reproduce the problem. Both mycvode() and Sundials.cvode() experience this issue.
The text was updated successfully, but these errors were encountered: