-
Notifications
You must be signed in to change notification settings - Fork 5
Memory leak and simulation errors #1
Description
Thank you for your library, it's saved me a lot of trouble with ngspice.
However, there are some things I'm having issues with: memory leaks and simulation errors.
I am running several thousand simulations using your API, and I have noticed that over time the MEM% gradually increases. Sometimes, this will hang the script. So far, I have gotten away with using the multiprocessing library and transferring data through a Queue object. Because this works, I wouldn't call the memory leak an immediate issue. If you need it, I can reply with code that will display this behavior.
Regarding the simulation error, here is an example from the console:
File "_ctypes/callbacks.c", line 234, in 'calling callback function'
File "/home/hello/.local/lib/python3.5/site-packages/ngspicepy/ngspicepy.py", line 165, in SendChar
raise SystemError(" ".join(clean_output.split(' ')[1:]))
SystemError: Supplies reduced to 96.6351% Note: One successful source step
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 234, in 'calling callback function'
File "/home/hello/.local/lib/python3.5/site-packages/ngspicepy/ngspicepy.py", line 165, in SendChar
raise SystemError(" ".join(clean_output.split(' ')[1:]))
SystemError: Supplies reduced to 100.0000% Note: One successful source step
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 234, in 'calling callback function'
File "/home/hello/.local/lib/python3.5/site-packages/ngspicepy/ngspicepy.py", line 165, in SendChar
raise SystemError(" ".join(clean_output.split(' ')[1:]))
SystemError: Note: Source stepping completed
Is this from ngspice or your API? Although it raises errors, after running I will be able to retrieve the data vectors so I don't know if it's safe to ignore these or not.