Data2Dynamics / d2d

a modeling environment tailored to parameter estimation in dynamical systems
https://github.com/Data2Dynamics/d2d
57 stars 28 forks source link

Issue with useSparseJac #130

Open JoepVanlier opened 6 years ago

JoepVanlier commented 6 years ago

It seems that ar.config.useSparseJac is set to 1 in arCompileAll in paricular cases? There's already a default for useSparseJac in arInitFields (which is 0). I've reversed the logic in commit db4e312340c9fb3c432192fadf52f3a154c0a5b1 , since it seems strange to use a sparse jac when you set the flag to 0.

I have a model where if useSparseJac is set to one, the model crashes (including MATLAB).

The error I see in the terminal is: Error in `/usr/local/MATLAB/R2017a/bin/glnxa64/MATLAB': realloc(): invalid next size: 0x00007fb92cd74510

In MATLAB the following is displayed when simulating with full error info: image

Example case where it happens here: crashcase.zip