Data2Dynamics/d2d

Issue with useSparseJac

JoepVanlier opened this issue · 0 comments

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 db4e312 , 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