Menu

#342 SegFault alter command

v1.0 (example)
closed-fixed
None
3
2017-04-12
2017-04-06
No

Hello,

I'm trying to modify he parameter of a voltage source between different transient simulations. I would like to alter the amplitude of the parameter sin. I checked the manual and tried it with alter @v1[sin] = [ 0 1 100meg ]. But every time the program is quitting with a segFault. I checked it for other parameters (f.ex. [pulse]) and it shows the same behaviour.

Below you can find a minimal example of the problem:

V1 0 1 sin(0 2 100meg)
R1 0 1 50

.end

Can you provide a solution for the problem. I compiled the latest release of ngspice.

best regards,

Related

Bugs: #342

Discussion

  • Justin Fisher

    Justin Fisher - 2017-04-06

    v1 0 1 dc 0 sin (0 2 100meg)
    rq 0 1 50

    .control
    alter @v1[sin]=[ 0 1 100meg ]
    tran 5p 20n
    plot v(1)
    .endc
    .end

    Note the white space inside [ ] at the beginning and end.

    Kind regards,

    Justin Fisher.

     

    Last edit: Justin Fisher 2017-04-06
  • Enrico Pannicke

    Enrico Pannicke - 2017-04-06

    So it's only possible to use it inside a script?

    But I would like to use it in the interactive interpreter. I'm using
    sharedspice.

    best regards,

    On Thu, 2017-04-06 at 09:21 +0000, Justin Fisher wrote:

    v1 0 1 dc 0 sin (0 2 100meg)
    rq 0 1 50

    .control
    alter @v1[sin]=[ 0 1 100meg ]
    tran 5p 20n
    plot v(1)
    .endc
    .end

    Note the white space inside [ ] at the beginning and end.
    Kind regards,

    Justin Fisher.


    [bugs:#342] SegFault alter command

    Status: open
    Group: v1.0 (example)
    Created: Thu Apr 06, 2017 08:42 AM UTC by Enrico Pannicke
    Last Updated: Thu Apr 06, 2017 09:20 AM UTC
    Owner: nobody

    Hello,

    I'm trying to modify he parameter of a voltage source between
    different transient simulations. I would like to alter the amplitude
    of the parameter sin. I checked the manual and tried it with alter
    @v1[sin] = [ 0 1 100meg ]. But every time the program is quitting with
    a segFault. I checked it for other parameters (f.ex. [pulse]) and it
    shows the same behaviour.

    Below you can find a minimal example of the problem:

    V1 0 1 sin(0 2 100meg)
    R1 0 1 50

    .end

    Can you provide a solution for the problem. I compiled the latest
    release of ngspice.

    best regards,


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/ngspice/bugs/342/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

    --
    M.Sc. Enrico Pannicke
    Forschungscampus Stimulate

    Otto-von-Guericke University Magdeburg
    Chair of Electromagnetic Compatibility

    Tel: +49 391 67 59365

    Fax: +49 391 67 19347

    Experimentelle Fabrik

    Room 04.07
    Sandtorstrasse 23
    39106 Magdeburg
    Germany

     

    Related

    Bugs: #342

  • Holger Vogt

    Holger Vogt - 2017-04-06

    Enrico,

    it is no problem to run the sequence interactively in ngspice. It is also no problem to enter the commands one-by-one using shared ngspice, using ng_start64.exe under Windows as offered at http://ngspice.sourceforge.net/shared.html .

    To figure out what your fault might be, you have to be much more specific. What is your calling program? What is your command sequence until the segfault occurs?

    Holger

     
    • Enrico Pannicke

      Enrico Pannicke - 2017-04-11

      Hello Holger,

      I just found the mistake. I included whitespace around the =. Removing
      them prevents the segmentation fault and I can alter the amplitude of
      the source.

      Thank you for your help.

      best regards,

      Enrico

      On Thu, 2017-04-06 at 15:47 +0000, Holger Vogt wrote:

      Enrico,

      it is no problem to run the sequence interactively in ngspice. It is
      also no problem to enter the commands one-by-one using shared ngspice,
      using ng_start64.exe under Windows as offered at
      http://ngspice.sourceforge.net/shared.html .

      To figure out what your fault might be, you have to be much more
      specific. What is your calling program? What is your command sequence
      until the segfault occurs?

      Holger


      [bugs:#342] SegFault alter command

      Status: open
      Group: v1.0 (example)
      Created: Thu Apr 06, 2017 08:42 AM UTC by Enrico Pannicke
      Last Updated: Thu Apr 06, 2017 09:20 AM UTC
      Owner: nobody

      Hello,

      I'm trying to modify he parameter of a voltage source between
      different transient simulations. I would like to alter the amplitude
      of the parameter sin. I checked the manual and tried it with alter
      @v1[sin] = [ 0 1 100meg ]. But every time the program is quitting with
      a segFault. I checked it for other parameters (f.ex. [pulse]) and it
      shows the same behaviour.

      Below you can find a minimal example of the problem:

      V1 0 1 sin(0 2 100meg)
      R1 0 1 50

      .end

      Can you provide a solution for the problem. I compiled the latest
      release of ngspice.

      best regards,


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/ngspice/bugs/342/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      M.Sc. Enrico Pannicke
      Forschungscampus Stimulate

      Otto-von-Guericke University Magdeburg
      Chair of Electromagnetic Compatibility

      Tel: +49 391 67 59365

      Fax: +49 391 67 19347

      Experimentelle Fabrik

      Room 04.07
      Sandtorstrasse 23
      39106 Magdeburg
      Germany

       
  • Holger Vogt

    Holger Vogt - 2017-04-11

    Enrico,

    thanks for the detail.
    It is a nuisance not to recognize spaces around '='.

    We have to take care of that.

    Holger

     
  • Justin Fisher

    Justin Fisher - 2017-04-11

    Hi Holger.

    If this is going to be worked on, there are a few other areas where whitespace has some strange behavior. I'm guessing there's no simple fix to that would generally fix all the issues, so maybe it's a case where we have to know where they are an issue? If that's true I can suggest the set sourcepath command in the control section. If there isn't a whitespace after the opening bracket and before the closing bracket the line isn't read.

    In general it seems there are places where no whitespaces are permitted and others where they must be - which is confusing.

    Using inpcom 9 in my original solution I find the following combinations work
    alter @v1[sin]=[ 0 1 100meg]
    alter @v1[sin] =[ 0 1 100meg]
    alter @v1[sin] = [ 0 1 100meg]
    alter @v1[sin] = [ 0 1 100meg ]
    alter @v1[sin ]=[ 0 1 100meg]

    But the following combinations do not
    alter @v1[sin]=[0 1 100meg]
    alter @v1[ sin]=[ 0 1 100meg]

    For some reason the whitespace after "v1[" and "=[" are critical (for opposite reasons) but in this case - the rest are not.

    --
    Kind regards,

    Justin Fisher

     
    • marcel hendrix

      marcel hendrix - 2017-04-11

      Hi Justin,

      Using inpcom 9 in my original solution I find the following combinations work
       alter @v1[sin]=[ 0 1 100meg]
       alter @v1[sin] =[ 0 1 100meg]
       alter @v1[sin] = [ 0 1 100meg]   $ (a)
       alter @v1[sin] = [ 0 1 100meg ]  $ (b)
       alter @v1[sin ]=[ 0 1 100meg]
      
      But the following combinations do not
       alter @v1[sin]=[0 1 100meg]
       alter @v1[ sin]=[ 0 1 100meg]
      

      Your example works for me with branch scope-inpcom-11
      on Windows 7, VS2017.
      I note that (a) and (b) are notations that Enrico
      says don't work for him.

      I just found the mistake. I included whitespace 
      around the =. Removing them prevents the 
      segmentation fault and I can alter the amplitude 
      of the source.
      

      Enrico uses "shardspice, latest release."
      I therefore assume he means ngspice-26 official release.
      The bug "spaces around '=' needed" is (apparently) fixed in the
      next release.

      That one should write "[ 0 1 100meg ]" with spaces around
      '[' and ']' is in the (current) manual:

      17.5.3
      ...
      For specifying a list of parameters as values, 
      start it with ‘[’, followed by the values in 
      the list, and end with ‘]’. Be sure to place 
      a space between each of the values and before
      and after the ‘[’ and ‘]’.
      

      -marcel

       

      Last edit: marcel hendrix 2017-04-11
      • Holger Vogt

        Holger Vogt - 2017-04-11

        There is a fix available in scope-inpcom-11.

        Ngspice reacted differently, either if you used a script or (as Enrico asked for) manually entered the alter command in interactive mode.

        Holger

         
  • Holger Vogt

    Holger Vogt - 2017-04-12
    • status: open --> closed-fixed
    • assigned_to: Holger Vogt
     

Log in to post a comment.

MongoDB Logo MongoDB