Page 1 of 1

spFactor error: Zero Diagonal

Posted: Wed May 21, 2008 12:35 pm
by mjb7
I received the following error during simulations of extracellular stimulation using the extracellular mechanism:

"spFactor error: Zero Diagonal"

This only occurs when the stimulation amplitude is sufficiently high. I'm pretty sure it has something to do with the large extracellular potentials created by the stimulus, and hence extremely large and rapid fluctuations in the transmembrane potential as compared to those produced physiologically. I went through all of my .mod files and hard-coded in catches for extremely large exponents and/or singularities. Any other ideas as to what might be the cause of such an error?

Thank you!

Posted: Thu May 22, 2008 9:42 am
by ted
Can you reproduce the problem with a model that has simpler membrane properties? e.g.
eliminate all but the major spike currents and see if the symptom can be elicited.

Re: spFactor error: Zero Diagonal

Posted: Tue Mar 13, 2012 2:00 am
by dearambellina99
Hi,

Can someone please explain the nature of this error? I dont understand its behavior. Unlike the OP, I receive the error at certain values of e_extracellular -- not necessarily past a threshold. For example, when my stimulus is 2.49 or 2.51 mA, the simulation runs fine. When the stimulus is 2.50 mA, the simulation breaks.

The complete error is:

"/Applications/NEURON-7.2/nrn/i386/bin/nrniv.app/Contents/MacOS/nrniv: spFactor error: Zero Diagonal
near line 23
hoc_ac_ = istim
^
fadvance()
advance()
step()
continuerun(2.5)
and others"

Thank you.

Re: spFactor error: Zero Diagonal

Posted: Wed Mar 14, 2012 2:16 pm
by hines
I'd like to reproduce these errors and try to diagnose the underlying reason. Can each of you
send me a zip file that contains the hoc,ses,mod files needed along with how to run so that the
error occurs. Please send to michael dot hines at yale dot edu.

Re: spFactor error: Zero Diagonal

Posted: Wed Jun 10, 2020 10:40 am
by astymega
Hi,
Unlike the OP, I receive the error at certain values of e_extracellular -- not necessarily past a threshold.
I also have the same problem, although it tends to happen more often at higher stimulus amplitude. Is there any way to troubleshoot this?

Thank you.

Re: spFactor error: Zero Diagonal

Posted: Wed Jun 10, 2020 11:07 am
by hines
2008, 2012, and now 2020. I wonder what happened in 2016 :)
Please send me a zip file with the hoc,ses,mod,py files so I can reproduce the error and try to diagnose.
The error message means the matrix had no inverse. I wonder if two matrix rows started out the same. I wonder if the (sub?)problem it is trying to solve is linear.

Re: spFactor error: Zero Diagonal

Posted: Mon Mar 29, 2021 9:28 am
by Nooshin
Hi all,
I have the same problem. My model includes channel noise and I received the error “spFactor error: Zero Diagonal” during simulations. I am wondering how the problem can be solved
Thank you

Re: spFactor error: Zero Diagonal

Posted: Mon Mar 29, 2021 10:05 am
by hines
I need to reproduce the problem on my machine if possible. Can you send me (michael dot hines at yale dot edu) a zip file with all the needed hoc,ses,mod,py files that comprise the simulation? No guarantee that I'll succeed or that my diagnostic path will generalize, but I'll take notes on the process and will share.