You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using circuit.simulator(simulator='ngspice-subprocess',...) breaks PySpice execution #352
From that moment, inpcom.c began to display a message at the very beginning of the output of the simulation mode.
The message has been latter moved to inpcompat.c.
The message can be easily shown with the following command from the terminal :
echo"bla"| ngspice -s
No compatibility mode selected!
Circuit: bla
Note: No ".plot", ".print", or ".fourier" lines; no simulations run
Your issue is a little bit off topic of this track issue. However, it should be easy to fix with following explanation.
The environment variable SPICE_SCRIPTS should contain the path of the directory that contains the spinit file.
Activity
cyber-g commentedon Sep 8, 2023
I have investigated the problem. It comes from an evolution on NGSpice side that began on 2021-01-01 :
https://sourceforge.net/p/ngspice/ngspice/ci/1234c3bdf8a48e6201a3ecf03e10396657fa96e8/tree//src/frontend/inpcom.c?diff=164d3dd20c6008d842bd4ae34d63d3ae22923e68
From that moment,
inpcom.cbegan to display a message at the very beginning of the output of the simulation mode.The message has been latter moved to
inpcompat.c.The message can be easily shown with the following command from the terminal :
which mimics what is done in Server.py
If one sets an
spinitfile containing a compatibility setting, for example:set ngbehavior=hsaand configures the
SPICE_SCRIPTSenvironment variable to use thisspinitfile then you get:Please note that the message is not an error; it is just a note given by NGSpice.
To fix the issue, one may want to update :
_read_headerto contain something like:
(only valid for the latest versions of NGSpice (later than 2022-03-14)
I need to check if this first idea for fix is valid.
cyber-g commentedon Sep 8, 2023
Please note, that there is no issue when using the
circuit.simulator(simulator='ngspice-shared')option insteadRawFile.py: fix PySpice-org#352
RawFile.py: improve fix PySpice-org#352
KolosKoblasz commentedon May 31, 2024
Hi @cyber-g !
I'm trying to run ngspice sims with PySpice on Ubuntu, but I'm stuck on an issue.
Could you help me to fix it?
I created the environment variable in my .bashrc:
export SPICE_SCRIPTS="/home/kolos/spinit"
echo $SPICE_SCRIPTS /home/kolos/spinit
but ngspice can't find the spinit file:
Note: can't find the initialization file spinit.
cyber-g commentedon Nov 20, 2024
Dear @KolosKoblasz
Your issue is a little bit off topic of this track issue. However, it should be easy to fix with following explanation.
The environment variable
SPICE_SCRIPTSshould contain the path of the directory that contains thespinitfile.This is documented here : 12.5 Standard configuration file spinit
So if you have your
spinitfile in/home/kolos/, then you have to put in your.bashrc:davidcastells commentedon Dec 14, 2025
I am not sure if this is fixed or not. Sorry, I am a little bit lost with checking the commits
In my system I fixed by adding a line
before
self.circuit_name = self._read_header_field_line(header_line_iterator, 'Circuit')
in PySpice/Spice/NgSpice/RawFile.py