spFactor error: Zero Diagonal

Anything that doesn't fit elsewhere.
Post Reply
mjb7

spFactor error: Zero Diagonal

Post 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!
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post 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.
dearambellina99

Re: spFactor error: Zero Diagonal

Post 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.
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: spFactor error: Zero Diagonal

Post 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.
astymega
Posts: 1
Joined: Wed Apr 01, 2020 2:20 am

Re: spFactor error: Zero Diagonal

Post 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.
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: spFactor error: Zero Diagonal

Post 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.
Nooshin
Posts: 6
Joined: Fri Mar 12, 2021 3:35 pm

Re: spFactor error: Zero Diagonal

Post 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
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: spFactor error: Zero Diagonal

Post 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.
Post Reply