Sunday, 25 September 2011

Very simple ngspice circuit profiling framework using Google Perf Tools

I am trying to make some speedups in Ngspice the open source circuit simulator using CUDA and the GPU. I needed some profiling so i can determine which parts of Ngspice that have potential speed up and parallelization.

I used Google Perf Tools because it is really fast compared to Valgrind for example, despite being a Valgrind fan but i needed fast profiling because SPICE is very processing intensive.

Here is a very simple shell script that runs ngspice on every circuit in "circuits" directory and spits callgrind format to "profiling_info" directory. I used some of CircuitSim90 circuits & MCNC


To use it you should compile Ngspice for google profiler, so install google perf tools, and compile Ngspice using -lprofiler

./configure LIBS=-lprofiler
That script is for made on Ubuntu 11.04, the only difference for other distros will be the google profiler package and executable names.

sudo apt-get install libgoogle-perftools0 libgoogle-perftools0-dev google-perftools0 

If any one has a suggestion please feel free to tell me about it, also if anybody has a netlist for a big MOSFET circuit (1000+ MOSFETs) please tell me about it.

1 comment:

  1. Buen dia...

    quisiea conocer un poco mas acerca de lo que tienes en este post, yo actualmente estoy interesando en evaluar un sistema de paneles solares, es decir una simulacion a gran escala....

    me pareceria bueno compartir puntos de vista.

    malliwi88@hotmail.com, malliwi88@gmail.com

    ReplyDelete