I'm not getting a clear picture from the docs. Doe...
# analog-design
a
I'm not getting a clear picture from the docs. Does Ngspice support multi-threading? Is there something specific I need to do to enable it?
s
Ngspice can use multiple threads to split device equation evaluation (if device models support it, like bsim4) and circuit matrix solving into different threads. The circuit solver by itself is not parallel, the whole circuit netlist is flattened to a big sparse matrix with modified nodal analysis and solving is carried out. to enable multiple threads specify in a .spiceinit file in the directory where ngspice runs:
Copy code
set ngbehavior=hsa
set ng_nomodcheck 
set num_threads=4
set skywaterpdk
see the
num_threads
variable. Using more than 4 threads does in general not give much additional benefit, at least based on my tests. (but I do not have a powerfiul machine, so may be my results are not general)
1