I've written a maxwell field simulator that outputs ngspice coupled multiconductor models for arbitrary transmission line metal/dielectric cross sections. If I generate models with 8 conductors ngspice simulates it correctly. Models with 9 or more conductors dump core. I am working on a commercial project for our Agilent Mass Spectrometers that uses 15 conductors, so I'm motivated to help fix this if possible. My guess is that there is a hard coded 8-element limit on the internal data structures. I've attached a working mc8.cki file and a failing mc9.cki file. I run them with "ngspice -b mc8.cki -r mc8.raw -o mc8.txt".
Kind regards,
Rick Walker
rick.walker@agilent.com
Afer enabling debugging and looking at the stack trace, the issue is:
I could trap the out of bounds condition and print an error message telling the user the current compiled limit and telling them which #define to change to up the limit, rather than triggering a core dump. Would this be an acceptable patch? I am using this code quite a bit lately and am planning to publish my multiconductor model generator, so I'd like to make this easier to use.
Yes, of course that's the best solution. Please post the patch.
Here's a patch. It prints out how many lines were requested with the CPL model, how many lines are compiled in and a suggestion for which file and #define to modify to increase the limit. I also added my name to AUTHORS file assuming you eventually accept the patch :-).