I develop a program that will use the NgSpice as a static library. So in
this program I have to do the following:
1) Initialize NgSpice through the function call "ngSpice_Init ";
2) Load the netlist by calling the function "ngSpice_Command"or
3) Start the simulation by calling the function “ngSpice_Command” with
the string "bg_run" (for run in another thread);
This simulation maytake a long time.
So, canI at this time startthe simulation of another electrical circuit.
And again: If I am using NgSpice as a static shared library can I create
multiple instances of NgSpice in the same process.
Perhaps for that I have to rewrite your API is described in the files
"sharedspice.h" and "sharedspice.c". If this is the case then I'll do it
on Qt. Maybe I can do for you, because I know that you want to create
Qt-like interface for NgSpice.
I will begratefulfor any response.
Sorry for my English.
With best regards,
Software Developer at FulcrumWeb http://www.fulcrumweb.com
if you load the shared library into a process, it uses its own adreess
space in your main process. You may load multiple instances of
ngspice.dll into their own address spaces. There is one prerequisite
however to do so: the shared libraries have to have different names. So
compile ngspice shared lib (see manaul chapt. 19.1), then copy and
rename the file, e.g. ngspice.dll may become ngspice1.dll, ngspice2.dll
etc. And then load ngspice1.dll, ngspice2.dll etc.
I am just working on an update to allow identification of the individual
ngspice invocations during callbacks and on a simple synchronisation
scheme, if you want to run a parallel simulation. This will need some
days before I will upload it.
I guess that with a statically loaded shared lib you cannot do that.