PsyNeuLink icon indicating copy to clipboard operation
PsyNeuLink copied to clipboard

Running composition tests leaks memory

Open jvesely opened this issue 3 years ago • 1 comments

PR #2474 adds a simple leak detection on compiled tests; the code generator maintains a cache for every compiled PNL component. This cache uses WeakKeyDictionary so when the components get GC-ed it will remove the associated compiler data.

The check asserts that the WeakKeyDictionary is empty after running GC.

384 tests currently fail the assertion [0];

  • all leaking tests construct and run Composition
  • not all Composition tests leak memory (e.g. tests/llvm/test_debug_composition.py passes)

[0] https://github.com/PrincetonUniversity/PsyNeuLink/runs/7953304797?check_suite_focus=true

jvesely avatar Aug 22 '22 19:08 jvesely

A leak check and a specialized leak test were added in #2992. The leak test was extended to more operations in #2997

jvesely avatar Aug 07 '24 00:08 jvesely

Fixed in #3071 .

jvesely avatar Nov 12 '24 15:11 jvesely