sst-core
sst-core copied to clipboard
Py_Finalize not called when Python model is complete
SSTPythonModelDefinition doesn't call Py_Finalize when deleted.
We have some internal research code the relies on the Python interpreter being available. For now, the Python model will call the garbage collector when it is deleted (PR #874). This should clean up the majority of memory used by the Python interpreter as all variables should have gone out of scope. We still need to verify that the core Python data structures are doing reference counting correctly and are being deleted. Will leave this issue open until we have verified.
Fixed in #883. Py_Finalize is not called by default, but there is now a python function you can call to cause Py_Finalize to be called when the model generation is complete.