CUFCTL / face-recognition

A GPU-accelerated real-time face recognition system based on classical machine learning algorithms
MIT License
23 stars 11 forks source link

Check the code for memory leaks #34

Closed bentsherman closed 7 years ago

bentsherman commented 7 years ago

I haven't done this in a while, so we should probably look for memory leaks. I've had issues in the past with valgrind because if I ran with --leak-check=full, valgrind would report literally millions of errors and quit. These errors seem to be coming from within BLAS/LAPACK. I think the issue comes from the fact that cblas and LAPACKE actually provide two interfaces: the "middle-level" interface, which is identical to the Fortran API, and the "high-level" interface, which abstracts some of the workspace variables. Maybe valgrind is reporting uninitialized value errors or something like that. Or maybe BLAS and LAPACK are just hostile towards valgrind. I don't know. But I was able to run without that option and still catch some memory errors. Anyway, another fun project for someone to do.

bentsherman commented 7 years ago

I've run a few tests over the past few days, and I was able to fix a few memory errors. The only errors I'm seeing out of valgrind now are strange errors (not leaks) from LAPACKE and a few other nit-picky things from valgrind that I think we can disregard. If someone wants to explore these errors further, they are certainly welcome, but for now I think we can put this issue to rest.