Comments (4)
Hi @thartland If you only call HYPRE_ParVectorDestroy
to free the object of IJVecotr, it is expected to have memory leak from the other parts of IJVector. HYPRE_IJVectorDestroy
free them as well. I don't see the reason why you can't call HYPRE_IJVectorDestroy
on IJ_grad
. Maybe I missed something. If you have to call HYPRE_ParVectorDestroy
to free the parvector, the way I guess is to manipulate the IJ structure, after HYPRE_IJVectorGetObject
, by setting
hypre_IJVectorObject(vector) = NULL
or something like that, so you can call HYPRE_IJVectorDestroy
to free the IJVector but keep the ParVector.
from hypre.
We have reference counters in some of the matrix/vector objects in hypre. I wonder if we should expose this to users somehow so they can create persistent references to objects and better manage memory. The simplest thing we could do for now is implement a GetObjectRef
call for all matrices and vectors. This would maintain backward compatibility and I think it would help Tucker out. Basically, this call (instead of GetObject
) would return an object that must be freed separately at some point. So here both the IJDestroy and the ParDestroy would have to be called (in any order).
from hypre.
Thanks everyone for the quick responses! I am glad to know that it wasn't something obvious that I missed. Before your team invests the time into this effort let me communicate a bit more with my team to further clarify needs, I'll follow up in the next few days.
from hypre.
I did a slight redesign of my code to avoid memory leaks. Thank you for clarifying how these objects work, that information was useful to me.
from hypre.
Related Issues (20)
- tar files for previous releases (to track down the cause of increased iteration counts when upgrading from 2.0.0) HOT 3
- Relative error floor for AMS in semi-definite Maxwell problems
- the setup time accounts for 77%
- changed default settings from 2.0.0 to 2.30.0 HOT 3
- Bad convergence using BoomerAMG for system of equations and InterpType doesn't work HOT 2
- New hypre release 2.31.0 HOT 6
- ParCSRAAt for nonsquare matrices HOT 1
- INSTALL.md: add Macports option for macOS
- Broken link in docs
- Requesting information on cmake for applications
- Improve GPU-aware MPI option
- When using AMS_PCG to solve multiple right-hand sides iteratively, I've noticed a continuous increase in memory usage.
- Could NOT find HYPRE (missing: HYPRE_LIBRARIES HYPRE_INCLUDE_DIRS)
- Floating point exception inf pcg.c HOT 1
- Can we find a minimal self-contained gpu example of using hypre ij interface nad its related solver?
- Best configuration to BoomerAMG on CPUs
- ij.c fails when compiling with cuda 12.2
- Missing MPI C++ bindings when using FEI
- Potentially incorrect `hypre_assert` HOT 3
- Matrices with zero diagonal entries in `hypre_ParCSRTMatMatKTDevice` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hypre.