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
Because exp(x) and pow(x,y) can generate slightly different results for some argument values on Linux and Windows,
round off error may eventuate in cvode selecting different values for a time step. After that the series of time steps may have
quite different values and numbers of time steps. This does not affect the accuracy of the simulation as all time steps obey the
absolute tolerance criteria selected by the user. For the specific model studied, it was helpful to use the digest-debug branch
which allowed a file to be generated that printed y, y' for every cvode f(y, t) (and jacobian M*x = b) calculation in whch the
SHA1 hash of the y and y' arrays made it easy to find a specific call in which the arrays were different on the different machines, and whether the fault was in the cvode code or the NEURON y' = f(y, t) evaluation. prcellstate with a precision of %.18g along with replacing GLOBAL with RANGE variables and mirroring LOCAL variables with RANGE variables, was helpful in isolating the issue to exp and pow. As cvode also makes use of pow, steering that to a hoc_pow and all exp in mod files to a hoc_Exp
function that rounds the mantissa of the exp and pow result to 32 bit mantissa accuracy gave simulations having identical results on Windows and Linux. It is presently not known how much of the 53 bit mantissa can be retained and still generate identical results.
The text was updated successfully, but these errors were encountered:
Because exp(x) and pow(x,y) can generate slightly different results for some argument values on Linux and Windows,
round off error may eventuate in cvode selecting different values for a time step. After that the series of time steps may have
quite different values and numbers of time steps. This does not affect the accuracy of the simulation as all time steps obey the
absolute tolerance criteria selected by the user. For the specific model studied, it was helpful to use the digest-debug branch
which allowed a file to be generated that printed y, y' for every cvode f(y, t) (and jacobian M*x = b) calculation in whch the
SHA1 hash of the y and y' arrays made it easy to find a specific call in which the arrays were different on the different machines, and whether the fault was in the cvode code or the NEURON y' = f(y, t) evaluation. prcellstate with a precision of %.18g along with replacing GLOBAL with RANGE variables and mirroring LOCAL variables with RANGE variables, was helpful in isolating the issue to exp and pow. As cvode also makes use of pow, steering that to a hoc_pow and all exp in mod files to a hoc_Exp
function that rounds the mantissa of the exp and pow result to 32 bit mantissa accuracy gave simulations having identical results on Windows and Linux. It is presently not known how much of the 53 bit mantissa can be retained and still generate identical results.
The text was updated successfully, but these errors were encountered: