You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
ngspice-klu (https://sourceforge.net/projects/ngspice/) was exhibiting a lot of "matrix is singular" warnings during GMIN stepping vs ngspice using Sparse. The run time warnings were also affected by the use of the gcc switch -mfma (fused multiply-accumulate). With -mfma the warnings count for KLU and Sparse is identical. Code generated with -mfma is not portable however, as the Intel and AMD fused multiply-accumulate instructions differ.
I noticed that Sparse uses PIVREL (relative pivot tolerance) and PIVTOL (absolute pivot tolerance) but KLU only supports PIVREL. As an experiment I added PIVTOL to KLU (using the traditional SPICE default value of 1e-13). This seems to have fixed the excess "matrix is singular" warnings. I've been using the modified ngspice-klu successfully for a few months.
Describe the solution you'd like
My understanding of KLU is limited. I'm concerned that my change is incomplete or breaks something else. Does this change make sense to you? klu-pivtol.zip
Additional context
The attached code had already been modified a bit for inclusion into ngspice before my addition of an absolute pivot tolerance.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
ngspice-klu (https://sourceforge.net/projects/ngspice/) was exhibiting a lot of "matrix is singular" warnings during GMIN stepping vs ngspice using Sparse. The run time warnings were also affected by the use of the gcc switch -mfma (fused multiply-accumulate). With -mfma the warnings count for KLU and Sparse is identical. Code generated with -mfma is not portable however, as the Intel and AMD fused multiply-accumulate instructions differ.
I think this IEEE 754 reference may explain the accuracy improvement seen using -mfma: https://docs.nvidia.com/cuda/floating-point/index.html
I noticed that Sparse uses PIVREL (relative pivot tolerance) and PIVTOL (absolute pivot tolerance) but KLU only supports PIVREL. As an experiment I added PIVTOL to KLU (using the traditional SPICE default value of 1e-13). This seems to have fixed the excess "matrix is singular" warnings. I've been using the modified ngspice-klu successfully for a few months.
Describe the solution you'd like
My understanding of KLU is limited. I'm concerned that my change is incomplete or breaks something else. Does this change make sense to you?
klu-pivtol.zip
Additional context
The attached code had already been modified a bit for inclusion into ngspice before my addition of an absolute pivot tolerance.
The text was updated successfully, but these errors were encountered: