|
From: Holger V. <hol...@un...> - 2008-11-01 18:01:31
|
Dear all, below you will find some speed comparisons of ngspice, using a Pentium4 with 3.4GHz and 1.5GByte of memory. The input file is: /tests/tcl-testbench4 example.cir with the settings: +VERSION = 3.3.0 and: .TRAN 0.02n 50n 0n 0.5n No other changes werde made to the file. WindowsXP: ngspice_m (-O3) 162.3 sec ngspice_vc (/O2 /Oi /Ot /GL) 94.8 sec ngspice_vc debug (/Od) 152.6 sec 168364 iterations were needed. _vc = MS Visual Studio 2008 _m = MINGW gcc 3.4.5 For comparison plain old spice (DuSpice.exe with MS Visual Studio 2008, /O2 /Oi /Ot /GL) was used: DuSpice (vc) 52.0 sec The speed advantage, however, is not due to faster algorithms, but to a reduced number of only 87254 iterations. This might be a hint how to increase simulation speed. Linux Suse 10.2 gcc 4.1.2 gave: ngspice (-O3) 135,9 sec. Then I tried to figure out the use of code symbols, applying CodeAnalyst from AMD (a free profiling tool for Windows) and using ngspice_vc debug with model BSIM 3.3.0: BSIM3Load: 54,7% spFactor: 14,8% spSolve: 6,9% CKTterr: 5,4% spClear: 5,2% All others are below 2.4% each. Matrix solving is only about 25-30%. Most of the time the simulation spends in the BSIM3 model code (55% in BSIM3Load). Thus it is probably not too useful to spend much time for establishing a new matrix solver. The paper cited recently by Lionel (T.-H. Weng e.a.: OpenMP implementation of SPICE3 circuit simulator, IWOMP 2005/2006, LNCS 4315, pp. 361-371, 2008), points to the same direction. The authors care for parallelising the MOS3load() function. As soon as I have a multi core processor machine available, I will try to figure out how that might benefit ngspice. Regards Holger |