hello all, My ngspice simulations are crashing due...
# analog-design
j
hello all, My ngspice simulations are crashing due to maximum data size reached, please see the attached screenshot. Does anyone know how to increase this max size?
a
Its compile time parametr. Need yo rebuild the ngspice with changes @User mentioned it somewhere
j
hello @User, thanks for the reply where did you see it mentioned, here in slack? @User or anyone else who can help?
s
@Jorge, 6GB of data is huge, i think unless you have LOT of ram you will have problems trying to open this file, My suggestion is to limit the number of saved voltages / currents.
@User @User the compile parameter i once changed was for a different thing, that is, the max lenght of netlist lines when executing a '`listing`' command in interactive ngspice prompt. About your problem, @User i think ngspice tries to guess the size of resident memory on the system and exit if all memory is being exhausted. This happens in interactive mode, where all simulation data is kept in memory and eventually saved (with a ngspice write command). If you start ngspice in batch mode (no interactive commands) then the raw file goes directly to disk, and no in-memory data is kept.
j
@User thanks a lot for the explanation. I tried the batch mode but I get a similar error. I'm simulating a delta-sigma kind of system so the simulations are long and have small time step. I save the voltage traces for my sweep using the following statement, could this be the issue?
wrdata SDC_CINsweep_v5p4.txt tran1.v(DOUT) tran2.v(DOUT) tran3.v(DOUT) tran4.v(DOUT) tran5.v(DOUT) tran6.v(DOUT) tran7.v(DOUT) tran8.v(DOUT) tran9.v(DOUT) tran10.v(DOUT) tran11.v(DOUT) tran12.v(DOUT) tran13.v(DOUT) tran14.v(DOUT) tran15.v(DOUT) tran16.v(DOUT)
Regarding what you say about saving voltages/currents, is it all saved by default and I need to do something particular to save less things? An example would be really helpful.
s
@User If you do a
.save v(xxx) v(yyy) v(zzz)....
then only those elements are dumped to file.if no .save are given all voltages and all voltage source branch currents are saved. You can specify currents thru voltage sources in .save as
.save i(vsource_name)
, and a whole lot of device parameters as explained in chapter 31 of the ngspice manual. If you are doing an interactive simulation (using a .control / .endc section) put a
write file.raw
at the end so stuff is saved to disk.