ra3xdh / qucs_s

Qucs-S is a circuit simulation program with Qt-based GUI
https://ra3xdh.github.io/
GNU General Public License v2.0
841 stars 108 forks source link

.spiceinit #466

Closed tomhajjar closed 8 months ago

tomhajjar commented 8 months ago

Adding ".spiceinit" to your schematic doesn't seem to do anything. The .spiceinit file gets written to the spice4qucs folder which AFAIK, ngspice never sees.

For Windows, putting a .spiceinit file into the "user" folder will override any .spiceinit placed anywhere else. ngspice will only use the .spiceinit file in the "user" folder. Without my .scpiceinit with "set ngbehavior=ltpsa" a large number of models won't work so deleting it is not an option.

I've tried using the ngspice command "unset ngbehavior" to no avail. I've been hashing it out with Holger.

No idea what happens in Linux but doubtful ngspice looks in the spice4qucs folder.

2024-01-17_120608

2024-01-17_122125

ra3xdh commented 8 months ago

I cannot reproduce the reported issue on Linux machine. Everything works as expected. I am using spiceinit regularly in my simulations and everything has effect. Need to check this on Linux. Ngspice for linux should always prefer the spiceinit in the working directory to the default Ngspice. Maybe Ngspice doesn't like the space in the working directory path. Need to test using Windows.

ra3xdh commented 8 months ago

I didn't change the spiceinit processing since v0.0.24. So, no new bug should be introduced in the recent releases.

tomhajjar commented 8 months ago

I discovered my .spiceinit on my schematic had "set ngbehavior=ltps" instead of "set ngbehavior=ltpsa". It fooled me into thinking I had a Qucs issue. I didn't realize Qucs deletes/overwrites the .spiceinit file in the spice4qucs folder. I would copy .spiceinit into the folder and Qucs was deleting it during a run...again fooling me... :-(

Having .spiceinit in my User folder is OK for Qucs but an issue for some ngspice examples which won't work...