SpinW / spinw

SpinW Matlab library for spin wave calculation
http://www.spinw.org
GNU General Public License v3.0
35 stars 15 forks source link

Memory leak in mex files #41

Open mducle opened 4 years ago

mducle commented 4 years ago

It looks like there is a small memory in one of the mex files.

This only manifests (as out-of-memory errors) after running Matlab / SpinW for a long time (days) and with the mex option on - the memory of the Matlab gradually increases and even a clear classes; clear all; clear java does not reduce the memory used by Matlab below some level (~14GB after 2 days for me).

mducle commented 2 years ago

Planning to not use mex files anymore in preference to refactoring spinwave.m into C++

mducle commented 2 months ago

Another report from user about memory leak in the old *_omp mex files - since we found that the new swloop mex is only good for smaller system and have opted to keep the *_omp files we should fix this issue.

The user (L. Woodland from Oxford) reported using 'hermit', true and was getting out-of-memory errors after calling spinwave around 100 times with ~10^5 q-points each time.