pogs icon indicating copy to clipboard operation
pogs copied to clipboard

Iterative pogs memory leak in MATLAB 2018

Open CPLambert opened this issue 6 years ago • 3 comments

This is a really great method! However, I have embedded pogs in a loop that iterates many many times and there is a memory leak resulting in an inevitable crash. Any ideas/suggestions? I'm assuming somewhere an array needs destroying.

Thanks

CPLambert avatar Sep 05 '18 13:09 CPLambert

Ah, may be worth mentioning I'm running this on Centos7.

CPLambert avatar Sep 05 '18 15:09 CPLambert

Same problem on my end, ran valgrind on it, the leak is here: matrix_dense.cpp +83

  // Copy Matrix to GPU.
  _data = new T[this->_m * this->_n];

Please Pogs project team, fix this :)

eloi-loomai avatar Dec 13 '18 05:12 eloi-loomai

hi all,

chris and i will have to eventually merge the repos, but please see the offshoot project https://github.com/bungun/optkit/ (i suggest at least looking at the dev branch for usage examples) for a re-written version of POGS that patched many memory leaks and other math issues in both the sparse and dense versions.

bungun avatar Jan 19 '19 00:01 bungun

This response is way overdue. Thanks for reporting that @CPLambert and for figuring out the issue @eloi-loomai. Definitely a bit embarrassing to forget to delete the data from a matrix class. I've pushed a fix.

@bungun thanks for the notes on fixes. I'll try and diff to see what else might be missing.

foges avatar Mar 11 '23 12:03 foges