Registered Member
|
Dear all,
Dear all, I am using SPQR support in Eigen3.20-beta1. And unfortunately I got some memory leak. I tried Valgrind and got the flollowing error. 1,176 bytes in 1 blocks are possibly lost in loss record 13,376 of 14,289 in TangentProjection2::Projection() in elastic/projection2.cpp:904 1: realloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so 2: cholmod_l_realloc in /home/nullas/workspace/build-PetGL-Debug/libelastic.so 3: cholmod_l_realloc_multiple in /home/nullas/workspace/build-PetGL-Debug/libelastic.so 4: cholmod_l_reallocate_sparse in /home/nullas/workspace/build-PetGL-Debug/libelastic.so 5: long SuiteSparseQR<double>(int, double, long, int, cholmod_sparse_struct*, cholmod_sparse_struct*, cholmod_dense_struct*, cholmod_sparse_struct**, cholmod_dense_struct**, cholmod_sparse_struct**, long**, cholmod_sparse_struct**, long**, cholmod_dense_struct**, cholmod_common_struct*) in /home/nullas/workspace/build-PetGL-Debug/libelastic.so 6: long SuiteSparseQR<double>(int, double, long, cholmod_sparse_struct*, cholmod_sparse_struct**, long**, cholmod_sparse_struct**, long**, cholmod_dense_struct**, cholmod_common_struct*) in /home/nullas/workspace/build-PetGL-Debug/libelastic.so 7: Eigen::SPQR<Eigen::SparseMatrix<double, 0, int> >::compute(Eigen::SparseMatrix<double, 0, int> const&) in <a href="file:///usr/local/include/eigen3/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h:98" >/usr/local/include/eigen3/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h:98</a> 8: Eigen::SPQR<Eigen::SparseMatrix<double, 0, int> >::SPQR(Eigen::SparseMatrix<double, 0, int> const&) in <a href="file:///usr/local/include/eigen3/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h:80" >/usr/local/include/eigen3/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h:80</a> 9: TangentProjection2::Projection() in <a href="file:///home/nullas/workspace/build-PetGL-Debug/elastic/../../PetGL/elastic/projection2.cpp:904" >elastic/projection2.cpp:904</a> 10: TangentProjection2::Next() in <a href="file:///home/nullas/workspace/build-PetGL-Debug/elastic/../../PetGL/elastic/projection2.cpp:310" >elastic/projection2.cpp:310</a> 11: ProjectionThreading2::run() in <a href="file:///home/nullas/workspace/build-PetGL-Debug/elastic/../../PetGL/elastic/projection2_thread.cpp:113" >elastic/projection2_thread.cpp:113</a> 12: /usr/lib/libQtCore.so.4.8.4 13: start_thread in /usr/lib/libpthread-2.17.so 14: clone in /usr/lib/libc-2.17.so Here is a code how I use SPQR some function { // try to solve F^T*F x = b G = F.transpose() * F; // F is not guaranteed to be full rank. Eigen::SPQR<SparseMatrix<double> > solver(G); x = G.solve(b) Since my application use this batch of code at each iteration, it will crash after a while. Is it the way I call SPQR is wrong? Should I deconstruct SPQR explicitly. Thank you for time. |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]