Menu

Measuring after loading results caused crash of ngspice

2014-11-04
2017-07-05
  • Michal Janik

    Michal Janik - 2014-11-04

    Hi everybody,
    I have faced next problem. I did very long time simulation of transient circuit. The calculation takes several days. I stored the results into file and I later wanted to load them and measure some values from it. I created some small script to reconsruct the problem:

    * error loading
    
    .global gnd
    
    v1 1 gnd dc 0 sin(0 1 1meg)
    R1 1 gnd 1
    
    .control
        tran 10n 100u
    
        let v_out = v(1)
    
        set specwindow=blackman
        fft v_out
    
        let db_out=db(mag(v_out))
    
        * this measurement works
        meas sp v1 max  db_out from=0.9meg to=1.1meg
    
        write results.res
    
        destroy all
    
        load results.res
    
        * this measurement crashed ngspice
        meas sp v1 max  db_out from=0.9meg to=1.1meg
    
    .endc
    

    Michal

     

    Last edit: Holger Vogt 2017-07-05
    • Holger Vogt

      Holger Vogt - 2017-07-05

      Late, but hopefully not too late for somebody interested in this.

      The output of the fft vout is a complex number. The write command then stores all data as complex numbers, also the frequency, which used to be real before fft. After loading, ngspice did not recognize that frequency was now also complex and thus crashed. A fix is uploaded to scope-inpcom-15.

      Holger

       

      Last edit: Holger Vogt 2017-07-05

Log in to post a comment.