https://open-source-silicon.dev logo
#analog-design
Title
# analog-design
a

Ashok Kumar

10/15/2020, 5:15 PM
How to resolve "segmentation fault(core dumped problem)" ? as I got it as a result of my ngspice simulation.
p

Pepijn de Vos

10/15/2020, 6:17 PM
This is a bug. It means the simulator accessed memory that it should not. There is no simple way to resolve it. You could try upgrading ngspice to the development version to see if it has been fixed, or report a bug.
y

yrrapt

10/15/2020, 6:31 PM
Did you use the '.ic' command?
s

Stefan Schippers

10/15/2020, 10:17 PM
@Ashok Kumar try to build the smallest circuit that reproduce the segfault, then report to ngspice on sourceforge, the developers are very responsive.
a

Ashok Kumar

10/15/2020, 11:37 PM
@yrrapt yes I have used .ic command.
@Stefan Schippers I'll do that, thank you.
@yrrapt i have removed the . ic command then it worked. but i need this .ic command for setting up an initial condition so is there any alternative.
s

Stefan Schippers

10/16/2020, 12:02 AM
@Ashok Kumar try to set the .IC at the end after the netlist
before the .end of course
a

Ashok Kumar

10/16/2020, 12:05 AM
ok i'll do that. thank you
@Stefan Schippers no that didn't worked.
s

Stefan Schippers

10/16/2020, 12:40 AM
also verify if all the nodes you set in .ic do exist
do no set .ic on nodes trat are driven by voltage sources
a

Ashok Kumar

10/16/2020, 2:04 AM
ok
i have verified this and my node is not connected directly to a source and it is existing.
y

yrrapt

10/16/2020, 6:13 AM
@Ashok Kumar I think there is a bug with the IC command. A couple of people of have come across it here. Even if the command is used incorrectly the program shouldn't segfault so somethings wrong. I would recommend reporting the bug with a short example netlist to the developers and see if they can have a look
a

Ashok Kumar

10/16/2020, 6:39 AM
@yrrapt So,I need to check whether this segfault is there or not , using a small netlist with .ic and if it is there, I need to report a bug right.
y

yrrapt

10/16/2020, 6:43 AM
Yeah, it's really helpful for the developers if you can make an example that's as small as possible that shows the unexpected behaviour. That way they can check it out quickly - and you're more likely to get the bug fixed. I think the ngspice folks hang out on their source forge mailing list but I haven't used it myself
a

Ashok Kumar

10/16/2020, 7:27 AM
Ok I'll do that.
@yrrapt I just simulated the same with ngspice-32 on my windows OS and it worked.
Whereas in Ubuntu ngspice-27 it's showing this segmentation fault
r

Riking28

10/17/2020, 11:14 AM
Yeah, that's how this kind of thing behaves If you want to help find the bug, take a copy of your whole design, and start deleting chunks out of it. If it makes the error go away, go back and delete something else Repeat until you can't delete anything, then send that to the developers
s

Stefan Schippers

10/17/2020, 5:22 PM
you can build ngspice-32 on ubuntu, this is probably the first thing the developers will tell you. Installing ngspice from source files and compiling to get the executable is not difficult.
a

Ashok Kumar

10/17/2020, 5:31 PM
Yeah I'll do that