Registered Member
|
While debugging a crash in a program running Eigen, I ran into the following problem :
I had a function that "returned" a solver for a given problem, like :
And then, later in the code, I was using the solver multiple times. Now, the crash came from the fact that UmfPackLU has some internal references to the sparse matrix on which it was computed. But in my case, the matrix was deleted before the call to solver.solve(); So it seems the solver and the associated matrix should have the same lifetime, otherwise bad things will happen. I don't really know if this is a bug specific to UmfPackLU or if this is intended behavior, but I didn't find any mention of this in the documentation. Maybe I missed something about objects lifetime ? I wrote a small example reproducing the problem : https://gist.github.com/julienr/6046365 |
Registered Member
|
Hi,
This is the intended behavior. UMFPACK needs the initial matrix in the solve phase to perform some iterative refinement. |
Registered Member
|
Ok, thanks for the explanation.
I think this should be mentioned in UmfPackLU's documentation to avoid surprises. |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]